Closed liamhuber closed 1 month ago
Coverage variation | Diff coverage |
---|---|
:white_check_mark: +0.23% (target: -1.00%) | :white_check_mark: 98.67% |
Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
function.py | 1 | 98.11% | ||
injection.py | 1 | 93.28% | ||
storage.py | 1 | 92.31% | ||
snippets/factory.py | 3 | 97.76% | ||
io_preview.py | 6 | 95.83% | ||
node.py | 7 | 94.36% | ||
macro.py | 7 | 92.09% | ||
job.py | 9 | 91.96% | ||
node_library/standard.py | 10 | 93.15% | ||
<!-- | Total: | 45 | --> |
Totals | |
---|---|
Change from base Build 8883760424: | 0.2% |
Covered Lines: | 3304 |
Relevant Lines: | 3728 |
This leverages the
@classfactory
tools from the last PR to make existingFunction
andMacro
nodes pickleable. That means that the entire standard (need to check for- and while- loops still) ecosystem can now be pickled:This had one giant, nasty side effect: storing with the
h5io
back-end is almost completely useless.h5io
can't handle anything that returns a non-standard reconstructor in its reduced value, which is now almost all of the usual nodes. For what I suspect is a similar reason, we can't just slap a node onto aDataContainer
and to-hdf it.To mitigate this pain, I switched the default back-end over to
tinybase
(which works fine, I believe due to its fallback ontocloudpickle
-- kudos to @pmrv), and simply pickle the input node on theNodeOutputJob
interface withpyiron_base
. I'll also stack on top of this apickle
(and probablycloudpickle
, in case the nodes carry unpickleable data) back-end and make that default. Hierarchical and browsable long-term storage is still a key objective (👍 @niklassiemer), but I want to delay it until we have a storage tool that actually supports such storage in a pickle-compliant way. I.e. I want to start with a foundation of being pickle-compliant, and then find (or more likely write) a storage tool that is also pickle-compliant, than to bend over backwards to get long-term storage now.