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

Enhance document and DB interaction, add new functionality and improv… #20

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

glrs
Copy link
Collaborator

@glrs glrs commented Nov 19, 2024

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:

  • Added a custom logger to lib/couchdb/document.py for improved logging capabilities.
  • Added logging for error handling and warnings in lib/couchdb/manager.py to provide better insights into document processing and status updates. [1] [2]

Sample and Project Status Management:

  • Enhanced the add_sample method to include an optional flowcell_ids_processed_for parameter, allowing for better tracking of sample processing.
  • Updated the 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.
  • Introduced the update_project_status method to handle project status updates and ensure proper end date management.

Utility Methods:

  • Added get_sample_status and get_project_status methods to lib/couchdb/manager.py for retrieving the status of specific samples and projects, respectively.

Document Handling:

  • Modified the save_document method to handle existing documents by preserving the _rev field to avoid update conflicts.
  • Refactored the update_sample_status method in lib/couchdb/manager.py to use the from_dict method for creating YggdrasilDocument instances from dictionaries.…e existing code

@glrs glrs merged commit 8f99a58 into NationalGenomicsInfrastructure:main Nov 19, 2024
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