Coding 2022-11-27
I started putting together dummy instances of the various protocols that need to be implemented for a new MOTR... um... middle-end? There are two directions to go from here:
- Let's see what's absolutely necessary from looking at the existing modules for wrapping third-party utilities.
- If it's a little inconvenient and fiddly for me to implement this stuff in an internal testing library, it'll be so much worse for hypothetical third-party maintainers.
Now, I'm not imagining that anyone else is going to want to use MOTR—certainly not in its current state, and, in terms of simple probability, probably not after I've tried to polish it up some—but the entire point of MOTR is for me to get deep into its guts for the past few years or whatever, so I can avoid going to the same effort for other projects.
A quick review of the general user profiles:
- Someone who doesn't care about any of the internals; some other project is using MOTR, and they rely on the maintainer to work out how it should all fit together, and document any quirks of usage.
- A project maintainer, who should be able to write a concise motrfile from built-in and third-party wrappers, which provide well-defined extension points for things like plugin arguments.
- A wrapper developer, who should be able to write straightforward wrappers around third-party utilities. (The current state of the wrappers shows the "straightforward" part to be, um, deeply aspirational.)
- Me, who is secretly all of the others as well.
The problem with the current api module is that it's approximately the motrfile helper code that you need if the wrapper code does not exist, which it didn't at the time, but now it does. Mostly.
Anyway, I think in order to move forward, I'm going to want some kind of separate modules for the two use cases. Ideally, the built-in wrappers can simply use the module for third-party wrappers.
Something like...
- Here is a module that allows you to define environments and installers
- Here is a module that allows you to write wrappers around Python scripts
- Here is a module that allows you to write a motrfile using wrappers
And the existing monolithic folder that contains basically all of that needs to be split up.
I'll look into that after I've gotten coverage properly up. For now, I want to finish this entry before it gets really late.
Good night.