16 Commits

Author SHA1 Message Date
Giacomo Vercesi a68c53cbb0 pypeline.cli: drop PypeGroup
The `PypeGroup` click group did not provide any real benefit:
* It added extra help about pipebox arguments, but text that was not
  correct from where the help was coming from (the group does not parse
  the arguments). The subcommands still reports it though.
* It forbid using non-PypeGroup and non-PypeCommand commands in the
  command tree, but in the long run this is desirable so it should be
  dropped
For these reasons it has been dropped.
2026-05-22 09:04:35 +02:00
Giacomo Vercesi 18e3501731 pypeline: implement proper config parsing
Overhaul the pipeline configuration logic by collapsing all dynamic
configuration options, both for analyses and pipes into a single
dictionary. Change all the interfaces so that there is no longer
distinction between the configuration of an analysis and of pipes.
Expose these options to the command line via `--{name}-configuration`
options for each pipe/analysis that is applicable to the command-line
invocation.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 9fd3077081 pype: adopt option group for wrappers
Group all the wrapper options (`--lldb`, `--gdb`, etc.) in an option
group, so that they are rendered in an indented section.
2026-04-10 11:45:12 +02:00
Giacomo Vercesi 4c6436f7b2 pypeline: introduce artifact category
Add categories in the pipeline, allow an artifact to have a category
specified which allows it to be shown or hidden by default. Adapt the
CLI tools to hide artifacts of the category that don't
`show_by_default=True`.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi 773245b893 pypeline/cli: use dataclass for ctx.obj
Add typing to the `ctx.obj` object used to store pypeline-specific data
while parsing the command-line in click.
2026-03-31 17:00:48 +02:00
Giacomo Vercesi d7e605fe63 pypeline: add debug mode
Add the functionality the the pipeline infrastructure and CLI to run
individual pipe and analyses as subcommands instead of in-process. This
allow better debuggability of individual pipes.
2026-01-29 15:00:12 +01:00
Tommaso Fontana b7cf7d3266 Pypeline: add pype tests
Add some basic tests for the pype CLI command.
2025-11-24 16:41:15 +01:00
Tommaso Fontana 4e73bc05f3 Pypeline: fix pipebox args usage string on cli
The usage strings didn't always show '-- [PYPEBOX ARGS...]' or didn't
show it at the end of the usage string. This commit fixes it.
2025-11-24 16:41:15 +01:00
Tommaso Fontana 9f5ca81401 Pypeline: introduce analysis lists
Now in the pipeline.yml you can specify lists of analysis that are run
sequentially.
2025-11-24 16:41:15 +01:00
Tommaso Fontana fe3a5b6287 Pypeline: add --tar, --yaml to pype commands
Now commands 'pype project artifact' and 'pype pipeline run_pipe' now
accepts --format to specify in which format to serialize the resulting
container, and have --tar and --yaml shortcuts. Moreover, these commands
and 'pipe pipeline run_analysis' can automatically figure out the format
of containers so the user won't have to specify them most of the time.
2025-11-24 16:41:15 +01:00
Tommaso Fontana 8ae70d85d4 Pypeline: replace logging with custom log
Now the pype command has a `--verbose` argument that to enable debug
logging in the pypelien code.
Adapted the codebase to use this new logging format but replacing
`logging` with `revng.pypeline.utils.logger`, this is done in
preparation of debug-log.
2025-11-11 17:15:28 +01:00
Tommaso Fontana 639593164a Pypeline: add autocomplete and refactor CLI
Now pype has an `autocomplete` command usable to enable autocompletion
and revng2 now is based on `pype`, modifying its defalults and
injecting new commands.
2025-11-11 17:15:27 +01:00
Tommaso Fontana 652ffbb0f7 Pypeline: remove abbreviations, normalize quotes 2025-11-11 17:15:27 +01:00
Giacomo Vercesi c022c51b12 run_pipe.py: normalize arguments with kwargs
When click calls the command handler functions, dashes are converted to
underscores to work with the variable name limitations of python. When
accessing kwargs, convert the argument name to the underscored version.
2025-10-16 10:30:01 +02:00
Giacomo Vercesi a1a38cf66d pypeline/cli/utils.py: fix wrong Kind usage
`Kind` objects do not have the `__name__` attribute, use the
`deserialize` function instead.
2025-10-15 11:58:11 +02:00
Tommaso Fontana 80eb02c207 Pypeline: merge pypeline 2025-09-10 12:05:15 +02:00