Yape

Latest version: v0.3.0

Safety actively analyzes 627423 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

Added
- Added support for type hints.
- `Node` can now be used for generic type hint. Example: `Node[str]`
represents a node that will have a `str` as result.
- The class `YapeContext` was added.
- Implemented framework for resource I/O in nodes. A provider for "path
resources" was implemented.
- Added decorator `yape.node`.
- Caching: modules can now be part of a node descriptor.
- Functions can use nodes directly in their bodies now.
- Recursive structures are now possible in values.
- Added new CLI subcommand: `yape deps`.
- It is possible (and recommended) to define nodes inside a `nodegen()` function
in the entrypoint module when running `yape`.

Changed
- **BREAKING**: `run()` now uses the parameter `context` now and dropped the
parameters `ns`, `cached` and `cache_path`. If you used those, you should
pass a `YapeContext` object using the equivalent parameters.
- **BREAKING**: `yape list` now only lists nodes that have been explicitly
named. The flag `--all` must be used to list all nodes.

0.2.1

Fixed
- Fixed wrong Python import in `climodule` that was cause the following error
when calling Yape from command line:
`AttributeError: module 'importlib' has no attribute 'util'`.

0.2.0

Added
- Parent directories for pathouts are created if necessary.
- It is possible to create nodes that run commands with `yape.cmd()` now.
- In cached mode, Yape also checks for existence of output paths now.
- `Node` has a new parameter: `name_prefix`.
- New parameters for `run()`:
- You can use `force=True` to force execution of target nodes by passing
- You can use `return_results=False` to ignore the results of target notes.
This is useful to avoid reading data from the file system when using a
cached namespace.
- New parameters for `CachedStateDB`:
- `hash_paranoid`: defines if an extra step of comparing the content of node
descriptors is applied after matching the SHA256 hashes. The default is
`False`. This is useful when we do not want to load the saved descriptor
from the file system.
- Yape can now be used from the command line, either via `yape` or `python -m
yape`.

Changed
- **BREAKING**: Renamed parameter `graph` of `Node` constructor to `parent`.
That way, we have both `Node` and `Graph` using the same parameter name
for the graph containing them.
- **BREAKING**: Nodes and graphs have the global graph as parent by default
now. `no_parent=True` must be used if it is desired for the object not to
have a parent.
- **BREAKING**:
- `Runner` (and consequently `yape.run()`) use the global graph by
default now.
- `MingraphBuilder` (and consequently `yape.mingraph()`) use the global
graph by default now.
- **BREAKING**: default cache directory changed to `.yape/cache`.
- **BREAKING**: `Runner` (and consequently `yape.run()`) now use cached node
state by default. In order to keep the behavior of `0.1.0` use
`cached=False` when calling `yape.run()`.
- **BREAKING**: as a result of adding the parameter `name_prefix` to `Node`,
we changed how nodes created for callable objects get their default names:
the numbered suffix might change in your environment when using this new
release.
- **BREAKING**: with the inclusion of the parameter `hash_paranoid` to
`CachedStateDB` and its default value being `False`, the new default
behavior is not to check the equality of the node descriptors and trust the
hashed values when they match. The previous default behavior was to also
check the equality of node descriptors.

Fixed
- Output paths are now regenerated by running the node again in case their
modification time is later than the last time the node ran. This fixes the
case when a node is run with a set of dependencies, then again with a new
set, and finally again (but this time skipped) with the first set of
dependencies. Without this fix, the output path would contain be the file
from the second run.
- Using type hints compatible with Python 3.8.

0.1.0

Added
- First release!

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.