Commit Graph

15 Commits

Author SHA1 Message Date
Giacomo Vercesi f19da8b440 pype project analyze: output invalidations
Add a command-line option to `pype project analyze` that allows
serializing the invalidated objects of an analysis to yaml on disk.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 8f2d0191d7 Pipe: add needed_files functions
In preparation for debugging individual pipes add an additional method
to the `Pipe` interface, `needed_files`, which allows the pipe to
statically report which files it will request ahead of time.
2026-01-29 14:54:24 +01:00
Giacomo Vercesi eefdca934b pypeline: give better names to some attributes
Rename some attributes of pypeline objects to better-suited names:
* `TaskArgument.to_container_decl` -> `TaskArgument.declaration`
* `PipelineNode.arguments` -> `PipelineNode.argument_declarations`
* `PipelineNode.arguments_with_access` -> `PipelineNode.arguments`
2025-12-19 10:26:49 +01:00
Giacomo Vercesi cd3cd5c4d1 pypeline: fix Request.check
The function `Request.check` did not work properly due to
`Container.contains_all` performing the check with the operands swapped.
Fix the call and improve the body of `ObjectSet.issubset`.
Also improve the error message, highlighting the missing objects.
2025-12-10 15:05:53 +01:00
Giacomo Vercesi b1b5778822 Add infrastructure for custom invalidation
Add infrastructure to pypeline to allow for pipes to provide custom
invalidation, by implementing an `invalidate` function.
2025-11-26 16:13:28 +01:00
Giacomo Vercesi 4a1edec018 get_registry: use name for selected classes
Use the `name` class attribute to build the registry when discovering
subclasses of `Pipe`, `Analysis` and `Container`.
2025-11-26 14:59:43 +01:00
Giacomo Vercesi 000d75dbb7 pypeline: add check_precondition to Pipe
Add the `check_precondition` function to the `Pipe` class. This will be
run before the actual schedule creates containers and runs itself
proper.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 38921a182c Pipe: drop incorrect assertion
In `prerequisites_for`, if a pipe has a container in `READ` then it
needs to be forwarded backward, not asserted on.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 5a530e66dc Savepoint: optimize run function
Optimize the `run` function to skip objects that have just been
serialized when deserializing objects for outgoing requests. For
example, previously if a schedule had for a savepoint:

```yaml
incoming: ["/binary"]
outgoing: ["/binary"]
```

then the `Savepoint.run` function would have first serialized the object
into storage and then deserialized it right after, instead with the new
function the object is only serialized.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 94e9712927 Requests: add overloaded get
Overload the `get` function of `Requests` so that, in addition to the
usual `Mapping` behavior, will return an empty `ObjectSet` if no default
is specified.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 2875565b9f Pipeline: show minimized request on assertion
When asserting that a request should be empty, show a minimized version
with all the empty members removed, for ease of reading.
2025-11-17 10:04:13 +01:00
Giacomo Vercesi 32fd86d33a Pipe: drop name argument in constructor
Having a pipe's name different from its class name is useless, drop the
feature entirely.
2025-11-17 10:04:12 +01:00
Giacomo Vercesi b622fe8f19 Implement FileProvider interface
Implement the `FileProvider` interface, this allows pipes to request
files given a `FileRequest` (hash and optional size/name).
2025-10-16 17:48:45 +02:00
Giacomo Vercesi 688b9fe111 Introduce compatibility with revng-pypeline
Add the necessary machinery to allow `Pipe`s, `Analysis`es,
`Container`s, `Model` and `ObjectID` to be implemented in C++ and used
by Python.
2025-09-17 14:02:40 +02:00
Tommaso Fontana 80eb02c207 Pypeline: merge pypeline 2025-09-10 12:05:15 +02:00