Make a few changes in the toplevel src dir to help separate
templates from code. Specifically, we rename `src/mako` to
`src/generator`, and nest the mako templates inside a
`src/generator/templates` dir.
This isolates most Python code into the `src/generator/lib` dir.
* Update imports to use fully qualified module name
* Add `typecheck` target to Makefile
* Add type annotations to appease pyright
* Switch from importlib_resources backport library to stdlib
import.resources
Sort and format JSON files to remove/minimise any diffs between
update-json runs. This also acts as a JSON validator to error when the
downloaded JSON file has been truncated.
There are no per-program-type docs clean, just made it depend on
docs-all-clean.
Also added the `docs-api|cli` target to the generated per-program-type
make help. It was just missing, even though it existed.
Previously we put cli.py into the common lib folder, which caused the
API to be regenerated and rebuilt whenever we changed code that will
only affect the CLI, causing terrible turnaround times.
Now the dependency is fixed.
It can be selected for each type of program we want to build, and makes
sense for everything that is not a library.
We also tried to unify names and folders a bit more, even though there
certainly is more work to be done to be fully non-redundant.
Fixes#43
This allows us to build efficiently. CLI programs can now have their
own cmn.rs implementation, which we can test standalone with
`cargo test`.
The primary makefile currently just explicitly pulls in the type-*.yaml,
one day we could possibly put it into a loop.
Fixes#11
We will now keep marker files to remember which crates we have published
successfully. These files are checked in to make this information
persist.
NOTE: We still don't explicitly exclude pseudo-changes in json files,
which are no real change except for a changed revision number.
Fixes#41
This file is completely generated, and allows us to easily bring in
new versions after each json update.
To make that work, we simple merge all data handed to mako-render,
inside of it. That way, we can put 'api/list' data in any yaml.
Everything we have, feature wise, is now documented in a first version
at least.
We shall keep this uptodate with what we are implementing, which also
helps figuring out a good api.
Previously, they were in an extra, oddly named crate.
Now we just make it a part of our generated codebase.
That way, traits, and common code, shows up as part of the library.
Fair enough.
This also means that the types ar not reusable.
Maybe a mixed-mode can be used if that is desired.