Coding 2022-06-06
All right, let's see what kind of common functionality I can pick out of these four-to-six modules...
Common things include:
- The Label object for representing pip args
- Specifying which type of entry point for the command
- Putting this information together into a Command object
- The Label object for representing python versions to install a set of packages under
- Turning that label into a ValueAdaptor
- Subclassing _program.Program
- Putting together the Command, a helper function, and allowed exit code data into a python_helpers.CommandBuilder
- Designating the reports prefix
- Designating a directory within a reports prefix
- Labeling that directory
- Creating an output file under the labeled path, using some basically-identical function implementations
- Assembling everything into a Part object of some kind
The remaining bits of unique code are sooooort of hacks around inadequacies in the high-level design. It should be possible to streamline some of this code by creating helper functions to put together ValueAdaptor instances given a starting path.
It also kind of seems like it would make sense to bundle together the reducer function and initial value arguments to the reduce_parameterization helper. I've also got the urge to break up the parametric.py module into several smaller modules, and convert the nested function definitions into classes with __call__ methods, but I'm not quite sure there's a concrete objective that would be satisfied by doing that, so I'll hold off on that for now.
In any case, it's late, and I'm tired, so I'm just going to kind of... end this post now.
Good night.