Hydro-Quebec-API-Wrapper 3.0.9__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.
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitignore +17 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitlab-ci.yml +76 -46
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO +3 -2
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt +1 -1
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +1 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/PKG-INFO +3 -2
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/README.md +2 -1
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/config.default.yaml +5 -5
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/conf.py +19 -16
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/todo.rst +0 -1
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/examples/hydro.py +10 -5
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/diagnostic.py +3 -3
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/error.py +6 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/client.py +264 -159
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/consts.py +28 -9
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/handler.py +1 -1
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/handler.py +1 -1
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/outage.py +6 -5
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/webuser.py +5 -9
- Hydro-Quebec-API-Wrapper-3.1.1/renovate.json5 +136 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/setup.cfg +1 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_common.py +0 -17
- Hydro-Quebec-API-Wrapper-3.0.9/renovate.json +0 -69
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.coveragerc +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.flake8 +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.pre-commit-config.yaml +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/.pylintrc +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/dependency_links.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/entry_points.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/top_level.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/LICENSE +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/MANIFEST.in +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/conflict_test_requirements.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/Makefile +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/make.bat +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/custom.css +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo-128.png +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo.svg +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/external/description-des-codes-interruption.pdf +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/index.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.contract.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.hydro_api.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.cpc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.dpc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.types.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/modules.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/account.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/common.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d_cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m_gdp.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_residential.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/outage.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/customer.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/cache.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/logger.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/peak.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/peak.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/py.typed +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/timerange.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/account.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/common.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/consump.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/contract.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/utils.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo-128.png +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo.svg +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/pyproject.toml +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/test_requirements.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/conftest.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d_cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m_gdp.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_basic.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_timerange.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/tools.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.0.9 → 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
|
-
|
|
19
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
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:
|
|
53
|
+
- if: "$CI_SKIP =~ /test/"
|
|
41
54
|
when: never
|
|
42
55
|
# Disable if it's a tag pipeline
|
|
43
|
-
- if:
|
|
56
|
+
- if: "$CI_COMMIT_TAG"
|
|
44
57
|
when: never
|
|
45
58
|
# Enabled for main branch
|
|
46
|
-
- if:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
60
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
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:
|
|
172
|
+
- if: "$CI_COMMIT_TAG"
|
|
160
173
|
when: never
|
|
161
174
|
# Enabled for main branch
|
|
162
|
-
- if:
|
|
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:
|
|
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:
|
|
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,16 +187,34 @@ D_CPC_titilambert:
|
|
|
174
187
|
PROJECT_ID: 35085986
|
|
175
188
|
<<: *private_test_script
|
|
176
189
|
rules:
|
|
177
|
-
- if:
|
|
190
|
+
- if: "$CI_SKIP =~ /d_cpc_titilambert/"
|
|
178
191
|
when: never
|
|
179
192
|
- !reference [.private_test_script, rules]
|
|
180
193
|
|
|
181
|
-
|
|
194
|
+
DPC_mdallaire1:
|
|
182
195
|
variables:
|
|
183
196
|
PROJECT_ID: 39503160
|
|
184
197
|
<<: *private_test_script
|
|
185
198
|
rules:
|
|
186
|
-
- if:
|
|
199
|
+
- if: "$CI_SKIP =~ /dpc_mdallaire1/"
|
|
200
|
+
when: never
|
|
201
|
+
- !reference [.private_test_script, rules]
|
|
202
|
+
|
|
203
|
+
DT_mdallaire1:
|
|
204
|
+
variables:
|
|
205
|
+
PROJECT_ID: 52729124
|
|
206
|
+
<<: *private_test_script
|
|
207
|
+
rules:
|
|
208
|
+
- if: "$CI_SKIP =~ /dt_mdallaire1/"
|
|
209
|
+
when: never
|
|
210
|
+
- !reference [.private_test_script, rules]
|
|
211
|
+
|
|
212
|
+
D_mdallaire1:
|
|
213
|
+
variables:
|
|
214
|
+
PROJECT_ID: 52728916
|
|
215
|
+
<<: *private_test_script
|
|
216
|
+
rules:
|
|
217
|
+
- if: "$CI_SKIP =~ /d_mdallaire1/"
|
|
187
218
|
when: never
|
|
188
219
|
- !reference [.private_test_script, rules]
|
|
189
220
|
|
|
@@ -192,7 +223,7 @@ D_weimdall:
|
|
|
192
223
|
PROJECT_ID: 39038345
|
|
193
224
|
<<: *private_test_script
|
|
194
225
|
rules:
|
|
195
|
-
- if:
|
|
226
|
+
- if: "$CI_SKIP =~ /d_weimdall/"
|
|
196
227
|
when: never
|
|
197
228
|
- !reference [.private_test_script, rules]
|
|
198
229
|
|
|
@@ -201,7 +232,7 @@ D_CPC_zepiaf:
|
|
|
201
232
|
PROJECT_ID: 39098670
|
|
202
233
|
<<: *private_test_script
|
|
203
234
|
rules:
|
|
204
|
-
- if:
|
|
235
|
+
- if: "$CI_SKIP =~ /d_cpc_zepiaf/"
|
|
205
236
|
when: never
|
|
206
237
|
- !reference [.private_test_script, rules]
|
|
207
238
|
|
|
@@ -210,7 +241,7 @@ D_devzwf:
|
|
|
210
241
|
PROJECT_ID: 39310934
|
|
211
242
|
<<: *private_test_script
|
|
212
243
|
rules:
|
|
213
|
-
- if:
|
|
244
|
+
- if: "$CI_SKIP =~ /d_devzwf/"
|
|
214
245
|
when: never
|
|
215
246
|
- !reference [.private_test_script, rules]
|
|
216
247
|
|
|
@@ -219,15 +250,15 @@ M_hdenergy:
|
|
|
219
250
|
PROJECT_ID: 41155894
|
|
220
251
|
<<: *private_test_script
|
|
221
252
|
rules:
|
|
222
|
-
- if:
|
|
253
|
+
- if: "$CI_SKIP =~ /m_hdenergy/"
|
|
223
254
|
when: never
|
|
224
255
|
- !reference [.private_test_script, rules]
|
|
225
256
|
|
|
226
257
|
private_tests_done:
|
|
227
258
|
stage: private_tests_done
|
|
228
259
|
tags:
|
|
229
|
-
|
|
230
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
260
|
+
- hydroqc
|
|
261
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
|
|
231
262
|
script:
|
|
232
263
|
#- apt-get update && apt-get install --no-install-recommends -y python3.10 python3-venv python3-pip --no-install-recommends git
|
|
233
264
|
- echo "Private Tests done"
|
|
@@ -250,27 +281,27 @@ private_tests_done:
|
|
|
250
281
|
- "*-job-end-date.svg"
|
|
251
282
|
rules:
|
|
252
283
|
# Disable if CI_SKIP is set
|
|
253
|
-
- if:
|
|
284
|
+
- if: "$CI_SKIP =~ /done/"
|
|
254
285
|
when: never
|
|
255
286
|
# Disable if it's a tag pipeline
|
|
256
|
-
- if:
|
|
287
|
+
- if: "$CI_COMMIT_TAG"
|
|
257
288
|
when: never
|
|
258
289
|
# Enabled for main branch
|
|
259
|
-
- if:
|
|
290
|
+
- if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
|
|
260
291
|
when: on_success
|
|
261
292
|
# Enable for all other branches if it's a MR pipeline
|
|
262
|
-
- if:
|
|
293
|
+
- if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
|
|
263
294
|
when: on_success
|
|
264
295
|
# Make it manual for external MR
|
|
265
|
-
- if:
|
|
296
|
+
- if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
|
|
266
297
|
when: manual
|
|
267
298
|
- when: never
|
|
268
299
|
|
|
269
300
|
package:
|
|
270
301
|
stage: test
|
|
271
302
|
tags:
|
|
272
|
-
|
|
273
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
303
|
+
- hydroqc
|
|
304
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
|
|
274
305
|
script:
|
|
275
306
|
# Build a package with a version based on the commmit short sha
|
|
276
307
|
- pip install --upgrade pip
|
|
@@ -280,27 +311,27 @@ package:
|
|
|
280
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/*
|
|
281
312
|
rules:
|
|
282
313
|
# Disable if CI_SKIP is set
|
|
283
|
-
- if:
|
|
314
|
+
- if: "$CI_SKIP =~ /package/"
|
|
284
315
|
when: never
|
|
285
316
|
# Disable if it's a tag pipeline
|
|
286
|
-
- if:
|
|
317
|
+
- if: "$CI_COMMIT_TAG"
|
|
287
318
|
when: never
|
|
288
319
|
# Enabled for main branch
|
|
289
|
-
- if:
|
|
320
|
+
- if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
|
|
290
321
|
when: on_success
|
|
291
322
|
# Enable for all other branches if it's a MR pipeline
|
|
292
|
-
- if:
|
|
323
|
+
- if: "$CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_IID"
|
|
293
324
|
when: on_success
|
|
294
325
|
# Make it manual for external MR
|
|
295
|
-
- if:
|
|
326
|
+
- if: "$CI_MERGE_REQUEST_IID && $CI_MERGE_REQUEST_PROJECT_PATH != $CI_MERGE_REQUEST_SOURCE_PROJECT_PATH"
|
|
296
327
|
when: manual
|
|
297
328
|
- when: never
|
|
298
329
|
|
|
299
330
|
promote2pypi:
|
|
300
331
|
stage: pypi
|
|
301
332
|
tags:
|
|
302
|
-
|
|
303
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
333
|
+
- hydroqc
|
|
334
|
+
image: registry.gitlab.com/hydroqc/hydroqc-base-container/3.11@sha256:049f7935029b57bdb18554561581fde63e454fc51be38b89214ff8dc9de35db0
|
|
304
335
|
script:
|
|
305
336
|
# TODO: try to pull the good package from gitlab pypi repo
|
|
306
337
|
# then change the version (promote)
|
|
@@ -315,8 +346,7 @@ promote2pypi:
|
|
|
315
346
|
#- |
|
|
316
347
|
# pip download Hydro-Quebec-API-Wrapper --extra-index-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi/simple --no-deps
|
|
317
348
|
# TODO: open archives edit versions and rebuild archive
|
|
318
|
-
|
|
319
|
-
#- apt-get update && apt-get install --no-install-recommends -y python3.10 python3-venv python3-pip git
|
|
349
|
+
|
|
320
350
|
# Build package that could be promoted
|
|
321
351
|
- pip install --upgrade pip
|
|
322
352
|
- pip install --upgrade build setuptools_scm twine
|
|
@@ -324,8 +354,8 @@ promote2pypi:
|
|
|
324
354
|
- python3 -m twine check --strict dist/*
|
|
325
355
|
- twine upload --verbose --non-interactive --repository pypi dist/*
|
|
326
356
|
rules:
|
|
327
|
-
- if:
|
|
357
|
+
- if: "$CI_SKIP =~ /pypi/"
|
|
328
358
|
when: never
|
|
329
|
-
- if:
|
|
359
|
+
- if: "$CI_COMMIT_TAG"
|
|
330
360
|
when: on_success
|
|
331
361
|
- when: never
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Hydro-Quebec-API-Wrapper
|
|
3
|
-
Version: 3.
|
|
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>
|
|
@@ -45,6 +45,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
45
45
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
46
46
|
| - | - | - | - | - | - |
|
|
47
47
|
| D | - | @weimdall |  |  | |
|
|
48
|
+
| D | - | @mdallaire1 |  |  | |
|
|
48
49
|
| D | - | @devzwf |  |  | Hilo |
|
|
49
50
|
| D | CPC | @titilambert | |  | |
|
|
50
51
|
|
|
@@ -58,7 +59,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
58
59
|
|
|
59
60
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
60
61
|
| - | - | - | - | - | - |
|
|
61
|
-
| DT | - | @mdallaire1 |  |  |
|
|
62
63
|
|
|
63
64
|
#### Rate M
|
|
64
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: Hydro-Quebec-API-Wrapper
|
|
3
|
-
Version: 3.
|
|
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>
|
|
@@ -45,6 +45,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
45
45
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
46
46
|
| - | - | - | - | - | - |
|
|
47
47
|
| D | - | @weimdall |  |  | |
|
|
48
|
+
| D | - | @mdallaire1 |  |  | |
|
|
48
49
|
| D | - | @devzwf |  |  | Hilo |
|
|
49
50
|
| D | CPC | @titilambert | |  | |
|
|
50
51
|
|
|
@@ -58,7 +59,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
58
59
|
|
|
59
60
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
60
61
|
| - | - | - | - | - | - |
|
|
61
|
-
| DT | - | @mdallaire1 |  |  |
|
|
62
63
|
|
|
63
64
|
#### Rate M
|
|
64
65
|
|
|
@@ -27,6 +27,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
27
27
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
28
28
|
| - | - | - | - | - | - |
|
|
29
29
|
| D | - | @weimdall |  |  | |
|
|
30
|
+
| D | - | @mdallaire1 |  |  | |
|
|
30
31
|
| D | - | @devzwf |  |  | Hilo |
|
|
31
32
|
| D | CPC | @titilambert | |  | |
|
|
32
33
|
|
|
@@ -40,7 +41,7 @@ Each account, contracts and rates are different and we do our best to integrate
|
|
|
40
41
|
|
|
41
42
|
| Base Rate | Rate Option | Tester | Test result | Last run | Comment |
|
|
42
43
|
| - | - | - | - | - | - |
|
|
43
|
-
| DT | - | @mdallaire1 |  |  |
|
|
44
45
|
|
|
45
46
|
#### Rate M
|
|
46
47
|
|
|
@@ -18,19 +18,19 @@ credentials:
|
|
|
18
18
|
# # Offset in hours to apply to the peak period start time to find the start of the anchor period
|
|
19
19
|
# # Per HQ documentation (as of winter 2021-2022) it is 5 hours before the next peak
|
|
20
20
|
# anchor_start_offset: 5
|
|
21
|
-
#
|
|
21
|
+
#
|
|
22
22
|
# # Duration of the anchor period
|
|
23
23
|
# # Per HQ documentation (as of winter 2021-2022) it is a duration of 3 hours
|
|
24
|
-
# anchor_duration: 3
|
|
25
|
-
#
|
|
24
|
+
# anchor_duration: 3
|
|
25
|
+
#
|
|
26
26
|
# # Data will be refreshed after 5mn (avoid killing hydro api)
|
|
27
27
|
# event_refresh_seconds: 300
|
|
28
|
-
#
|
|
28
|
+
#
|
|
29
29
|
# # Pre-heat offset
|
|
30
30
|
# # Will not be calculated if pre_heat_start_offset = 0
|
|
31
31
|
# pre_heat_start_offset: 3
|
|
32
32
|
# pre_heat_end_offset: 0
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
#mqtt:
|
|
35
35
|
# server: ''
|
|
36
36
|
# port: 1883
|
|
@@ -12,17 +12,18 @@
|
|
|
12
12
|
#
|
|
13
13
|
import os
|
|
14
14
|
import sys
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
sys.path.insert(0, os.path.abspath("../../"))
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
# -- Project information -----------------------------------------------------
|
|
19
20
|
|
|
20
|
-
project =
|
|
21
|
-
copyright =
|
|
22
|
-
author =
|
|
21
|
+
project = "Hydro Quebec API Wrapper"
|
|
22
|
+
copyright = "2022, Olivier BEAU"
|
|
23
|
+
author = "Olivier BEAU"
|
|
23
24
|
|
|
24
25
|
# The full version, including alpha/beta/rc tags
|
|
25
|
-
release =
|
|
26
|
+
release = "latest"
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
# -- General configuration ---------------------------------------------------
|
|
@@ -31,17 +32,17 @@ release = 'latest'
|
|
|
31
32
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
32
33
|
# ones.
|
|
33
34
|
extensions = [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
"sphinx.ext.autodoc",
|
|
36
|
+
"sphinx.ext.viewcode",
|
|
37
|
+
"sphinx.ext.todo",
|
|
38
|
+
"sphinx.ext.graphviz",
|
|
39
|
+
"sphinx.ext.githubpages",
|
|
40
|
+
"sphinx.ext.inheritance_diagram",
|
|
41
|
+
"sphinx.ext.doctest",
|
|
41
42
|
]
|
|
42
43
|
|
|
43
44
|
# Add any paths that contain templates here, relative to this directory.
|
|
44
|
-
templates_path = [
|
|
45
|
+
templates_path = ["_templates"]
|
|
45
46
|
|
|
46
47
|
# List of patterns, relative to source directory, that match files and
|
|
47
48
|
# directories to ignore when looking for source files.
|
|
@@ -54,17 +55,19 @@ exclude_patterns = []
|
|
|
54
55
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
55
56
|
# a list of builtin themes.
|
|
56
57
|
#
|
|
57
|
-
html_theme =
|
|
58
|
+
html_theme = "sphinx_rtd_theme"
|
|
58
59
|
|
|
59
60
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
60
61
|
# relative to this directory. They are copied after the builtin static files,
|
|
61
62
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
62
|
-
html_static_path = [
|
|
63
|
+
html_static_path = ["_static"]
|
|
63
64
|
|
|
64
65
|
|
|
65
66
|
# -- Extension configuration -------------------------------------------------
|
|
66
67
|
|
|
67
|
-
html_css_files = [
|
|
68
|
+
html_css_files = [
|
|
69
|
+
"custom.css",
|
|
70
|
+
]
|
|
68
71
|
html_logo = "_static/hydroqc-logo-128.png"
|
|
69
72
|
|
|
70
73
|
todo_include_todos = True
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
import asyncio
|
|
3
3
|
import os
|
|
4
|
+
|
|
4
5
|
from hydroqc.webuser import WebUser
|
|
5
6
|
|
|
6
|
-
USERNAME = os.getenv(
|
|
7
|
-
PASSWORD = os.getenv(
|
|
7
|
+
USERNAME = os.getenv("hydroQcUsername")
|
|
8
|
+
PASSWORD = os.getenv("hydroQcPassword")
|
|
9
|
+
|
|
10
|
+
webuser = WebUser(
|
|
11
|
+
USERNAME, PASSWORD, verify_ssl=False, log_level="ERROR", http_log_level="ERROR"
|
|
12
|
+
)
|
|
13
|
+
|
|
8
14
|
|
|
9
|
-
webuser = WebUser(USERNAME,PASSWORD, verify_ssl=False, log_level="ERROR", http_log_level="ERROR")
|
|
10
15
|
async def async_func():
|
|
11
16
|
await webuser.login()
|
|
12
17
|
await webuser.get_info()
|
|
@@ -41,10 +46,10 @@ async def async_func():
|
|
|
41
46
|
await contract.winter_credit.refresh_data()
|
|
42
47
|
wc = contract.winter_credit.__dict__
|
|
43
48
|
for k in wc.keys():
|
|
44
|
-
if not k.startswith(
|
|
49
|
+
if not k.startswith("value_"):
|
|
45
50
|
continue
|
|
46
51
|
else:
|
|
47
|
-
print(k +
|
|
52
|
+
print(k + " : " + str(wc[k]))
|
|
48
53
|
# Still accessible through the data property
|
|
49
54
|
data = contract.winter_credit.raw_data
|
|
50
55
|
print(data)
|
|
@@ -261,10 +261,10 @@ class Diagnostic:
|
|
|
261
261
|
# Contract Specific calls
|
|
262
262
|
# CPC/Winter Credit
|
|
263
263
|
if self.contract.rate == "D" and self.contract.rate_option == "CPC":
|
|
264
|
-
self.logger.info("Trying to get cpc data")
|
|
264
|
+
self.logger.info("%02d - Trying to get cpc data", self.diag_id)
|
|
265
265
|
contract_dcpc = cast(ContractDCPC, self.contract)
|
|
266
266
|
await contract_dcpc.peak_handler.refresh_data()
|
|
267
|
-
self.logger.info("Got cpc data")
|
|
267
|
+
self.logger.info("%02d - Got cpc data", self.diag_id - 1)
|
|
268
268
|
|
|
269
269
|
# DCP/FlexD
|
|
270
270
|
elif self.contract.rate == "DPC":
|
|
@@ -384,7 +384,7 @@ def main() -> None:
|
|
|
384
384
|
|
|
385
385
|
# Fetch data
|
|
386
386
|
loop.run_until_complete(diag.run())
|
|
387
|
-
close_fut = asyncio.
|
|
387
|
+
close_fut = asyncio.gather(diag.webuser.close_session())
|
|
388
388
|
loop.run_until_complete(close_fut)
|
|
389
389
|
loop.close()
|
|
390
390
|
# zip
|
|
@@ -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."""
|