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!: switch to Phenopackets v2 #1394 #380

Merged
merged 181 commits into from
Nov 28, 2023
Merged

Conversation

v-rocheleau
Copy link
Contributor

@v-rocheleau v-rocheleau commented Feb 6, 2023

Updating JSON-Schema representations and datamodel from Phenopackets V1 to V2.

Phenopackets related changes:

  • Every phenopacket JSON-Schema was updated to reflect the changes described here
  • JSON-Schema for VRS (GA4GH's Variation Representation Specification) entities are now in full synch with the official spec as a git submodule
  • VRS includes cyclic schema references, which cannot be rendered as a fully resolved schema object. To fix this, the schema validation now relies on the referencing API to resolve VRS schemas dynamically
  • Django models/serializers/filters/search/views/renderers were updated to hold the new information carried in phenopackets
  • Existing django tests were updated to pass after the new changes
  • New management command validate can be used to validate a phenopackets in a .json document
  • New management command decamelize can be used to convert the keys of a .json document (was useful to create and convert test data, which is not decamelized if saved to the db by bypassing the ingestion workflow)
  • New example .json files were added as sample and test resources

Other changes:

  • New docker-compose.dev.yaml file can be used to quickly spin a Postgres DB and a simple Adminer app on port 8080. (useful for local dev on standalone katsu)
  • Documentation for the docker-compose.dev.yaml tools
  • New migrations
  • Make all JSON-Schema IDs URI compliant
  • Field level data validation for Phenopackets enums (Django choices)

README.md Outdated Show resolved Hide resolved
chord_metadata_service/chord/views_search.py Outdated Show resolved Hide resolved
chord_metadata_service/chord/ingest/resources.py Outdated Show resolved Hide resolved
chord_metadata_service/phenopackets/tests/test_models.py Outdated Show resolved Hide resolved
chord_metadata_service/phenopackets/admin.py Outdated Show resolved Hide resolved
chord_metadata_service/resources/descriptions.py Outdated Show resolved Hide resolved
chord_metadata_service/resources/models.py Outdated Show resolved Hide resolved
chord_metadata_service/restapi/schema_utils.py Outdated Show resolved Hide resolved
Copy link
Member

@davidlougheed davidlougheed left a comment

Choose a reason for hiding this comment

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

just realized this, sorry - any model for which entries aren't automatically removed by foreign key relationships needs cleanup functions + tests to make sure objects are properly removed.

chord_metadata_service/phenopackets/models.py Outdated Show resolved Hide resolved
chord_metadata_service/phenopackets/models.py Outdated Show resolved Hide resolved
chord_metadata_service/phenopackets/models.py Show resolved Hide resolved
chord_metadata_service/phenopackets/models.py Show resolved Hide resolved
Copy link
Member

@davidlougheed davidlougheed left a comment

Choose a reason for hiding this comment

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

lgtm pending any search fixes needed!

@v-rocheleau v-rocheleau merged commit 4e934a0 into develop Nov 28, 2023
5 checks passed
@davidlougheed davidlougheed deleted the features/phenov2-1394 branch February 7, 2024 20:31
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.

3 participants