-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistent handling of paths #93
Comments
By fixing #113 we no longer leak paths to user with the public API. Converting strings to Path objects is now duplicated in each model. We can make generic function in ewatercycle.util to perform this conversion so expanduser() and resolve() are called always. Something like def make_absolute(p: str) -> Path:
return Path(p).expanduser().resolve() |
Yep, like that 👍 Don't we still leak paths when the user tries to inspect the ParameterSet or Forcing objects? |
I made a start with something like that in #107 |
|
The ewatercycle user interface uses string formats to get path inputs. It would be helpful if we internally default to using standard
Path
representations as well. #82 implements a pathparser that converts input strings to pathlib objects. It would be nice use this throughout the package.It might also be nice to add some custom
__str__
methods so that the user never gets to see the internal representation.The text was updated successfully, but these errors were encountered: