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

refact!: define a "scopeable model" base class + modelviewset scoping #536

Merged
merged 79 commits into from
Jan 15, 2025

Conversation

davidlougheed
Copy link
Member

No description provided.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 95.76720% with 24 lines in your changes missing coverage. Please review.

Project coverage is 92.71%. Comparing base (9f12712) to head (3488176).
Report is 86 commits behind head on develop.

Files with missing lines Patch % Lines
chord_metadata_service/chord/ingest/views.py 82.05% 5 Missing and 2 partials ⚠️
chord_metadata_service/restapi/api_renderers.py 82.92% 5 Missing and 2 partials ⚠️
chord_metadata_service/experiments/api_views.py 92.50% 2 Missing and 1 partial ⚠️
chord_metadata_service/authz/permissions.py 83.33% 1 Missing and 1 partial ⚠️
chord_metadata_service/chord/export/views.py 89.47% 1 Missing and 1 partial ⚠️
chord_metadata_service/phenopackets/api_views.py 92.85% 1 Missing and 1 partial ⚠️
chord_metadata_service/chord/export/cbioportal.py 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #536      +/-   ##
===========================================
+ Coverage    92.04%   92.71%   +0.66%     
===========================================
  Files          115      116       +1     
  Lines         4237     4391     +154     
  Branches       376      386      +10     
===========================================
+ Hits          3900     4071     +171     
+ Misses         249      229      -20     
- Partials        88       91       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…odel-base-class

# Conflicts:
#	chord_metadata_service/phenopackets/api_views.py
…odel-base-class

# Conflicts:
#	chord_metadata_service/chord/tests/test_api.py
#	chord_metadata_service/discovery/api_views.py
#	chord_metadata_service/discovery/utils.py
#	chord_metadata_service/experiments/api_views.py
#	chord_metadata_service/phenopackets/api_views.py
test: add more tests / fix test issues
@davidlougheed davidlougheed changed the title [WIP] refact: define a "scopeable model" base class + modelviewset scoping refact: define a "scopeable model" base class + modelviewset scoping Nov 27, 2024
@davidlougheed davidlougheed changed the title refact: define a "scopeable model" base class + modelviewset scoping refact!: define a "scopeable model" base class + modelviewset scoping Nov 27, 2024
@davidlougheed davidlougheed marked this pull request as ready for review January 9, 2025 18:57
@davidlougheed davidlougheed requested a review from gsfk January 14, 2025 19:05
Copy link
Contributor

@v-rocheleau v-rocheleau left a comment

Choose a reason for hiding this comment

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

Final requests I think, looks good!

chord_metadata_service/authz/viewset.py Show resolved Hide resolved
chord_metadata_service/experiments/api_views.py Outdated Show resolved Hide resolved
chord_metadata_service/patients/models.py Show resolved Hide resolved
chord_metadata_service/restapi/api_views.py Show resolved Hide resolved
chord_metadata_service/authz/viewset.py Show resolved Hide resolved
Copy link
Member

@gsfk gsfk left a comment

Choose a reason for hiding this comment

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

Working well for me so far.

@gsfk
Copy link
Member

gsfk commented Jan 15, 2025

post-approval comment: behaviour when mismatching projects & datasets is not always consistent. If I manage to request a project_id and and an incorrect dataset_id (from another project, say), I get a mix of behaviours:

  • /api/public_rules returns a sensible error message
  • /api/individuals returns "Forbidden"

working now, thanks

Copy link
Contributor

@v-rocheleau v-rocheleau left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@davidlougheed davidlougheed merged commit c23a2ca into develop Jan 15, 2025
7 checks passed
@davidlougheed davidlougheed deleted the refact/scopeable-model-base-class branch January 15, 2025 20:55
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