Skip to content

feat: enhance CLI reactivity and improve module imports for performance#409

Open
alsmith151 wants to merge 2 commits into
mainfrom
feat/cli-speed-up-cli-reactivity
Open

feat: enhance CLI reactivity and improve module imports for performance#409
alsmith151 wants to merge 2 commits into
mainfrom
feat/cli-speed-up-cli-reactivity

Conversation

@alsmith151

Copy link
Copy Markdown
Collaborator

This pull request refactors the handling of the GenomicCoordinate class within the seqnado package, moving its definition from core.py to config/configs.py and updating all imports accordingly. Additionally, it introduces lazy loading for certain submodules and attributes in seqnado/__init__.py to improve CLI startup performance, and makes minor import optimizations in CLI modules.

Refactoring and module organization:

  • Moved the GenomicCoordinate class definition from seqnado/core.py to seqnado/config/configs.py, and updated all imports throughout the codebase to reference it from seqnado.config instead of seqnado.core. ([[1]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-d3b7ccc9f593a1e25acd15c69e38b11e4e4d4a67ce3ad43fe77a1486603e5962L18), [[2]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-d3b7ccc9f593a1e25acd15c69e38b11e4e4d4a67ce3ad43fe77a1486603e5962R34-R59), [[3]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-9b511b2c2ea157e741acb3db2ee8f586e800f3c9903dd18ce32c9805c28f1a05L213-L241), [[4]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-11a6e1e516ef60c7da196706db5b6e06c604f9d9247756483fa744eb461bbf81R30), [[5]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-11a6e1e516ef60c7da196706db5b6e06c604f9d9247756483fa744eb461bbf81R79), [[6]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-883a25dedb28cc2b9ac096fb965ecec2a9e94c39595c342921d1f12ae0288489R6-L8), [[7]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-a7827246b2939098782be886067e452593f2d60ce11f68963b5c30283bc7de16L20-R40), [[8]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-a7827246b2939098782be886067e452593f2d60ce11f68963b5c30283bc7de16L52-R67))

Performance and import optimizations:

  • Introduced lazy loading for the data, config, inputs, and outputs submodules, as well as the GenomicCoordinate attribute, in seqnado/__init__.py to reduce initial import time and improve CLI responsiveness. ([seqnado/__init__.pyL20-R40](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-a7827246b2939098782be886067e452593f2d60ce11f68963b5c30283bc7de16L20-R40))
  • Changed the import in seqnado/cli/autocomplete.py to reference Assay from seqnado.core instead of seqnado.inputs for faster CLI startup. ([seqnado/cli/autocomplete.pyL11-R11](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-dac371c1a164c6b26d1fea4040819c7c8e04ec9b836d40f63fde0b97c4ead432L11-R11))

CLI code improvements:

  • Moved certain imports in CLI modules (benchmark.py, pipeline.py) inside functions to avoid unnecessary imports at startup, further improving CLI performance. ([[1]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-f16a7f7683f09a511b4c66927ee96e103e34cc5b16e11c1fc2d0dad50991a85dL11-L20), [[2]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-f16a7f7683f09a511b4c66927ee96e103e34cc5b16e11c1fc2d0dad50991a85dR94-R103), [[3]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-676fb2c9491e8c429914d857bd37bf37e082a262f4c50fa0e4e6fc192a0bf718L16), [[4]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-676fb2c9491e8c429914d857bd37bf37e082a262f4c50fa0e4e6fc192a0bf718L29), [[5]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-676fb2c9491e8c429914d857bd37bf37e082a262f4c50fa0e4e6fc192a0bf718R45), [[6]](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-676fb2c9491e8c429914d857bd37bf37e082a262f4c50fa0e4e6fc192a0bf718R248))

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