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

DIG-1355: Sonchau/UUID with fk #158

Merged
merged 235 commits into from
Dec 4, 2023
Merged

DIG-1355: Sonchau/UUID with fk #158

merged 235 commits into from
Dec 4, 2023

Conversation

SonQBChau
Copy link

@SonQBChau SonQBChau commented Nov 23, 2023

What's new:

  • All tables will have FKs in the same manner as currently, but these FKs will be uuids
    submitter__ids will be stored in each object as a text field.
  • UUIDs will remain internal to katsu and not be exposed via any API.
  • UUIDs will be generated by katsu when data is ingested
  • The combination of (program_id, submitter_*_id) will have a UNIQUE constraint in the database (for donor, specimen, sample, treatment and follow-up ids)
  • Potentially Breaking changes:

    • DonorWithClinicalData no longer has filters. Can only retrieve 1 specific object by providing the program_id and submitter_*_id.
    • The structure of the DonorWithClinicalData request has changed and is now "/v2/authorized/donor_with_clinical_data/program/{program_id}/donor/{donor_id}"
    • Ingest APIs no longer accept a list of object.
    • Discovery query no longer has filters. This will be addressed in the next patch
    • New data ingest script for development using
      python chord_metadata_service/mohpackets/data/data_loader.py

    Package changes:

    • NEW django-ninja for both API and schema + filter
    • NEW orjson faster JSON package for renderer since we use a lot of json
    • REMOVE drf, replaced by ninja, used serializer which is slower and hard to customize
    • REMOVE django-filter, replaced by ninja, only work with drf
    • REMOVE drf-spectacular, replaced by ninja, only work with drf. This used to generate schema based on the serializer to yml file. Since the new ninja only generate json, we need to convert it to yml

    How to test:

    • Due to significant changes, it is recommended to drop the database and re-create
    • pip install -r requirements/local.txt
    • tox

    Related tickets:

    DIG-1389
    DIG-1312

@SonQBChau SonQBChau requested review from OrdiNeu and yavyx November 30, 2023 03:46
Copy link
Member

@daisieh daisieh left a comment

Choose a reason for hiding this comment

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

As far as I can tell, this works as expected. Looks good!

@daisieh daisieh marked this pull request as draft December 1, 2023 22:52
@daisieh daisieh marked this pull request as ready for review December 1, 2023 22:52
@daisieh daisieh marked this pull request as draft December 1, 2023 23:04
@daisieh daisieh marked this pull request as ready for review December 1, 2023 23:04
@daisieh daisieh marked this pull request as draft December 1, 2023 23:09
@daisieh daisieh marked this pull request as ready for review December 1, 2023 23:09
@daisieh daisieh marked this pull request as draft December 1, 2023 23:25
@daisieh daisieh marked this pull request as ready for review December 1, 2023 23:25
@daisieh daisieh force-pushed the sonchau/uuid_with_fk branch from 5e3a172 to 4e635fd Compare December 2, 2023 03:56
@daisieh daisieh marked this pull request as draft December 2, 2023 03:56
@daisieh daisieh marked this pull request as ready for review December 2, 2023 03:56
Copy link

@OrdiNeu OrdiNeu left a comment

Choose a reason for hiding this comment

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

From the data-portal side everything looks fine as far as I can tell, will need some modifications to data portal code to get it working with this but nothing too out-of-the-ordinary ✔️ .

@daisieh daisieh merged commit 394f2b7 into develop Dec 4, 2023
1 check passed
@daisieh daisieh deleted the sonchau/uuid_with_fk branch December 4, 2023 18:33
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.

4 participants