A streamlined workflow and GUI for real-time species identification and pathogen characterization via nanopore sequencing data. Engineered for precision, speed, and user-friendliness, with offline functionality post-initialization.
GNU General Public License v3.0
15
stars
2
forks
source link
Improved Configuration Loading and Error Handling in nanometa_live Backend #37
This pull request introduces several updates to the nanometa_backend.py script in the nanometa_live package. The primary changes focus on enhancing the configuration file loading mechanism and adding robust error handling. Below are the key changes:
Changes:
Switch to ruamel.yaml: The code now uses the ruamel.yaml library instead of the pyyaml library for loading YAML configuration files. This change offers better compatibility and control over YAML parsing.
Type Annotations: Added type annotations to the load_config function to improve code readability and type checking.
Improved Error Handling: The load_config function now has robust error handling to catch and log specific exceptions like FileNotFoundError and PermissionError. This will aid in debugging configuration issues.
Logging Enhancements: Improved the logging messages for better clarity on the configuration file loading process.
Impact:
These changes make the code more robust against possible errors related to configuration files.
Improved logging will assist in troubleshooting.
The code is now more readable, thanks to type annotations and improved function signatures.
Description:
This pull request introduces several updates to the
nanometa_backend.py
script in thenanometa_live
package. The primary changes focus on enhancing the configuration file loading mechanism and adding robust error handling. Below are the key changes:Changes:
Switch to ruamel.yaml: The code now uses the
ruamel.yaml
library instead of thepyyaml
library for loading YAML configuration files. This change offers better compatibility and control over YAML parsing.Type Annotations: Added type annotations to the
load_config
function to improve code readability and type checking.Improved Error Handling: The
load_config
function now has robust error handling to catch and log specific exceptions likeFileNotFoundError
andPermissionError
. This will aid in debugging configuration issues.Logging Enhancements: Improved the logging messages for better clarity on the configuration file loading process.
Impact: