Changelog¶
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.
Unreleased¶
Fixed¶
Fixed readthedocs.org documentation build now requiring a .readthedocs.yaml config file
0.3.0 - 2024-04-23¶
Added¶
Added a new
doc
property to recipes that provides a documentation string for the recipe. If not provided upon creation of a recipe, alkymi will try to infer the documentation string by parsing the bound function’s docstringAdded a new optional
doc
argument to thearg
recipe that provides a documentation string for the argument
Changed¶
stderr
is now streamed by default when using theutils.call()
utility function #42When utilizing the
Lab
command line interface, alkymi will now omit alkymi internals from tracebacks resulting from exceptions raised by user code (recipes)Refactored the
Lab
command line interface to provide rich information by making use of the newdoc
property onRecipe
andarg
instancesChanged the allowed arguments to
brew X
to only contain arguments that affect recipeX
Fixed¶
Remove unnecessary decimal points in fancy progress output #42
Fixed a bug where the terminal cursor would disappear if an exception was thrown during execution
Fixed a bug where the terminal cursor would disappear if a
Lab
call tobrew
was terminated using ctrl-cFixed a bug where recipes returning
None
(no return value) would not be correctly cached on subsequent runsFixed CI pipeline integration with codecov.io (test coverage)
Fixed CI pipeline execution on MacOS agents
Removed¶
Removed the ability to brew multiple recipes from a
Lab
by listing them in succession
0.2.1 - 2023-04-27¶
Fixed¶
0.2.0 - 2023-04-10¶
Added¶
Added
rich
as a runtime dependencyAdded fancy progress output mode that shows a summary of the execution at the bottom of the console using Rich.
Added support for Python 3.11
Changed¶
Rewrote parallel execution to only run bound functions in parallel, but use asyncio for the main execution logic
Bumped
mypy
version to1.2.0
(only used for development)Bumped
coverage
version to6.4.2
(only used for development)
Fixed¶
Fixed a bug where a deadlock could occur when evaluating a number of
ForeachRecipes
with the same number of jobsFixed a bug where a certain graph configuration could prevent parallelization from happening correctly
Fixed a regression where all cached recipe outputs would always be loaded during execution, regardless of whether they were needed to produce the requested output.
Removed¶
Dropped support for Python 3.6
0.1.0 - 2023-03-07¶
Added¶
Added
networkx
as a runtime dependencyAdded support for parallel execution - the
brew()
function now takes ajobs
parameter that controls parallelization of the recipe evaluation.Added support for parallel execution to the
Lab
CLI - use--jobs
or-j
when callingbrew
to run pipeline in parallelAdded
twine
andwheel
todev-requirements.txt
Changed¶
Rewrote the internals of alkymi to create and use a
networkx
graph (DAG) for execution. This change will enable future changes, like running recipes in parallel.Renamed
alkymi.py
tocore.py
Converted
ForeachRecipe
to have the same functional interface as a regularRecipe
. This change enables the functions incore.py
to not have special handling forForeachRecipe
, which makes the code simpler and easier to maintain.Coverage step
labfile.py brew coverage
will not print which lines lack test coverageThe
invoke
andinvoke_foreach
functions have been moved fromrecipe.py
andforeach_recipe.py
intocore.py
to allow more control over the execution flow.
Removed¶
Removed the special
MappedInputsDirty
status, which only applied toForeachRecipe
. If aForeachRecipe
has only completed a partial evaluation of its enumerable input, its status will now showInputsChanged
instead.
0.0.7 - 2022-12-02¶
Added¶
Added a
file_checksum_method
config option that can be used to select whether to use file content hashing (default) or file modification timestamps for calculating the checksum of an external file represented by aPath
object
Fixed¶
Fixed a bug where CLI arguments containing a hyphen would not be parsed correctly when used in a
Lab
Fixed a bug where the implementation of coverage in
labfile.py
would break the debugger for the entire script. Now only thecoverage
steps breaks debugging (which is expected, since coverage replaces the tracing function used by the debugger)
Changed¶
Made the
call()
utility function print program outputs (stdout) to stdout by default - this can be controlled using theecho_output_to_stream
argument.
0.0.6 - 2022-05-17¶
Added¶
Added py.typed file to signal to downstream user’s that alkymi has type annotations
Added optional dependency on xxhash to speed up hashing of large files (
Path
objects outside of alkymi’s cache)Added option to supply ingredients to a recipe by using argument names that match recipes (ala pytest’s fixtures)
Added support for explicit naming of recipes (if not provided, the bound function name will be used)
Added support for providing CLI arguments to recipes through a
Lab
using the newregister_arg()
functionAdded tests for the
Lab
class
Changed¶
Updated Sphinx and associated packages to fix documentation build errors
Updated development libraries (pytest, coverage, sphinx, mypy, flake8)
Made the
call()
utility function print error stack traces to stderr by default - this can be controlled using theecho_error_to_stream
argument.
Fixed¶
Fixed a bug where file names were not taken into account during checksumming (only file content was taken into account)
Fixed a bug where a recipe’s cache path would be different when a script was invoked as a relative or absolute path
Fixed a bug where item validity was not being taken into account in
ForeachRecipe
(e.g., an invalid Path such as a deleted file would not cause reevaluation)Fixed a bug where a
ForeachRecipe
wouldn’t be completely reevaluated if its bound function changedFixed a bug where changing the default value of an argument to a bound function did not cause the checksum of the bound function to change
Fixed coverage to correctly include alkymi imports when executed through
labfile.py
Removed¶
kwargs
/NamedArgs
built-in recipe removed (functionality can now be mimicked using the built-inArg
)Dropped support for Python 3.5
0.0.5 - 2021-03-17¶
Added¶
Added a new
zip_results()
built-in recipe generator to zip together outputs from multiple recipesDocumentation in the
docs/
directory. The documentation is built using Sphinx and hosted on https://alkymi.readthedocs.io/en/latest/. The documentation can be built by runningpython labfile.py brew docs
.Added checksum unit tests for the
Path
typeAdded unit test for caching of recipes that do not return anything (None)
Added
allow_pickling
configuration option to let the user turn off pickling for serialization, deserialization and checksumming and a unit test for itAdded test coverage using
coverage
and https://codecov.io (see thecoverage
recipe inlabfile.py
)
Changed¶
Regular checks for cleanliness are now run even if a custom cleanliness check passes (e.g. for the
glob_files()
built-in recipe generator). This ensures that changes to external files and others are correctly caught and handled.Broke
Status.Dirty
into several more explicit causes of dirtiness (e.g.OutputsInvalid
) to make it more clear to the user why a given recipe has been marked dirtyMoved functions for checking Recipe and ForeachRecipe dirtiness to alkymi.alkymi to reduce the complexity of the classes
Moved the core logic of the
Recipe.brew()
function to alkymi.alkymiProvide names explicitly to built-in recipe generators to avoid name clashes when a built-in recipe generator is used multiple times in a single module
Greatly simplified the serialization and deserialization logic and got rid of generators
Converted the built-in recipe types
Args
andNamedArgs
to be subclasses ofRecipe
to avoid the clunky.recipe
property.Updated
README.md
to reflect the new documentation page at https://alkymi.readthedocs.io/en/latest/.Replaced the usage of
tuple
with a newOutputs
type that keeps most of the behavior, but ensures that all return types are validMade
Recipe
generic in the return type and forwarded return type information from decorators to allowbrew
to return valid type informationUpdated built-in recipes to supply return type information to their
Recipe
objectsUse the highest available protocol when pickling for serialization and checksumming
Fixed¶
Converted several captured variables inside tests to globals to avoid them interfering with hashing of the bound functions
Fixed an issue where a bound function changing between evaluations could cause the status to be reported as “NotEvaluated” instead of “BoundFunctionChanged”. Added a test step to check this.
Fixed
utils.call()
to work regardless of operating system and added a small unit testFixed caching of dictionaries output by ForeachRecipe
Dictionaries are now serialized using a dict with key and value entries supporting arbitrary nesting, instead of being pickled
Fixed a bug where non-existent
Path
objects would result in the same checksumFixed a bug where recipes without return values would remain
NotEvaluated
even though they had been evaluated and cached
0.0.4 - 2021-02-05¶
Added¶
Updated README.md with “Command Line Usage”, “Upcoming Features” and “Known Issues” sections
Included
labfile.py
in static type checking and lintingAdded a unit test for the built-in
file()
recipe generatorMade cache directory configurable using
AlkymiConfig
and added a test for itAdded a new test to verify that partially executed ForeachRecipes can be reloaded from cache and continue from point of interruption/failure
Removed¶
“clean” and “clean-cache” commands from Lab (these will be reimplemented properly at a later point)
Changed¶
Renamed alkymi’s labfile from
lab.py
tolabfile.py
to fit the new “labfile” naming schemeForeachRecipe now supports saving/restoring partial evaluation states to the cache. This fixes the issue where a failure in one of the foreach evaluations could cause all the work to be lost
Recipes will now be marked dirty if their bound function has changed between invocations
ForeachRecipe now only serializes each output once
Outputs are now loaded lazily from the cache. This means that actual deserialization is deferred until an output is actually needed for computation.
alkymi’s labfile now uses
exit()
instead of raising exceptions in order to not clutter the output of tests etc.Adapted the way that external (outside alkymi’s cache) files are checked for validity to see if they have changed between alkymi evaluations
Updated README.md to reflect recently merged features
Fixed¶
Fixed type annotations in alkymi’s labfile (
labfile.py
)Fixed reloading of recipe checksums from cache (these needed to be converted from lists to tuples due to JSON serialization format). This would cause some recipes to be marked dirty even though they weren’t.
Fixed a bug where the aggregate checksum for all mapped inputs to a ForeachRecipe weren’t being saved and restored from cache
0.0.3 - 2021-01-03¶
Added¶
Initial release