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

Add validation of uri before saving DatasetURI objects #24

Open
2 of 3 tasks
mortenwh opened this issue Jul 24, 2018 · 1 comment
Open
2 of 3 tasks

Add validation of uri before saving DatasetURI objects #24

mortenwh opened this issue Jul 24, 2018 · 1 comment

Comments

@mortenwh
Copy link
Contributor

mortenwh commented Jul 24, 2018

The URI generic syntax consists of a hierarchical sequence of five components:

URI = scheme:[//authority]path[?query][#fragment]

DatasetURI.uri is presently not validated. This could be a big problem if a lot of data is wrongly ingested. We should add some validation in the get_or_create method of this model:

  • Check that the generic uri syntax is followed

  • Check that the uri points to an actual resource

  • Correct any wrong uris already added to the database - perhaps using migrations?

mortenwh added a commit that referenced this issue Jul 25, 2018
@mortenwh
Copy link
Contributor Author

mortenwh commented Oct 24, 2018

The two first tasks are done in #38

mortenwh added a commit that referenced this issue Feb 8, 2019
…tion function to only raise exception if the resource is not available
mortenwh added a commit that referenced this issue Feb 14, 2019
…e, the __init__ module causes import errors due to recursive imports
mortenwh added a commit that referenced this issue Feb 14, 2019
…validate_uri, and update unit tests that use the function to accomodate the new functionality.
mortenwh added a commit that referenced this issue Feb 24, 2019
…ned html 400 error although netCDF4.Dataset works fine. If request.status!=200, I therefore try to open with netCDF4.Dataset. If that works, no error is raised..
mortenwh added a commit that referenced this issue Jul 25, 2019
…ned html 400 error although netCDF4.Dataset works fine. If request.status!=200, I therefore try to open with netCDF4.Dataset. If that works, no error is raised..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant