Releases: guludo/yape
Releases · guludo/yape
0.3.0
0.3.0 - 2023-03-02
Added
- Added support for type hints.
Node
can now be used for generic type hint. Example:Node[str]
represents a node that will have astr
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 runningyape
.
Changed
- BREAKING:
run()
now uses the parametercontext
now and dropped the
parametersns
,cached
andcache_path
. If you used those, you should
pass aYapeContext
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
0.2.0
0.2.0 - 2021-12-02
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.
- You can use
- 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
orpython -m yape
.
Changed
- BREAKING: Renamed parameter
graph
ofNode
constructor toparent
.
That way, we have bothNode
andGraph
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 consequentlyyape.run()
) use the global graph by
default now.MingraphBuilder
(and consequentlyyape.mingraph()
) use the global
graph by default now.
- BREAKING: default cache directory changed to
.yape/cache
. - BREAKING:
Runner
(and consequentlyyape.run()
) now use cached node
state by default. In order to keep the behavior of0.1.0
use
cached=False
when callingyape.run()
. - BREAKING: as a result of adding the parameter
name_prefix
toNode
,
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 beingFalse
, 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.