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.
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitignore +17 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.gitlab-ci.yml +59 -47
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/PKG-INFO +1 -1
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/SOURCES.txt +1 -2
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/Hydro_Quebec_API_Wrapper.egg-info/requires.txt +1 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/PKG-INFO +1 -1
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/error.py +6 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/client.py +98 -69
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/consts.py +3 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/outage.py +6 -5
- {Hydro-Quebec-API-Wrapper-3.1.0 → 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.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/setup.cfg +1 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_common.py +0 -17
- Hydro-Quebec-API-Wrapper-3.1.0/hydroqc/hydro_api/auth.py +0 -106
- Hydro-Quebec-API-Wrapper-3.1.0/renovate.json +0 -69
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.coveragerc +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.flake8 +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.pre-commit-config.yaml +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/.pylintrc +0 -0
- {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
- {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
- {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
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/LICENSE +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/MANIFEST.in +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/README.md +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/config.default.yaml +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/conflict_test_requirements.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/Makefile +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/make.bat +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/custom.css +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo-128.png +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/_static/hydroqc-logo.svg +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/conf.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/external/description-des-codes-interruption.pdf +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/index.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.contract.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.hydro_api.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.cpc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.dpc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.peak.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/hydroqc.types.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/reference/modules.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/docs/source/todo.rst +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/examples/hydro.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/account.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/common.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_d_cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_m_gdp.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/contract_residential.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/contract/outage.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/customer.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/diagnostic.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/hydro_api/cache.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/logger.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/handler.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/cpc/peak.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/consts.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/handler.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/peak/dpc/peak.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/py.typed +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/timerange.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/account.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/common.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/consump.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/contract.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/types/dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/hydroqc/utils.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo-128.png +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/logo/hydroqc-logo.svg +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/pyproject.toml +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/test_requirements.txt +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/__init__.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/conftest.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_d_cpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dpc.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_dt.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/subtest_contract_m_gdp.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_basic.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/test_timerange.py +0 -0
- {Hydro-Quebec-API-Wrapper-3.1.0 → Hydro-Quebec-API-Wrapper-3.1.1}/tests/tools.py +0 -0
- {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
|
-
|
|
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,7 +187,7 @@ 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
|
|
|
@@ -183,7 +196,7 @@ DPC_mdallaire1:
|
|
|
183
196
|
PROJECT_ID: 39503160
|
|
184
197
|
<<: *private_test_script
|
|
185
198
|
rules:
|
|
186
|
-
- if:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
248
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
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:
|
|
284
|
+
- if: "$CI_SKIP =~ /done/"
|
|
272
285
|
when: never
|
|
273
286
|
# Disable if it's a tag pipeline
|
|
274
|
-
- if:
|
|
287
|
+
- if: "$CI_COMMIT_TAG"
|
|
275
288
|
when: never
|
|
276
289
|
# Enabled for main branch
|
|
277
|
-
- if:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
291
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
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:
|
|
314
|
+
- if: "$CI_SKIP =~ /package/"
|
|
302
315
|
when: never
|
|
303
316
|
# Disable if it's a tag pipeline
|
|
304
|
-
- if:
|
|
317
|
+
- if: "$CI_COMMIT_TAG"
|
|
305
318
|
when: never
|
|
306
319
|
# Enabled for main branch
|
|
307
|
-
- if:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
321
|
-
image: registry.gitlab.com/hydroqc/hydroqc-base-container/
|
|
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
|
-
|
|
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:
|
|
357
|
+
- if: "$CI_SKIP =~ /pypi/"
|
|
346
358
|
when: never
|
|
347
|
-
- if:
|
|
359
|
+
- if: "$CI_COMMIT_TAG"
|
|
348
360
|
when: on_success
|
|
349
361
|
- when: never
|
|
@@ -10,7 +10,7 @@ README.md
|
|
|
10
10
|
config.default.yaml
|
|
11
11
|
conflict_test_requirements.txt
|
|
12
12
|
pyproject.toml
|
|
13
|
-
renovate.
|
|
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
|
|
@@ -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."""
|