Refactor utility modules and test_utility.py #350
Labels
maint:refactor
Simplifying or restructuring existing code or documentation.
type:maintenance
Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs
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:
utility
orutilities
to store all *_utils.py filestest_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))__init__.py
file. That way at least I could import them all asfrom utils import get_Something, getAnotherthing
. Another idea could be to generally reduce the number of sub-modules for utility methods to something more manageable. (Originally posted by @surchs in [ENH] Updatebagel bids
to handle JSONLD inputs incl. derivative metadata #356 (review))The text was updated successfully, but these errors were encountered: