-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor utility modules and test_utility.py #350
Comments
@surchs, does the issue description make sense to you? |
Looks good @alyssadai. So the goal would be to have a single module |
Actually, I would prefer to still import each set of utilities separately, for better organization and clarity on where functions are defined. At the moment, utility functions live in different I would have a directory structure like: bagel/
utils/
__init__.py
pheno_utils.py
bids_utils.py
...
... and then import them like: from utils import pheno_utils as putils since usually all the utilities used by a CLI command are used together. Importing utility functions one at a time would be unnecessarily verbose, I think, and make it harder to see from a given part of code where the function is defined. |
🚀 Issue was released in |
We have a growing number of *_utils.py modules for organizing utility functions shared across or specific to CLI commands. Currently, all these utility modules live in the same top-level directory as the main app (cli.py).
Meanwhile, we have a single test suite for all util functions, which is getting pretty big.
To better organize these util functions and their tests, we should:
utilities
package to store all *_utils.py filesutility.py
tomodel_utils.py
for more specificitytest_utility.py
into util-specific test modulestest_generate_context()
since it replicates logic of function being tested and is hard to maintainpipeline-catalog
submodule #349 (comment))The text was updated successfully, but these errors were encountered: