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

feat!: use vrs 2.0-alpha models in /normalize #364

Merged
merged 11 commits into from
Oct 26, 2023
Merged

feat!: use vrs 2.0-alpha models in /normalize #364

merged 11 commits into from
Oct 26, 2023

Conversation

korikuzma
Copy link
Member

@korikuzma korikuzma commented Sep 13, 2023

Close #363
Going to wait to open until Disease Normalization PR is merged. But would still like your review @jsstevenson now . This PR is very similar to the gene/disease PRs.

Notes:

  • Dependency updates
    • Pin pydantic to v2
    • Remove ga4gh.vrsatile.pydantic and switch to use ga4gh.vrs for core/vrs 2-alpha models
      *TherapeuticDescriptor --> TherapeuticAgent
    • Updates disease-normalizer version
  • Set response_model_exclude_none=True in FastAPI response
  • In QueryHandler, method _add_vod renamed to _add_therapeutic_agent

@korikuzma korikuzma added priority:high High priority enhancement New feature or request labels Sep 13, 2023
@korikuzma korikuzma self-assigned this Sep 13, 2023
jsstevenson
jsstevenson previously approved these changes Oct 26, 2023
@korikuzma korikuzma added priority:low Low priority and removed priority:high High priority labels Oct 26, 2023
@korikuzma korikuzma marked this pull request as ready for review October 26, 2023 11:37
@korikuzma korikuzma requested a review from jsstevenson October 26, 2023 11:37
@jsstevenson
Copy link
Member

A few changes:

In cli.py, change these lines

from disease.database import Database as DiseaseDatabase                                                                                                                                                                                                                                                           
from disease.cli import CLI as DiseaseCLI

to

from disease.database.dynamodb import DynamoDbDatabase as DiseaseDatabase                                                                                                                                                                                                                                          
from disease.cli import update_db as update_disease_db

and change

click.echo(msg)
                try:
                    DiseaseCLI().update_normalizer_db(

to

click.echo(msg)
                try:
                    update_disease_db(                                                                                                                                                                                                                                                                             
                        ["--update_all", "--update_merged", "--db_url", endpoint_url]

and in etl/base.py change

self.disease_normalizer = DiseaseNormalizer(self.database.endpoint_url)

to

db = DynamoDbDatabase(self.database.endpoint_url)                                                                                                                                                                                                                                                          
        self.disease_normalizer = DiseaseNormalizer(db)

I'm testing with imports of HemOnc and Wikidata and they appear to work with the changes above (minus a separate HemOnc error which I've made a new issue for).

@korikuzma korikuzma merged commit b632b56 into main Oct 26, 2023
12 checks passed
@korikuzma korikuzma deleted the issue-363 branch October 26, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:low Low priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update pydantic to v2 + remove ga4gh.vrsatile.pydantic dependency
2 participants