Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tools API openAPI contract and regenerate VCF results pydantic model #50

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Mehrnaz-Charkhchi
Copy link
Contributor

Description

Update Tools API openAPI contract and regenerate VCF results pydantic model.

Related JIRA Issue(s)

ENSWBSITES-2781

Review App URL(s)

http://BRANCH_NAME_HERE.review.ensembl.org

Knowledge Base

Example(s)

Checklist

  • Black formatting
  • Tests

Dependencies

@Mehrnaz-Charkhchi Mehrnaz-Charkhchi marked this pull request as ready for review October 4, 2024 16:52
consequence = PredictedIntergenicConsequence(
feature_type=None,
consequences=["intergenic_variant"]
)
Copy link
Contributor

@azangru azangru Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing now for the first time how the PredictedIntergenicConsequence class is instantiated, I think passing both these arguments to it is redundant (it must be the result of it being auto-generated from the schema). If the contract is that the PredictedIntergenicConsequence class will always serialise to:

{
  "feature_type": null,
  "consequences": ["intergenic_variant"]
}

and if the caller of the class always knows that it is calling the PredictedIntergenicConsequence class, then there shouldn't be any need to pass any data into it. This class can have the feature_type field set always to None, and the consequences field set always to ["intergenic_variant"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants