-
Notifications
You must be signed in to change notification settings - Fork 4
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
ExtModel cannot handle path formats from different OS #339
Comments
Suggestion: always write forward slashes (windows also supports this), then the only issue that remains are the hardcoded drive letters |
I put this is back in TODO for now, since I would like to discuss this with the rest of the team:
|
@SCLaan, thanks for your feedback! Good to hear it works. |
@SCLaan : wil jij deze nieuwe functionaliteit testen? inputmdu=Path(r"p:/model/flowfm.mdu")
fmmodel = FMModel(filepath=inputmdu, path_style="unix")
# [..]
outputmdu=Path(r"p:/model/flowfm_modified.mdu")
fmmodel.filepath = outputmdu
fmmodel.save(path_style="unix") |
#474 can be merged once this issue is merged (should make tests green for that issue) |
Co-authored-by: Arthur van Dam <arthurvd@gmail.com>
I did some quick tests and this seems to be working fine. I think this issue can now be closed. |
Is your feature request related to a problem? Please describe.
When working on Windows ExtModel (and maybe other functions) cannot read Unix paths (and probably vice-versa). With many quick pre- and post-processing steps on Windows machines and the larger simulations on a Linux cluster an automatic conversion of path formats when reading data will be necessary. Also for saving it will be a good feature to be able to choose the output format (Windows/Unix).
To Reproduce
Describe the solution you'd like
Technical design
(Proposal by @arthurvd)
FileModel
class is probably enough and as high as possible.load()
save()
of a modelFileModel
class, such that it can also be set while creating models from scratch, e.g.:pathlib
or some other package already has some built-in features for this.The text was updated successfully, but these errors were encountered: