Coding 2021-12-25
Earlier today, I wrote some decorators to make it easier to create InputAccumulators and ValueAdaptors. Typing them was a bit obnoxious, and I was tempted to put together some helper types, but I decided against it for now.
Right now, I need to check over how this code could be used, and see if I need more helpers. I'm feeling a little out of it at this point, unfortunately, so I'm just going to take a few notes.
- Currently, I have separate Dynamics for the src and tests directories for flake8. For now, I should merge them into one.
- I'm missing the class to combine a ValueAdaptor with the Dynamic using the keys... Actually, since these Dynamics could theoretically use multiple keys, I guess what I want is to replace the current decorator invocations with something that takes ValueAdaptors...
Note to my future self: this isn't redundant with the path_segments concept, because that controls the virtual environment path, and it's possible to reuse virtual environments for different commands. Okay? Okay. Good.
Anyway, I guess the ultimate form of this is something that looks sort of like the Command interface, but augmented with InputAccumulators and ValueAdaptors. I'm imagining something that takes one Command argument, some number of possibly value-adapting Dynamic Options of the same Program type, and also possibly some InputAccumulators, as well as an optional keyword argument to invoke a module with the same general types. I really hope this is the last level of abstraction I end up layering on top of all of this, but I guess we'll see!
Anyway, I'll try to put this all into practice next week. Handling:
- New argument types
- Accumulating off the ValueAdaptor data
- Making sure I'm right about the order this all happens in, because I think I can generate the final Dynamic for a command without instantiating it, and thereby extract a flex input to convert to an output from a previous command.
(So, setting up coverage looks like "generate command with no deletion dependencies, extract the coverage output, convert it to a deletion input, then pass that output version to the erase and the input version back to the original command to create the true final version". Eugh.)
Good luck with whatever you're working on. I'm certainly going to need it to get through this.
Good night.