Hydro-Quebec-API-Wrapper 4.2.3__tar.gz → 4.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.gitlab-ci.yml +2 -2
  2. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO +7 -7
  3. hydro_quebec_api_wrapper-4.2.5/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +5 -0
  4. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/PKG-INFO +7 -7
  5. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_dpc.py +10 -4
  6. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/pyproject.toml +1 -1
  7. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/setup.cfg +5 -5
  8. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/test_requirements.txt +1 -0
  9. hydro_quebec_api_wrapper-4.2.3/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +0 -5
  10. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.coveragerc +0 -0
  11. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.devcontainer/Dockerfile +0 -0
  12. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.devcontainer/devcontainer.json +0 -0
  13. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.flake8 +0 -0
  14. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.gitignore +0 -0
  15. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.pre-commit-config.yaml +0 -0
  16. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/.pylintrc +0 -0
  17. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt +0 -0
  18. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/Hydro_Quebec_API_Wrapper.egg-info/dependency_links.txt +0 -0
  19. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/Hydro_Quebec_API_Wrapper.egg-info/entry_points.txt +0 -0
  20. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/Hydro_Quebec_API_Wrapper.egg-info/top_level.txt +0 -0
  21. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/LICENSE +0 -0
  22. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/MANIFEST.in +0 -0
  23. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/README.md +0 -0
  24. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/config.default.yaml +0 -0
  25. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/conflict_test_requirements.txt +0 -0
  26. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/Makefile +0 -0
  27. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/make.bat +0 -0
  28. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/_static/custom.css +0 -0
  29. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/_static/hydroqc-logo-128.png +0 -0
  30. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/_static/hydroqc-logo.svg +0 -0
  31. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/conf.py +0 -0
  32. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/external/description-des-codes-interruption.pdf +0 -0
  33. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/index.rst +0 -0
  34. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.contract.rst +0 -0
  35. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.hydro_api.rst +0 -0
  36. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.peak.cpc.rst +0 -0
  37. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.peak.dpc.rst +0 -0
  38. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.peak.rst +0 -0
  39. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.rst +0 -0
  40. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/hydroqc.types.rst +0 -0
  41. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/reference/modules.rst +0 -0
  42. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/docs/source/todo.rst +0 -0
  43. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/examples/hydro.py +0 -0
  44. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/__init__.py +0 -0
  45. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/account.py +0 -0
  46. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/consts.py +0 -0
  47. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/__init__.py +0 -0
  48. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/common.py +0 -0
  49. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_d.py +0 -0
  50. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_d_cpc.py +0 -0
  51. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_dt.py +0 -0
  52. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_m.py +0 -0
  53. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_m_gdp.py +0 -0
  54. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/contract_residential.py +0 -0
  55. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/contract/outage.py +0 -0
  56. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/customer.py +0 -0
  57. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/diagnostic.py +0 -0
  58. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/error.py +0 -0
  59. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/hydro_api/__init__.py +0 -0
  60. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/hydro_api/cache.py +0 -0
  61. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/hydro_api/client.py +0 -0
  62. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/hydro_api/consts.py +0 -0
  63. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/logger.py +0 -0
  64. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/__init__.py +0 -0
  65. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/basepeak.py +0 -0
  66. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/basepeakhandler.py +0 -0
  67. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/consts.py +0 -0
  68. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/cpc/__init__.py +0 -0
  69. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/cpc/consts.py +0 -0
  70. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/cpc/handler.py +0 -0
  71. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/cpc/peak.py +0 -0
  72. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/dpc/__init__.py +0 -0
  73. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/dpc/consts.py +0 -0
  74. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/dpc/handler.py +0 -0
  75. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/peak/dpc/peak.py +0 -0
  76. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/public_client.py +0 -0
  77. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/py.typed +0 -0
  78. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/timerange.py +0 -0
  79. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/__init__.py +0 -0
  80. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/account.py +0 -0
  81. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/common.py +0 -0
  82. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/consump.py +0 -0
  83. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/contract.py +0 -0
  84. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/cpc.py +0 -0
  85. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/dpc.py +0 -0
  86. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/dt.py +0 -0
  87. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/types/outage.py +0 -0
  88. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/utils.py +0 -0
  89. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/hydroqc/webuser.py +0 -0
  90. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/logo/hydroqc-logo-128.png +0 -0
  91. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/logo/hydroqc-logo.svg +0 -0
  92. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/renovate.json5 +0 -0
  93. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/__init__.py +0 -0
  94. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/conftest.py +0 -0
  95. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_common.py +0 -0
  96. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_d.py +0 -0
  97. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_d_cpc.py +0 -0
  98. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_dpc.py +0 -0
  99. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_dt.py +0 -0
  100. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_m.py +0 -0
  101. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/subtest_contract_m_gdp.py +0 -0
  102. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/test_basic.py +0 -0
  103. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/test_timerange.py +0 -0
  104. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tests/tools.py +0 -0
  105. {hydro_quebec_api_wrapper-4.2.3 → hydro_quebec_api_wrapper-4.2.5}/tox.ini +0 -0
@@ -29,8 +29,8 @@ renovate-config-validator:
29
29
 
30
30
  test:
31
31
  stage: test
32
- tags:
33
- - hydroqc
32
+ # tags:
33
+ # - hydroqc
34
34
  image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.13:latest
35
35
  script:
36
36
  - tox -e pylint,flake8,pydocstyle,typing,black,deps-conflict --parallel auto
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Hydro-Quebec-API-Wrapper
3
- Version: 4.2.3
3
+ Version: 4.2.5
4
4
  Summary: A wrapper library to access hydro quebec API and more
5
5
  Home-page: https://hydroqc.ca
6
6
  Author-email: Hydroqc Team <info@hydroqc.ca>
@@ -12,14 +12,14 @@ Keywords: hydroquebec,lib
12
12
  Platform: any
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.13.0
15
+ Requires-Python: >=3.12.0
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: aiohttp==3.13.2
19
- Requires-Dist: python-dateutil==2.9.0.post0
20
- Requires-Dist: pytz==2025.2
21
- Requires-Dist: aiocache==0.12.3
22
- Requires-Dist: pkce==1.0.3
18
+ Requires-Dist: aiohttp<4.0.0,>=3.10.0
19
+ Requires-Dist: python-dateutil>=2.8.0
20
+ Requires-Dist: pytz>=2024.1
21
+ Requires-Dist: aiocache>=0.12.0
22
+ Requires-Dist: pkce>=1.0.3
23
23
  Dynamic: license-file
24
24
 
25
25
  # HydroQC - Hydro Quebec API wrapper
@@ -0,0 +1,5 @@
1
+ aiohttp<4.0.0,>=3.10.0
2
+ python-dateutil>=2.8.0
3
+ pytz>=2024.1
4
+ aiocache>=0.12.0
5
+ pkce>=1.0.3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Hydro-Quebec-API-Wrapper
3
- Version: 4.2.3
3
+ Version: 4.2.5
4
4
  Summary: A wrapper library to access hydro quebec API and more
5
5
  Home-page: https://hydroqc.ca
6
6
  Author-email: Hydroqc Team <info@hydroqc.ca>
@@ -12,14 +12,14 @@ Keywords: hydroquebec,lib
12
12
  Platform: any
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Operating System :: OS Independent
15
- Requires-Python: >=3.13.0
15
+ Requires-Python: >=3.12.0
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
- Requires-Dist: aiohttp==3.13.2
19
- Requires-Dist: python-dateutil==2.9.0.post0
20
- Requires-Dist: pytz==2025.2
21
- Requires-Dist: aiocache==0.12.3
22
- Requires-Dist: pkce==1.0.3
18
+ Requires-Dist: aiohttp<4.0.0,>=3.10.0
19
+ Requires-Dist: python-dateutil>=2.8.0
20
+ Requires-Dist: pytz>=2024.1
21
+ Requires-Dist: aiocache>=0.12.0
22
+ Requires-Dist: pkce>=1.0.3
23
23
  Dynamic: license-file
24
24
 
25
25
  # HydroQC - Hydro Quebec API wrapper
@@ -147,8 +147,11 @@ class ContractDPC(ContractResidential):
147
147
  @property
148
148
  @check_dpc_data_present
149
149
  def critical_called_hours(self) -> int:
150
- """Get number of critical hours."""
151
- return int(self._dpc_data["periodesHiver"][0]["hrsCritiquesAppelees"])
150
+ """Get number of critical hours.
151
+
152
+ Returns 0 for current ongoing winter period where hours haven't been called yet.
153
+ """
154
+ return int(self._dpc_data["periodesHiver"][0].get("hrsCritiquesAppelees", 0))
152
155
 
153
156
  @property
154
157
  @check_dpc_data_present
@@ -182,11 +185,14 @@ class ContractDPC(ContractResidential):
182
185
  @property
183
186
  @check_dpc_data_present
184
187
  def winter_total_days_last_update(self) -> int:
185
- """Get number of days since winter starts (calculated from dates)."""
188
+ """Get number of days since winter starts (calculated from dates).
189
+
190
+ Returns 0 if last update is before winter start (pre-season setup).
191
+ """
186
192
  winter = self._dpc_data["periodesHiver"][0]
187
193
  start = datetime.fromisoformat(winter["dateDebut"].replace("Z", "+00:00"))
188
194
  update = datetime.fromisoformat(winter["dateMaj"].replace("Z", "+00:00"))
189
- return (update - start).days
195
+ return max(0, (update - start).days)
190
196
 
191
197
  @property
192
198
  @check_dpc_data_present
@@ -21,7 +21,7 @@ classifiers = [
21
21
  ]
22
22
  keywords = ["hydroquebec", "lib"]
23
23
 
24
- requires-python = ">=3.13.0"
24
+ requires-python = ">=3.12.0"
25
25
 
26
26
  [project.urls]
27
27
  "Source Code" = "https://gitlab.com/hydroqc/hydroqc"
@@ -3,11 +3,11 @@ url = https://hydroqc.ca
3
3
 
4
4
  [options]
5
5
  install_requires =
6
- aiohttp==3.13.2
7
- python-dateutil==2.9.0.post0
8
- pytz==2025.2
9
- aiocache==0.12.3
10
- pkce==1.0.3
6
+ aiohttp>=3.10.0,<4.0.0
7
+ python-dateutil>=2.8.0
8
+ pytz>=2024.1
9
+ aiocache>=0.12.0
10
+ pkce>=1.0.3
11
11
 
12
12
  [egg_info]
13
13
  tag_build =
@@ -10,5 +10,6 @@ mypy==1.19.0
10
10
  types-pytz==2025.2.0.20251108
11
11
  types-PyYAML==6.0.12.20250915
12
12
  types-python-dateutil==2.9.0.20251115
13
+ homeassistant-stubs==2025.11.3
13
14
  pyright==1.1.407
14
15
  lxml==6.0.2
@@ -1,5 +0,0 @@
1
- aiohttp==3.13.2
2
- python-dateutil==2.9.0.post0
3
- pytz==2025.2
4
- aiocache==0.12.3
5
- pkce==1.0.3