Change project's status
to project_status
| Add ngi_report and de…
#38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
YggdrasilDocument
class inlib/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:
status
toproject_status
and added initialization forngi_report
anddelivery_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:
add_sample
method to set default values forstart_time
andQC
, and addeddelivered
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)
)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)
)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)
)set_sample_qc_status
andmark_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:
update_project_status
andcheck_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:
add_ngi_report_entry
,add_delivery_entry
,get_delivery_status
, andset_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