-
Notifications
You must be signed in to change notification settings - Fork 3
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 support for NHI GWO database #319
Conversation
with extraction data
assert len(empty_lines) == 2 | ||
|
||
# read properties | ||
skiprows = list(range(empty_lines[0] + 1)) + [empty_lines[0] + 2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this hard-coded 100 guaranteed to always work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment got moved I see, the line in question is a few lines before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are less than 100 lines in the returned content, this code still works.
However, there are some situations, where no wells or measurements are found, that will give an unclear error, that is not caught yet. I will try to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But there may be more than 100 wells, then this will fail... I removed the 100
|
||
|
||
@pytest.mark.skip("too slow") | ||
def test_gwo_entire_pumping_station(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, how long does this request take?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not long, a few seconds, but does not test any new lines. But wanted to store this usefull code somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I made some typo corrections, and just the one question about the hard-coded index. If that's cleared up, it's good to go!
Add checks for empty empty content Determine empty lines in get_gwo_wells, to be used in skiprows
This pull request adds support for the NHI GWO databse with extraction data in the Netherlands, mainly form drinking water companies:
https://gwo.nhi.nu/
Users should register at this website to obtain a username and password. For testing purposes, I added my username and password to the Github-secrets, which are used by the tests.