filesystem warehouse usability improvements - #2155
Conversation
ethanholz
left a comment
There was a problem hiding this comment.
I think this is great, a few minor notes but non-blocking
| self.root_dir = pathlib.Path(root_dir) | ||
| if self.root_dir.is_dir() and not exist_okay: | ||
| raise ValueError( | ||
| "`root_dir` already exists. To load an existing Warehouse, use FileSystemWarehouse.load(`root_dir`)" |
There was a problem hiding this comment.
I like the error, but I am a little concerned about how it gets passed down to a user. If a user reruns a command using this under the hood will it make sense? Do we even care about that here?
| @@ -1,5 +1,7 @@ | |||
| # This code is part of OpenFE and is licensed under the MIT license. | |||
| # For details, see https://github.com/OpenFreeEnergy/gufe | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
I am sure you are aware but seems there are changes to this in Python 3.14 https://docs.python.org/3.14/whatsnew/3.14.html#from-future-import-annotations
There was a problem hiding this comment.
thanks for the link! I think this is fine in this instance, since it's pulling in Python 3.14 functionality.
a6fd672 to
cc8edd5
Compare
|
@ethanholz note that I have the same complaint about exorcist |
fce955a to
9a4b3e0
Compare
|
If upon initial creation we create all the store top directories, then when pointing to a an existing warehouse, we could do a quick validation to make sure all the dirs exist. I think the broader question here is "what makes a directory a FileSystemWarehouse?" and how do we validate that. |
I think this is the right path forward! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epic/execution_improvements #2155 +/- ##
===============================================================
- Coverage 90.57% 90.57% -0.01%
===============================================================
Files 217 217
Lines 21522 21549 +27
===============================================================
+ Hits 19494 19518 +24
- Misses 2028 2031 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
I think that creating a new filesystem warehouse and loading an existing one should have different guard rails.
otherwise, you:
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes / no
If yes, please provide details here:
Checklist
newsentry, or the changes are not user-facing.pre-commit.ci autofix.Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).
Developers certificate of origin