Hydro-Quebec-API-Wrapper 3.1.0__tar.gz → 3.1.1__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 (100) hide show
  1. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitignore +17 -0
  2. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitlab-ci.yml +59 -47
  3. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO +1 -1
  4. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt +1 -2
  5. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +1 -0
  6. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/PKG-INFO +1 -1
  7. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/error.py +6 -0
  8. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/client.py +98 -69
  9. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/consts.py +3 -0
  10. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/outage.py +6 -5
  11. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/webuser.py +5 -9
  12. Hydro-Quebec-API-Wrapper-3.1.1/renovate.json5 +136 -0
  13. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/setup.cfg +1 -0
  14. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_common.py +0 -17
  15. Hydro-Quebec-API-Wrapper-3.1.0/hydroqc/hydro_api/auth.py +0 -106
  16. Hydro-Quebec-API-Wrapper-3.1.0/renovate.json +0 -69
  17. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.coveragerc +0 -0
  18. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.flake8 +0 -0
  19. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.pre-commit-config.yaml +0 -0
  20. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.pylintrc +0 -0
  21. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/dependency_links.txt +0 -0
  22. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/entry_points.txt +0 -0
  23. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/top_level.txt +0 -0
  24. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/LICENSE +0 -0
  25. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/MANIFEST.in +0 -0
  26. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/README.md +0 -0
  27. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/config.default.yaml +0 -0
  28. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/conflict_test_requirements.txt +0 -0
  29. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/Makefile +0 -0
  30. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/make.bat +0 -0
  31. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/custom.css +0 -0
  32. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo-128.png +0 -0
  33. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo.svg +0 -0
  34. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/conf.py +0 -0
  35. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/external/description-des-codes-interruption.pdf +0 -0
  36. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/index.rst +0 -0
  37. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.contract.rst +0 -0
  38. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.hydro_api.rst +0 -0
  39. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.cpc.rst +0 -0
  40. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.dpc.rst +0 -0
  41. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.rst +0 -0
  42. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.rst +0 -0
  43. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.types.rst +0 -0
  44. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/modules.rst +0 -0
  45. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/todo.rst +0 -0
  46. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/examples/hydro.py +0 -0
  47. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/__init__.py +0 -0
  48. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/account.py +0 -0
  49. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/consts.py +0 -0
  50. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/__init__.py +0 -0
  51. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/common.py +0 -0
  52. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d.py +0 -0
  53. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d_cpc.py +0 -0
  54. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dpc.py +0 -0
  55. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dt.py +0 -0
  56. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m.py +0 -0
  57. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m_gdp.py +0 -0
  58. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_residential.py +0 -0
  59. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/outage.py +0 -0
  60. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/customer.py +0 -0
  61. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/diagnostic.py +0 -0
  62. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/__init__.py +0 -0
  63. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/cache.py +0 -0
  64. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/logger.py +0 -0
  65. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/__init__.py +0 -0
  66. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/__init__.py +0 -0
  67. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/consts.py +0 -0
  68. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/handler.py +0 -0
  69. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/peak.py +0 -0
  70. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/__init__.py +0 -0
  71. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/consts.py +0 -0
  72. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/handler.py +0 -0
  73. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/peak.py +0 -0
  74. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/py.typed +0 -0
  75. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/timerange.py +0 -0
  76. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/__init__.py +0 -0
  77. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/account.py +0 -0
  78. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/common.py +0 -0
  79. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/consump.py +0 -0
  80. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/contract.py +0 -0
  81. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/cpc.py +0 -0
  82. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dpc.py +0 -0
  83. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dt.py +0 -0
  84. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/utils.py +0 -0
  85. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo-128.png +0 -0
  86. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo.svg +0 -0
  87. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/pyproject.toml +0 -0
  88. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/test_requirements.txt +0 -0
  89. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/__init__.py +0 -0
  90. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/conftest.py +0 -0
  91. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d.py +0 -0
  92. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d_cpc.py +0 -0
  93. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dpc.py +0 -0
  94. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dt.py +0 -0
  95. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m.py +0 -0
  96. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m_gdp.py +0 -0
  97. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_basic.py +0 -0
  98. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_timerange.py +0 -0
  99. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/tools.py +0 -0
  100. {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tox.ini +0 -0
@@ -124,6 +124,11 @@ venv.bak/
124
124
  .mypy_cache/
125
125
  .dmypy.json
126
126
  dmypy.json
127
+ mypy-html-report/
128
+ mypy-junit.xml
129
+ mypy-txt-report/
130
+ classes.html
131
+ packages.html
127
132
 
128
133
  # Pyre type checker
129
134
  .pyre/
@@ -131,5 +136,17 @@ dmypy.json
131
136
  config.yaml
132
137
  .idea/
133
138
 
139
+ # gitlab-ci-local
140
+ .gitlab-ci-local-env
141
+ .gitlab-ci-local/
142
+ .gitlab-ci-local-variables.yml
143
+
144
+ # Tests results
145
+ mypy*
146
+ packages.html
147
+ classes.html
148
+
149
+
134
150
  diagnostic.zip
135
151
  /diagnostic/
152
+
@@ -1,25 +1,38 @@
1
+ include:
2
+ - project: "renovate-bot/renovate-runner"
3
+ file: "/templates/renovate-config-validator.gitlab-ci.yml"
1
4
  variables:
2
5
  TWINE_USERNAME: __token__
3
6
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
4
7
  stages:
5
- - test
6
- - private_tests
7
- - private_tests_done
8
- - pypi
8
+ - test
9
+ - private_tests
10
+ - private_tests_done
11
+ - pypi
9
12
 
10
13
  cache:
11
14
  key: pip-cache
12
15
  paths:
13
16
  - .cache/pip
14
17
 
18
+ renovate-config-validator:
19
+ stage: test
20
+ tags:
21
+ - hydroqc
22
+ rules:
23
+ # Enable for all other branches if it's a MR pipeline
24
+ - if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
25
+ changes:
26
+ - renovate.json5
27
+ when: on_success
28
+ - when: never
29
+
15
30
  test:
16
31
  stage: test
17
32
  tags:
18
- - hydroqc
19
- image: registry.gitlab.com/hydroqc/hydroqc-base-container/build:20231127050116
33
+ - hydroqc
34
+ image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
20
35
  script:
21
- #- apt-get update && apt-get install git --no-install-recommends -y graphviz jq python3.10 python3-venv python3-pip git
22
- - cat renovate.json |jq > /dev/null 2&>1 || ( echo "renovate.json not valid" && exit 1 )
23
36
  - pip install tox
24
37
  - tox -e pylint,flake8,pydocstyle,typing,black,deps-conflict --parallel auto
25
38
  - cat mypy-txt-report/index.txt
@@ -37,27 +50,27 @@ test:
37
50
  - packages.html
38
51
  rules:
39
52
  # Disable if CI_SKIP is set
40
- - if: '$CI_SKIP =~ /test/'
53
+ - if: "$CI_SKIP =~ /test/"
41
54
  when: never
42
55
  # Disable if it's a tag pipeline
43
- - if: '$CI_COMMIT_TAG'
56
+ - if: "$CI_COMMIT_TAG"
44
57
  when: never
45
58
  # Enabled for main branch
46
- - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
59
+ - if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
47
60
  when: on_success
48
61
  # Enable for all other branches if it's a MR pipeline
49
- - if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID'
62
+ - if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
50
63
  when: on_success
51
64
  # Make it manual for external MR
52
- - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH'
65
+ - if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
53
66
  when: manual
54
67
  - when: never
55
68
 
56
69
  .private_test_script: &private_test_script
57
70
  stage: private_tests
58
71
  tags:
59
- - hydroqc
60
- image: registry.gitlab.com/hydroqc/hydroqc-base-container/build:20231127050116
72
+ - hydroqc
73
+ image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
61
74
  script:
62
75
  #- apt update && apt install -y jq unzip curl
63
76
  - >
@@ -156,16 +169,16 @@ test:
156
169
  junit: hydroqc/tests_result_junit.*.xml
157
170
  rules:
158
171
  # Disable if it's a tag pipeline
159
- - if: '$CI_COMMIT_TAG'
172
+ - if: "$CI_COMMIT_TAG"
160
173
  when: never
161
174
  # Enabled for main branch
162
- - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
175
+ - if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
163
176
  when: on_success
164
177
  # Enable for all other branches if it's a MR pipeline
165
- - if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID'
178
+ - if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
166
179
  when: on_success
167
180
  # Make it manual for external MR
168
- - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH'
181
+ - if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
169
182
  when: manual
170
183
  - when: never
171
184
 
@@ -174,7 +187,7 @@ D_CPC_titilambert:
174
187
  PROJECT_ID: 35085986
175
188
  <<: *private_test_script
176
189
  rules:
177
- - if: '$CI_SKIP =~ /d_cpc_titilambert/'
190
+ - if: "$CI_SKIP =~ /d_cpc_titilambert/"
178
191
  when: never
179
192
  - !reference [.private_test_script, rules]
180
193
 
@@ -183,7 +196,7 @@ DPC_mdallaire1:
183
196
  PROJECT_ID: 39503160
184
197
  <<: *private_test_script
185
198
  rules:
186
- - if: '$CI_SKIP =~ /dpc_mdallaire1/'
199
+ - if: "$CI_SKIP =~ /dpc_mdallaire1/"
187
200
  when: never
188
201
  - !reference [.private_test_script, rules]
189
202
 
@@ -192,7 +205,7 @@ DT_mdallaire1:
192
205
  PROJECT_ID: 52729124
193
206
  <<: *private_test_script
194
207
  rules:
195
- - if: '$CI_SKIP =~ /dt_mdallaire1/'
208
+ - if: "$CI_SKIP =~ /dt_mdallaire1/"
196
209
  when: never
197
210
  - !reference [.private_test_script, rules]
198
211
 
@@ -201,7 +214,7 @@ D_mdallaire1:
201
214
  PROJECT_ID: 52728916
202
215
  <<: *private_test_script
203
216
  rules:
204
- - if: '$CI_SKIP =~ /d_mdallaire1/'
217
+ - if: "$CI_SKIP =~ /d_mdallaire1/"
205
218
  when: never
206
219
  - !reference [.private_test_script, rules]
207
220
 
@@ -210,7 +223,7 @@ D_weimdall:
210
223
  PROJECT_ID: 39038345
211
224
  <<: *private_test_script
212
225
  rules:
213
- - if: '$CI_SKIP =~ /d_weimdall/'
226
+ - if: "$CI_SKIP =~ /d_weimdall/"
214
227
  when: never
215
228
  - !reference [.private_test_script, rules]
216
229
 
@@ -219,7 +232,7 @@ D_CPC_zepiaf:
219
232
  PROJECT_ID: 39098670
220
233
  <<: *private_test_script
221
234
  rules:
222
- - if: '$CI_SKIP =~ /d_cpc_zepiaf/'
235
+ - if: "$CI_SKIP =~ /d_cpc_zepiaf/"
223
236
  when: never
224
237
  - !reference [.private_test_script, rules]
225
238
 
@@ -228,7 +241,7 @@ D_devzwf:
228
241
  PROJECT_ID: 39310934
229
242
  <<: *private_test_script
230
243
  rules:
231
- - if: '$CI_SKIP =~ /d_devzwf/'
244
+ - if: "$CI_SKIP =~ /d_devzwf/"
232
245
  when: never
233
246
  - !reference [.private_test_script, rules]
234
247
 
@@ -237,15 +250,15 @@ M_hdenergy:
237
250
  PROJECT_ID: 41155894
238
251
  <<: *private_test_script
239
252
  rules:
240
- - if: '$CI_SKIP =~ /m_hdenergy/'
253
+ - if: "$CI_SKIP =~ /m_hdenergy/"
241
254
  when: never
242
255
  - !reference [.private_test_script, rules]
243
256
 
244
257
  private_tests_done:
245
258
  stage: private_tests_done
246
259
  tags:
247
- - hydroqc
248
- image: registry.gitlab.com/hydroqc/hydroqc-base-container/build:20231127050116
260
+ - hydroqc
261
+ image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
249
262
  script:
250
263
  #- apt-get update && apt-get install --no-install-recommends -y python3.10 python3-venv python3-pip --no-install-recommends git
251
264
  - echo "Private Tests done"
@@ -268,27 +281,27 @@ private_tests_done:
268
281
  - "*-job-end-date.svg"
269
282
  rules:
270
283
  # Disable if CI_SKIP is set
271
- - if: '$CI_SKIP =~ /done/'
284
+ - if: "$CI_SKIP =~ /done/"
272
285
  when: never
273
286
  # Disable if it's a tag pipeline
274
- - if: '$CI_COMMIT_TAG'
287
+ - if: "$CI_COMMIT_TAG"
275
288
  when: never
276
289
  # Enabled for main branch
277
- - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
290
+ - if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
278
291
  when: on_success
279
292
  # Enable for all other branches if it's a MR pipeline
280
- - if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID'
293
+ - if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
281
294
  when: on_success
282
295
  # Make it manual for external MR
283
- - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH'
296
+ - if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
284
297
  when: manual
285
298
  - when: never
286
299
 
287
300
  package:
288
301
  stage: test
289
302
  tags:
290
- - hydroqc
291
- image: registry.gitlab.com/hydroqc/hydroqc-base-container/build:20231127050116
303
+ - hydroqc
304
+ image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
292
305
  script:
293
306
  # Build a package with a version based on the commmit short sha
294
307
  - pip install --upgrade pip
@@ -298,27 +311,27 @@ package:
298
311
  - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
299
312
  rules:
300
313
  # Disable if CI_SKIP is set
301
- - if: '$CI_SKIP =~ /package/'
314
+ - if: "$CI_SKIP =~ /package/"
302
315
  when: never
303
316
  # Disable if it's a tag pipeline
304
- - if: '$CI_COMMIT_TAG'
317
+ - if: "$CI_COMMIT_TAG"
305
318
  when: never
306
319
  # Enabled for main branch
307
- - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
320
+ - if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
308
321
  when: on_success
309
322
  # Enable for all other branches if it's a MR pipeline
310
- - if: '$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID'
323
+ - if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
311
324
  when: on_success
312
325
  # Make it manual for external MR
313
- - if: '$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH'
326
+ - if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
314
327
  when: manual
315
328
  - when: never
316
329
 
317
330
  promote2pypi:
318
331
  stage: pypi
319
332
  tags:
320
- - hydroqc
321
- image: registry.gitlab.com/hydroqc/hydroqc-base-container/build:20231127050116
333
+ - hydroqc
334
+ image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
322
335
  script:
323
336
  # TODO: try to pull the good package from gitlab pypi repo
324
337
  # then change the version (promote)
@@ -333,8 +346,7 @@ promote2pypi:
333
346
  #- |
334
347
  # pip download Hydro-Quebec-API-Wrapper --extra-index-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --no-deps
335
348
  # TODO: open archives edit versions and rebuild archive
336
- #- cd ..
337
- #- apt-get update && apt-get install --no-install-recommends -y python3.10 python3-venv python3-pip git
349
+
338
350
  # Build package that could be promoted
339
351
  - pip install --upgrade pip
340
352
  - pip install --upgrade build setuptools_scm twine
@@ -342,8 +354,8 @@ promote2pypi:
342
354
  - python3 -m twine check --strict dist/*
343
355
  - twine upload --verbose --non-interactive --repository pypi dist/*
344
356
  rules:
345
- - if: '$CI_SKIP =~ /pypi/'
357
+ - if: "$CI_SKIP =~ /pypi/"
346
358
  when: never
347
- - if: '$CI_COMMIT_TAG'
359
+ - if: "$CI_COMMIT_TAG"
348
360
  when: on_success
349
361
  - when: never
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Hydro-Quebec-API-Wrapper
3
- Version: 3.1.0
3
+ Version: 3.1.1
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>
@@ -10,7 +10,7 @@ README.md
10
10
  config.default.yaml
11
11
  conflict_test_requirements.txt
12
12
  pyproject.toml
13
- renovate.json
13
+ renovate.json5
14
14
  setup.cfg
15
15
  test_requirements.txt
16
16
  tox.ini
@@ -60,7 +60,6 @@ hydroqc/contract/contract_m_gdp.py
60
60
  hydroqc/contract/contract_residential.py
61
61
  hydroqc/contract/outage.py
62
62
  hydroqc/hydro_api/__init__.py
63
- hydroqc/hydro_api/auth.py
64
63
  hydroqc/hydro_api/cache.py
65
64
  hydroqc/hydro_api/client.py
66
65
  hydroqc/hydro_api/consts.py
@@ -2,3 +2,4 @@ aiohttp==3.8.5
2
2
  python-dateutil==2.8.2
3
3
  pytz==2023.3.post1
4
4
  aiocache==0.12.2
5
+ pkce==1.0.3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Hydro-Quebec-API-Wrapper
3
- Version: 3.1.0
3
+ Version: 3.1.1
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>
@@ -8,6 +8,12 @@ class HydroQcError(Exception):
8
8
  class HydroQcHTTPError(HydroQcError):
9
9
  """HTTP HydroQc Error."""
10
10
 
11
+ def __init__(self, message: str, status_code: int | None = None) -> None:
12
+ """Initialize."""
13
+ self.message = message
14
+ self.status_code = status_code
15
+ super().__init__(message)
16
+
11
17
 
12
18
  class HydroQcAnnualError(HydroQcError):
13
19
  """Annual HydroQc Error."""