Enhance document and DB interaction, add new functionality and improv… #20
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 significant updates to the
lib/couchdb
module, focusing on improving logging, enhancing sample and project status management, and adding new utility methods. Below are the most important changes:Logging Enhancements:
lib/couchdb/document.py
for improved logging capabilities.lib/couchdb/manager.py
to provide better insights into document processing and status updates. [1] [2]Sample and Project Status Management:
add_sample
method to include an optionalflowcell_ids_processed_for
parameter, allowing for better tracking of sample processing.update_sample_status
method to log an error if the sample is not found and to refine the status update logic for different processing states.update_project_status
method to handle project status updates and ensure proper end date management.Utility Methods:
get_sample_status
andget_project_status
methods tolib/couchdb/manager.py
for retrieving the status of specific samples and projects, respectively.Document Handling:
save_document
method to handle existing documents by preserving the_rev
field to avoid update conflicts.update_sample_status
method inlib/couchdb/manager.py
to use thefrom_dict
method for creatingYggdrasilDocument
instances from dictionaries.…e existing code