Closed liamhuber closed 3 months ago
Coverage variation | Diff coverage |
---|---|
Report missing for 52eb8139bb548fb76c87ca286b9328c12f77a1cc[^1] | :white_check_mark: 91.84% |
You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
There are some public-facing methods that are removed, but honestly I'm so confident they weren't used anywhere but the plumbing that I'm still labelling this as a "patch":
class_name
attribute and just use__class__.__name__
directlypyiron_workflow.storage.ALLOWED_BACKENDS
-- this is now created dynamically as a class attribute based on what mixins are used and can be accessed fromNode.allowed_backends()
And there are a couple of new interfaces:
storage_directory
,storage_path
, etc. which are there to avoidHasStorage
from inheriting fromSemantic
orHasWorkingDirectory
but are just re-directionsdelete_storage
now gives an easy way to delete save files for all backendsBut other than renaming for
ALLOWED_BACKENDS
andclass_name
, the tests required zero modifications, so this really is just a refactoring. (test_node
has a bigger diff, but that's just because I added a cleanup failsafe that gives QoL if those tests happen to fail, which they did during development.)This refactoring isn't perfect, for instance the fact that
storage_directory
,storage_path
are simple re-directs toHasWorkingDirectory.working_directory
andNode.graph_path
, respectively (and similar redirects) is a smell that something is off in the mixin encapsulation. But I don't want to make the perfect the enemy of the good here, and this PR very nicely breaks apart the storage interfaces so that the different backends are disentangled into their own classes, which I like a lot.Contributes to #243