Coding 2022-05-23

By Max Woerner Chase

Well, I basically had "Objective: Survive" for today, and I did that, so, it's time to relax and wait for the air outside to cool off.

While I wait, let's see if I can take some quick notes on MOTR. Yesterday, I determined that ParametricCommand.build() should take a ValueAdaptor[PathWith[EnvironmentArgs]].

Now, the flip side of that is that the corresponding Label needs to be populated in the Registry. Right now, Registry population looks like yield from api.cli.build.build(package_data). And creating the information that would be stored in the label looks something like py = api.cli.flake8._installer.PathWith(pathlib.Path(), api.cli.flake8._pip.VirtualenvArgs()). Please ignore the encapsulation violations I stuck in there because I don't want to think about that part of the API yet. To get things up and running, I need a helper function that creates a vector of that kind of data, and to have an idiom for adding that data to the Registry.

Something that occurs to me, looking at this code, is that it might make sense to separate the current changes() implementation into a Callable[[Sequence[Parametric[None]], Requirements[Registry]], Requirements[None]], or something like that. Basically, indicating "It's not expected that instantiating Parametrics be interleaved with building the Registry." That kind of reorganization is only appropriate after I've written some more tests, and I want to fix up the tests that I have, first.

Anyway, I think the last piece of the puzzle is the implementation of the ValueAdaptor[PathWith[...]], and that should just be return path_with.path. So, I just need a function to bundle that up with a Label, and that should be the whole plan to get this working.

I can't work on it now, because the air is soup.

Good night.