Coding 2022-03-23

By Max Woerner Chase

Screw waiting for things.

I think I've got nearly everything I need for wrapping command lines, so let's go.

I'm starting with flake8. For reference, here's the general command again:

flake8 --format=html --htmldir <generated path> --isort-show-traceback <path to root>/src <path to root>/tests

And it has requirements like:

The majority of these plugins don't require anything except to be installed. If we divide those up, with the ones that need special handling first...

And, everything else:

I bet I could convert that one command-line flag for flake8-isort into a bit of flake8 config, which would give me a bunch of things that merely need to be installed. I don't have a strong sense for what would be better for people who aren't me, but moving stuff from the command line into the config files certainly makes things easier within a repository.

(Source: I couldn't figure out why I was getting weird errors from running mypy directly instead of through MOTR, until I figured out that I could convert some static environment variable stuff I was doing into a config line.)

With that in mind, all I really need to code is handling for flake8-html, and everything else should probably get some kind of generic something.

This does raise the question, is there anything else in the motrfile I can do this to?

So, pytest has output stuff which needs to integrate with the higher-level abstractions, and some stuff that might or might not be needed in the automated case, but definitely isn't needed if you're invoking it manually, so, eh.

Looks like coverage has some stuff in the HTML output that it probably makes more sense to live in config.

Oh no, I just remembered that I think some of the coverage configs need to be generated on a per-command basis. Hm, that's going to be workable, but also confusing. Or maybe I can put it all together at once in some way...

In any case, the immediate goal is to figure out how to best collect together this kind of "just install a package" stuff that's so common. It's getting late, so let's just see about some quick plans:

Anyway, I'll have time later to think about this. For now, I'm getting pretty tired.

Good night.