When revng cli was invoked with a bare namespace, e.g. `revng ptml`
it would produce an ugly exception.
Fix this behavior by instead rerunning the command with `--help`
appended.
This commit introduces some miscellaneous fixes to revng.cli:
* Remove useless subclasses in pipeline_tools.py;
* Improve type annotations in _commands/ptml and fix a help string;
* Add some extra type annotations for `Command`;
* Remove useless namespaces in `commands_registry` and add help text
for the ones in use;
Rework both classes in schema_generator.py, main changes:
* Drop manager.pipeline_artifact_structure as it was used exclusively
by SchemaGenerator and is no longer needed
* Rename SchemaGen and BindableGen to SchemaGenerator and
DynamicBindableGenerator to better express their role, add
docstrings that explain what they do
* Decouple Artifacts and Analyses discovery, since a step can have
analyses and no artifacts (and vice-versa)
This Oython tool will be used to easily work with PTML.
It currently features two subcommands:
* `cat` prints a PTML to the terminal, with color formatting if
possible;
* `strip` will strip a file of the PTML markup;
revng.model.__init__ would dynamically import the latest version of
the model when imported, however this would break IDE hints as the
classes would not be properly detected. Instead we now manually
specify the last version in the __init__.py file.
Add a specialized list class to be used in the model. This will do
runtime instance checking to make sure that list-like fields in the
model only contain object of the correct type.
Implement a constructor override for model classes that checks that the
constructor does not have positional arguments passed to it. This can
be dropped post-3.10 since it is implemented natively by kw_only.
A step's artifacts now include singleTargetFilename, which gives a
suggested filename to use when a single element is extracted from the
underlying container.
When requesting a produce for multiple targets the result will be a
dictionary mapping "<target>:<result>". This also changes the GraphQL
API where a json-serialized string is returned.
In typical scenarios most PipelineC calls block for too long, this is
debilitating to the GraphQL API since coroutines are run
cooperatively. This commit moves all PipelineC calls in a separate
thread.
`recalculateAllPossibleTarget` is now a private member of
PipelineManager This was done since all calls that can trigger a change
in the target list have been isolated and the call is done implicitly.
This removes rp_manager_recompute_all_available_targets from PipelineC,
since it was added as a stopgap until the above was implemented.