All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Nothing yet.
- 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
.
- 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.
- 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'
.
- 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 isFalse
. 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
.
- 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
usecached=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
toCachedStateDB
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.
- 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.
- First release!