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

99 create ddlpy 050 release #100

Merged
merged 4 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.4.1
current_version = 0.5.0
commit = True
tag = True

Expand Down
4 changes: 2 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
History
=======

UNRELEASED
0.5.0 (2024-04-26)
----------
* avoid duplicated periods in dataframe returned by `ddlpy.measurements_amount()` in https://github.com/Deltares/ddlpy/pull/93
* allow for different retrieval frequencies (including None) in `ddlpy.measurements()` in https://github.com/Deltares/ddlpy/pull/95
* only catch "Geen waarnemingen aanwezig!" error message and raise all others (for instance for a too large request) in https://github.com/Deltares/ddlpy/pull/97
* only catch "Geen gegevens gevonden!" error message and raise all others (for instance for a too large request) in https://github.com/Deltares/ddlpy/pull/97
* support for timezones in start_date/end_date in https://github.com/Deltares/ddlpy/pull/98

0.4.0 (2024-04-08)
Expand Down
2 changes: 1 addition & 1 deletion ddlpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

__author__ = """Fedor Baart"""
__email__ = 'fedor.baart@deltares.nl'
__version__ = '0.4.1'
__version__ = '0.5.0'

from ddlpy.ddlpy import locations
from ddlpy.ddlpy import (measurements,
Expand Down
5 changes: 2 additions & 3 deletions ddlpy/ddlpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ def _send_post_request(url, request, timeout=None):
if not result['Succesvol']:
logger.debug('Response result is unsuccessful: {}'.format(result))
error_message = result.get('Foutmelding', 'No error returned')
if "Geen gegevens gevonden" in error_message:
if error_message == "Geen gegevens gevonden!":
# Foutmelding: "Geen gegevens gevonden!"
# this is a valid response for periods where there is no data
# this error is raised here, but catched in ddlpy.ddlpy.measurements() so the process can continue.
raise NoDataError(error_message)
else:
# Foutmelding: "Het max aantal waarnemingen (157681) is overschreven, beperk uw request."
# or any other possible error message
# are raised here and not catched elsewhere in the code
# or any other possible error message are raised here
raise UnsuccessfulRequestError(error_message)

# continue if request was successful
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rws-ddlpy"
version = "0.4.1"
version = "0.5.0"
maintainers = [
{ name = "Fedor Baart", email = "fedor.baart@deltares.nl"},
{ name = "Jelmer Veenstra", email = "jelmer.veenstra@deltares.nl"},
Expand Down
Loading