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

Change project's status to project_status | Add ngi_report and de… #38

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

glrs
Copy link
Collaborator

@glrs glrs commented Jan 23, 2025

This pull request includes several changes to the YggdrasilDocument class in lib/couchdb/document.py. These changes focus on improving the handling of project status, sample management, and delivery information. The most important changes include renaming and restructuring project-level fields, adding new methods for sample and delivery management, and updating project status logic.

Project-level fields and restructuring:

  • Renamed status to project_status and added initialization for ngi_report and delivery_info fields with default values. ([[1]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL38-R56), [[2]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL59-R80), [[3]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL76-R104))

Sample management improvements:

  • Modified add_sample method to set default values for start_time and QC, and added delivered field. ([[1]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL92-R114), [[2]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL125-R172))
  • Added get_sample method to retrieve a specific sample by its ID. ([lib/couchdb/document.pyL125-R172](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL125-R172))
  • Enhanced update_sample_status method to handle more statuses and log errors if the sample is not found. ([lib/couchdb/document.pyL141-R235](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL141-R235))
  • Added methods set_sample_qc_status and mark_sample_as_delivered to update sample QC status and mark samples as delivered, respectively. ([lib/couchdb/document.pyL141-R235](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL141-R235))

Project status logic updates:

  • Refactored update_project_status and check_project_completion methods to improve project status handling and ensure consistent updates. ([[1]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL141-R235), [[2]](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL203-R354))

NGI report and delivery information management:

  • Added methods add_ngi_report_entry, add_delivery_entry, get_delivery_status, and set_delivery_status to manage NGI reports and delivery information. ([lib/couchdb/document.pyL203-R354](https://github.com/NationalGenomicsInfrastructure/Yggdrasil/pull/38/files#diff-201fc53ce0b6c824f9bcc19ecfa639daa862338f6aebddd3fb8b31105a82d5fdL203-R354))…livery support methods | several improvements

…livery support methods | several improvements
@glrs glrs merged commit 0663593 into NationalGenomicsInfrastructure:main Jan 23, 2025
3 checks passed
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.

1 participant