Skip to content

Add support for published consumption readings - #93

Merged
ssenart merged 6 commits into
ssenart:developfrom
WilliamCesbron:fix/published-consumption-support
Jul 27, 2026
Merged

ssenart merged 6 commits into
ssenart:developfrom
WilliamCesbron:fix/published-consumption-support

Conversation

@WilliamCesbron

Copy link
Copy Markdown

Summary

Add explicit support for GRDF published consumption readings without changing the existing informative-reading default.

Context

Some PCEs return no usable history (or only the latest reading) from the informatives endpoint even though published consumption history is available in the GRDF customer portal. This is the situation reported in ssenart/gazpar2haws#117.

PyGazpar already models the publiees endpoint through ConsumptionType.PUBLISHED, but JsonWebDataSource always requests informative readings. In addition, published readings have a null journeeGaziere and therefore fail in JsonParser.

Changes

  • allow callers to select the ConsumptionType used by JsonWebDataSource;
  • preserve ConsumptionType.INFORMATIVE as the default;
  • export ConsumptionType from the public package API;
  • parse published readings by assigning their consumption to the last day of the reporting period (dateFinReleve - 1 day);
  • ignore malformed readings that provide neither journeeGaziere nor dateFinReleve;
  • add regression tests using the existing donnees_publiees.json fixture.

Important behavior

Published readings may cover more than one day. This change does not invent a daily distribution. The complete consumption is assigned to the final day covered by the published period, preserving the GRDF total while making the temporal granularity explicit.

Validation

  • pytest tests/test_jsonparser.py tests/test_datafileparser.py -q — 7 passed
  • Black check — passed
  • isort check — passed
  • Flake8 on changed Python files — passed

ssenart and others added 6 commits January 11, 2025 19:33
…gation in case of errors (ssenart#83)

* [ssenart#81] Add meter/temperature debug log messages to help investigation in case of errors (ssenart#82)

* [ssenart#81] Add meter/temperature debug log messages to help investigation in case of errors

* [ssenart#81] Add meter/temperature debug log messages to help investigation in case of errors

---------

Co-authored-by: Stéphane Senart <>

* [ssenart#81] Add meter/temperature debug log messages to help investigation in case of errors

---------

Co-authored-by: Stéphane Senart <>
# Conflicts:
#	.github/workflows/python-publish-develop.yml
#	.github/workflows/python-publish-release.yml
#	CHANGELOG.md
#	pygazpar/datasource.py
#	pygazpar/excelparser.py
#	setup.cfg
@WilliamCesbron
WilliamCesbron marked this pull request as ready for review July 26, 2026 00:02
@ssenart
ssenart changed the base branch from master to develop July 27, 2026 19:36
@ssenart
ssenart merged commit 104a6ef into ssenart:develop Jul 27, 2026
2 of 3 checks passed
@ssenart

ssenart commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Hello, thanks for your contribution.

I will publish an alpha release shortly.

@ssenart

ssenart commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Done, draft release available here: https://pypi.org/project/pygazpar/1.4.0a1/

Thanks a lot !

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

Successfully merging this pull request may close these issues.

2 participants