Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Improve database models #14

Merged
merged 3 commits into from
Nov 12, 2023
Merged

Improve database models #14

merged 3 commits into from
Nov 12, 2023

Conversation

VanessaBotha
Copy link
Contributor

  • CategoryEnum train —> fit
  • Add nullable=False to columns that cannot be empty
  • Change relationship to list if multiple are possible (patient.splits, image.labels, image.caches)
  • ImageLabels key/value instead of label_data
  • Add unique constraint to split_definition.version
  • Add unique constraint to split.split_definition_id and patient_id to ensure patient cannot be assigned multiple categories within one split_definition

@jonasteuwen
Copy link
Contributor

jonasteuwen commented Nov 12, 2023

Thanks! Can you see if populate_tcga_db.py still works with these changes? I see at least one occurrence of CategoryEnum.TRAIN there.

@jonasteuwen jonasteuwen added this to the v0.1.1 milestone Nov 12, 2023
@jonasteuwen jonasteuwen added bug Something isn't working enhancement New feature or request labels Nov 12, 2023
Copy link
Contributor

@jonasteuwen jonasteuwen left a comment

Choose a reason for hiding this comment

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

This looks good, but I think it breaks the TCGA script

Copy link
Contributor

@jonasteuwen jonasteuwen left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. LGTM.

@jonasteuwen jonasteuwen merged commit e0e1ed4 into main Nov 12, 2023
1 check passed
@jonasteuwen jonasteuwen deleted the improve_database_models branch November 12, 2023 22:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants