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

removing old sample and order models pt 1 #4097

Merged
merged 8 commits into from
Jan 16, 2025

Conversation

diitaz93
Copy link
Contributor

@diitaz93 diitaz93 commented Jan 15, 2025

Description

The old validation used pydantic models such as OrderIn, and samples for each ordertype that new ones have replaced, therefore they need to be deleted. They are still called in many tests set to fail. The tests are still kept as they need to be translated into the new validation. This PR attempts to remove the pydantic models and fix the tests. Many changes are involved, so I separated the PR with an incomplete working set of changes.

Added

  • Fixtures for taxprofiler order
  • Store fixture for order integration tests (includes all application and a maf order. To be expanded with organisms and everything needed for the tests)

Changed

  • Fixed integration tests for Balsamic, Fastq, Fuffy, and Metagenome

Fixed

  • Removed completely unused models

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b [THIS-BRANCH-NAME] -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@diitaz93 diitaz93 changed the title removing old sample and order models removing old sample and order models pt 1 Jan 16, 2025
@@ -7,6 +7,7 @@
def is_sample_missing_capture_kit(sample: BalsamicSample, store: Store) -> bool:
application: Application = store.get_application_by_tag(sample.application)
return (
application.prep_category == SeqLibraryPrepCategory.TARGETED_GENOME_SEQUENCING
application
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this fixes a bg in the validation, if the application does not exists, the validation breaks

@diitaz93 diitaz93 marked this pull request as ready for review January 16, 2025 11:28
@diitaz93 diitaz93 requested a review from a team as a code owner January 16, 2025 11:28
Copy link
Contributor

@islean islean left a comment

Choose a reason for hiding this comment

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

Looks good!

cg/models/orders/samples.py Show resolved Hide resolved
cg/models/orders/samples.py Show resolved Hide resolved
tests/fixtures/cgweb_orders/rnafusion.json Outdated Show resolved Hide resolved
@diitaz93 diitaz93 merged commit a13c2aa into improve-order-flow-main Jan 16, 2025
9 checks passed
@diitaz93 diitaz93 deleted the old-model-cleaning branch January 16, 2025 12: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.

2 participants