feat: enhance CLI reactivity and improve module imports for performance#409
Open
alsmith151 wants to merge 2 commits into
Open
feat: enhance CLI reactivity and improve module imports for performance#409alsmith151 wants to merge 2 commits into
alsmith151 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 refactors the handling of the
GenomicCoordinateclass within theseqnadopackage, moving its definition fromcore.pytoconfig/configs.pyand updating all imports accordingly. Additionally, it introduces lazy loading for certain submodules and attributes inseqnado/__init__.pyto improve CLI startup performance, and makes minor import optimizations in CLI modules.Refactoring and module organization:
GenomicCoordinateclass definition fromseqnado/core.pytoseqnado/config/configs.py, and updated all imports throughout the codebase to reference it fromseqnado.configinstead ofseqnado.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:
data,config,inputs, andoutputssubmodules, as well as theGenomicCoordinateattribute, inseqnado/__init__.pyto reduce initial import time and improve CLI responsiveness. ([seqnado/__init__.pyL20-R40](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-a7827246b2939098782be886067e452593f2d60ce11f68963b5c30283bc7de16L20-R40))seqnado/cli/autocomplete.pyto referenceAssayfromseqnado.coreinstead ofseqnado.inputsfor faster CLI startup. ([seqnado/cli/autocomplete.pyL11-R11](https://github.com/Milne-Group/SeqNado/pull/409/files#diff-dac371c1a164c6b26d1fea4040819c7c8e04ec9b836d40f63fde0b97c4ead432L11-R11))CLI code improvements:
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))