DEpt-metagenom / MetagenoMongo

1 stars 2 forks source link

flask:2024-08-26 #26

Closed iwmstjp closed 2 months ago

iwmstjp commented 2 months ago

Summary by Sourcery

Enhance data validation by ensuring unique combinations of SampleID, run_directory, and barcode. Improve error handling in the Flask app for environment variables and file operations. Update the HTML template to display validation results. Add a README.md with setup and usage instructions.

New Features:

Enhancements:

Documentation:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request implements several changes to improve data validation, error handling, and user experience in a Flask-based web application for metagenomics data processing. The changes include enhancing the validation process for sample IDs, adding new fields for validation, improving error handling for file uploads and environment variables, and updating the UI to display results.

File-Level Changes

Change Details Files
Enhanced data validation for sample identification
  • Replaced single sampleID validation with a combination of sampleID, run_directory, and barcode
  • Added checks for empty values in sampleID, run_directory, and barcode fields
  • Implemented uniqueness check for the combination of sampleID, run_directory, and barcode
flask-version/metagenomongo/module/validation.py
Improved error handling and environment variable management
  • Added try-except block for retrieving the FLASK_SK environment variable
  • Implemented checks for META_KEY_PATH environment variable
  • Updated file transfer process with better error handling and logging
flask-version/metagenomongo/app.py
Enhanced user interface for displaying results
  • Added a new div element to display error messages and data results
  • Implemented Jinja2 template logic to iterate through and display results
flask-version/metagenomongo/templates/index.html
Added README file with setup and usage instructions
  • Included steps for cloning the repository
  • Listed required Python libraries and their versions
  • Provided instructions for running the application and accessing it
  • Added optional setup information for email and remote server file saving functions
flask-version/metagenomongo/README.md

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.