Skip to content
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

Support URL as input path when constructing models #494

Open
veenstrajelmer opened this issue Mar 30, 2023 · 0 comments
Open

Support URL as input path when constructing models #494

veenstrajelmer opened this issue Mar 30, 2023 · 0 comments
Labels
type: feature Brand new functionality type: investigation An investigation should be performed

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Mar 30, 2023

NOTE: this issue requires futher refinement

Describe the request
When using a url as an input path, this error is raised "OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\DATA\\dfm_tools\\tests\\examples\\https:\\raw.githubusercontent.com\\Deltares\\HYDROLIB-core\\main\\tests\\data\\input\\dflowfm_individual_files\\with_optional_sections.mdu'"

To Reproduce

import hydrolib.core.dflowfm as hcdfm
file_mdu = 'https://raw.githubusercontent.com/Deltares/HYDROLIB-core/main/tests/data/input/dflowfm_individual_files/with_optional_sections.mdu'
fm = hcdfm.FMModel(file_mdu)

Expected behavior
Reading file without issues

NOTE:
This in fact means support for URLs when loading a model. We need to think a bit further before implementing this:

  • what happens when calling fm.save() subsequently.
  • Upon loading, do we automatically set recurse=False, or not?
  • If we get a file from URL, that itself contains absolute file path references, what happens?
  • double check (in)compatibility with our current FilePathResolver
  • more...?

Version info (please complete the following information):

  • Version main branch
@arthurvd arthurvd changed the title URL as input path raises error Support URL as input path when constructing models Mar 31, 2023
@arthurvd arthurvd added this to To do in HYDROLIB-core via automation Mar 31, 2023
@arthurvd arthurvd added type: feature Brand new functionality FLAG labels Mar 31, 2023
@priscavdsluis priscavdsluis added type: investigation An investigation should be performed and removed FLAG labels Apr 9, 2024
@rhutten rhutten removed this from To do in HYDROLIB-core Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality type: investigation An investigation should be performed
Projects
None yet
Development

No branches or pull requests

3 participants