Coding 2023-04-15
Okay, so, the next thing to work on is updating parametric_command to use the new class I threw together. I could try working methodically through the file, or making changes at random until Mypy stops yelling at me.
Or, I could try simulating that, but describing the code changes instead of trying to actually make them all at once.
- Let's start with the definition of Part. Part now has to involve _parametric.AdaptiveParametric[BlahBlahBlah]. This requires a minor and obvious change to the _optional_parametric helper. In addition...
- There is a method called _selections(). The inside is going to change, but also the return value, so we're going to have to look at how it's used. Its usage ultimately ends up as an argument to _build(), where it is eventually passed into... _optional_parametric. Huh. Insert le funny Gandalf meme here.
- Within _optional_parametric, this value is only used to pass to Part.build() by specifically extracting the values from it...
- In there, it's passed to Artifact.convert().
At this point, I kind of lose the plot, because this somehow diverts it through seemingly every part of the artifact module.
...
I think it mainly ends up on the Input type, which passes it back out via exposed_selections(). Which is used for Part.selections(). Which comes back to _selections().
Let's assume we should be replacing MapOverSelection with Parametric[PathStr].
This represents a change in semantics in some fashion, but let's assume the way to update a sequence of these is to filter out incoming duplicates. Maybe look into making callable types for the various Parametric changes, so duplicates can be checked for structurally...
I'll look into trying to do this, maybe in the next few days, maybe next week. We'll see.
Good night.