pygazpar 1.3.0a25__tar.gz → 1.3.0b2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. pygazpar-1.3.0a25/pygazpar.egg-info/PKG-INFO → pygazpar-1.3.0b2/CHANGELOG.md +251 -477
  2. pygazpar-1.3.0a25/LICENSE.md → pygazpar-1.3.0b2/LICENSE +21 -21
  3. pygazpar-1.3.0b2/PKG-INFO +220 -0
  4. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/README.md +7 -6
  5. pygazpar-1.3.0b2/pygazpar/__init__.py +10 -0
  6. pygazpar-1.3.0b2/pygazpar/__main__.py +81 -0
  7. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/client.py +64 -59
  8. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/datasource.py +177 -76
  9. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/excelparser.py +15 -15
  10. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/jsonparser.py +53 -50
  11. pygazpar-1.3.0b2/pygazpar/version.py +3 -0
  12. pygazpar-1.3.0b2/pyproject.toml +67 -0
  13. pygazpar-1.3.0a25/MANIFEST.in +0 -5
  14. pygazpar-1.3.0a25/PKG-INFO +0 -477
  15. pygazpar-1.3.0a25/pygazpar/__init__.py +0 -4
  16. pygazpar-1.3.0a25/pygazpar/__main__.py +0 -83
  17. pygazpar-1.3.0a25/pygazpar/version.py +0 -1
  18. pygazpar-1.3.0a25/pygazpar.egg-info/SOURCES.txt +0 -33
  19. pygazpar-1.3.0a25/pygazpar.egg-info/dependency_links.txt +0 -1
  20. pygazpar-1.3.0a25/pygazpar.egg-info/entry_points.txt +0 -2
  21. pygazpar-1.3.0a25/pygazpar.egg-info/not-zip-safe +0 -1
  22. pygazpar-1.3.0a25/pygazpar.egg-info/requires.txt +0 -3
  23. pygazpar-1.3.0a25/pygazpar.egg-info/top_level.txt +0 -3
  24. pygazpar-1.3.0a25/samples/__init__.py +0 -0
  25. pygazpar-1.3.0a25/samples/excelSample.py +0 -31
  26. pygazpar-1.3.0a25/samples/jsonSample.py +0 -30
  27. pygazpar-1.3.0a25/samples/testSample.py +0 -18
  28. pygazpar-1.3.0a25/setup.cfg +0 -53
  29. pygazpar-1.3.0a25/setup.py +0 -3
  30. pygazpar-1.3.0a25/tests/__init__.py +0 -0
  31. pygazpar-1.3.0a25/tests/test_client.py +0 -159
  32. pygazpar-1.3.0a25/tests/test_datafileparser.py +0 -20
  33. pygazpar-1.3.0a25/tests/test_datasource.py +0 -166
  34. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/enum.py +0 -0
  35. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/resources/daily_data_sample.json +0 -0
  36. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/resources/hourly_data_sample.json +0 -0
  37. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/resources/monthly_data_sample.json +0 -0
  38. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/resources/weekly_data_sample.json +0 -0
  39. {pygazpar-1.3.0a25 → pygazpar-1.3.0b2}/pygazpar/resources/yearly_data_sample.json +0 -0
@@ -1,477 +1,251 @@
1
- Metadata-Version: 2.1
2
- Name: pygazpar
3
- Version: 1.3.0a25
4
- Summary: Retrieve gas consumption from GrDF web site (French Gas Company)
5
- Home-page: https://github.com/ssenart/pygazpar
6
- Download-URL: https://github.com/ssenart/pygazpar/releases
7
- Author: Stephane Senart
8
- Author-email: stephane.senart@gmail.com
9
- License: MIT
10
- Project-URL: Home, https://github.com/ssenart/pygazpar
11
- Project-URL: Source, https://github.com/ssenart/pygazpar
12
- Project-URL: Issues, https://github.com/ssenart/PyGazpar/issues
13
- Project-URL: Changelog, https://github.com/ssenart/PyGazpar/blob/master/CHANGELOG.md
14
- Project-URL: Download, https://pypi.org/project/pygazpar
15
- Keywords: Energy,Natural Gas,Meter,GrDF,Gazpar
16
- Platform: any
17
- Classifier: Development Status :: 5 - Production/Stable
18
- Classifier: Topic :: Software Development :: Libraries
19
- Classifier: Operating System :: OS Independent
20
- Classifier: Programming Language :: Python :: 3.9
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Programming Language :: Python :: 3.12
24
- Classifier: Programming Language :: Python :: 3.13
25
- Requires-Python: >=3.9
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE.md
28
-
29
- # PyGazpar
30
-
31
- ## $\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$
32
-
33
- PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
34
-
35
- Their natural gas meter is called Gazpar. It is wireless and transmit the gas consumption once per day.
36
-
37
- All consumption data is available on the client account at GrDF Web Site (https://monespace.grdf.fr).
38
-
39
- PyGazpar automatically goes through the Web Site and download the consumption data, and make it available in a Python structure.
40
-
41
- ## Installation
42
-
43
- ### Requirements
44
- PyGazpar does not require Selenium and corresponding geckodriver to work.
45
-
46
- With the new GrDF web site, it is possible to load the consumption data far easily than before.
47
-
48
- ### Create your virtual environment
49
- ```bash
50
- $ cd /path/to/my_project_folder/
51
-
52
- $ python -m venv .venv
53
- ```
54
-
55
- ### PyGazpar installation
56
- Activate your virtual environment.
57
- ```bash
58
- source .venv/bin/activate
59
- ```
60
-
61
- Use the package manager [pip](https://pip.pypa.io/en/stable/) to install PyGazpar.
62
- ```bash
63
- pip install pygazpar
64
- ```
65
-
66
- You can also download the source code and install it manually.
67
- ```bash
68
- cd /path/to/pygazpar/
69
- python setup.py install
70
- ```
71
-
72
- ## Usage
73
-
74
- #### Command line:
75
-
76
- 1. Standard usage (using Json GrDF API).
77
-
78
- ```bash
79
- $ pygazpar -u 'your login' -p 'your password' -c 'your PCE identifier' --datasource 'json'
80
- ```
81
-
82
- 2. Alternate usage (using Excel GrDF document).
83
-
84
- ```bash
85
- $ pygazpar -u 'your login' -p 'your password' -c 'your PCE identifier' -t 'temporary directory where to store Excel file (ex: /tmp)' --datasource 'excel'
86
- ```
87
-
88
- 3. Test usage (using local static data files, do not connect to GrDF site).
89
-
90
- ```bash
91
- $ pygazpar -u 'your login' -p 'your password' -c 'your PCE identifier' --datasource 'test'
92
- ```
93
-
94
- #### Library:
95
-
96
- 1. Standard usage (using Json GrDF API).
97
-
98
- ```python
99
- import pygazpar
100
-
101
- client = pygazpar.Client(pygazpar.JsonWebDataSource(
102
- username='your login',
103
- password='your password')
104
- )
105
-
106
- data = client.loadSince(pceIdentifier='your PCE identifier',
107
- lastNDays=60,
108
- frequencies=[pygazpar.Frequency.DAILY, pygazpar.Frequency.MONTHLY])
109
- ```
110
- See [samples/jsonSample.py](samples/jsonSample.py) file for the full example.
111
-
112
- 2. Alternate usage (using Excel GrDF document).
113
-
114
- ```python
115
- import pygazpar
116
-
117
- client = pygazpar.Client(pygazpar.ExcelWebDataSource(
118
- username='your login',
119
- password='your password')
120
- )
121
-
122
- data = client.loadSince(pceIdentifier='your PCE identifier',
123
- lastNDays=60,
124
- frequencies=[pygazpar.Frequency.DAILY, pygazpar.Frequency.MONTHLY])
125
- ```
126
- See [samples/excelSample.py](samples/jsonSample.py) file for the full example.
127
-
128
- 3. Test usage (using local static data files, do not connect to GrDF site).
129
-
130
- ```python
131
- import pygazpar
132
-
133
- client = pygazpar.Client(pygazpar.TestDataSource())
134
-
135
- data = client.loadSince(pceIdentifier='your PCE identifier',
136
- lastNDays=10,
137
- frequencies=[pygazpar.Frequency.DAILY, Frequency.MONTHLY])
138
- ```
139
- See [samples/testSample.py](samples/jsonSample.py) file for the full example.
140
-
141
- #### Output:
142
-
143
- ```json
144
- data =>
145
- {
146
- "daily": [
147
- {
148
- "time_period": "13/10/2022",
149
- "start_index_m3": 15724,
150
- "end_index_m3": 15725,
151
- "volume_m3": 2,
152
- "energy_kwh": 17,
153
- "converter_factor_kwh/m3": 11.16,
154
- "temperature_degC": null,
155
- "type": "Mesur\u00e9",
156
- "timestamp": "2022-12-13T23:58:35.606763"
157
- },
158
- ...
159
- {
160
- "time_period": "11/12/2022",
161
- "start_index_m3": 16081,
162
- "end_index_m3": 16098,
163
- "volume_m3": 18,
164
- "energy_kwh": 201,
165
- "converter_factor_kwh/m3": 11.27,
166
- "temperature_degC": -1.47,
167
- "type": "Mesur\u00e9",
168
- "timestamp": "2022-12-13T23:58:35.606763"
169
- }
170
- ],
171
- "monthly": [
172
- {
173
- "time_period": "Novembre 2022",
174
- "start_index_m3": 15750,
175
- "end_index_m3": 15950,
176
- "volume_m3": 204,
177
- "energy_kwh": 2227,
178
- "timestamp": "2022-12-13T23:58:35.606763"
179
- },
180
- {
181
- "time_period": "D\u00e9cembre 2022",
182
- "start_index_m3": 15950,
183
- "end_index_m3": 16098,
184
- "volume_m3": 148,
185
- "energy_kwh": 1664,
186
- "timestamp": "2022-12-13T23:58:35.606763"
187
- }
188
- ]
189
- }
190
- ```
191
-
192
- ## Limitation
193
- PyGazpar relies on how GrDF Web Site is built.
194
-
195
- Any change in the Web site may break this library.
196
-
197
- We expect in close Future that GrDF makes available an open API from which we can get safely their data.
198
-
199
- ## Contributing
200
- Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
201
-
202
- Please make sure to update tests as appropriate.
203
-
204
- ## License
205
- [MIT](https://choosealicense.com/licenses/mit/)
206
-
207
- ## Project status
208
- PyGazpar has been initiated for integration with [Home Assistant](https://www.home-assistant.io/).
209
-
210
- Corresponding Home Assistant integration custom component is available [here](https://github.com/ssenart/home-assistant-gazpar).
211
- # Changelog
212
- All notable changes to this project will be documented in this file.
213
-
214
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
215
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
216
-
217
- ## [1.2.8](https://github.com/ssenart/PyGazpar/compare/1.2.8...1.2.7) - 2025-01-11
218
-
219
- ### Added
220
- - [#81](https://github.com/ssenart/PyGazpar/issues/81): Add meter/temperature debug log messages to help investigation in case of errors.
221
-
222
- ## [1.2.7](https://github.com/ssenart/PyGazpar/compare/1.2.7...1.2.6) - 2025-01-06
223
-
224
- ### Fixed
225
- - [#79](https://github.com/ssenart/PyGazpar/issues/79): Fix some unittests that wrongly failed because of the new year.
226
-
227
- ## [1.2.6](https://github.com/ssenart/PyGazpar/compare/1.2.6...1.2.5) - 2025-01-03
228
-
229
- ### Fixed
230
- - [#77](https://github.com/ssenart/PyGazpar/issues/77): Some error may occur while requesting data from GrDF API.
231
-
232
- ## [1.2.5](https://github.com/ssenart/PyGazpar/compare/1.2.5...1.2.4) - 2024-12-21
233
-
234
- ### Fixed
235
- - [#75](https://github.com/ssenart/PyGazpar/issues/75): Fix an error when no temperature data is available.
236
-
237
- ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
238
-
239
- ### Fixed
240
- - [#72](https://github.com/ssenart/PyGazpar/issues/72): Remove the warning message "UserWarning: Boolean Series key will be reindexed to match DataFrame index. df = pd.concat([df[(df["count"] >= 7)], df.tail(1)[df["count"] < 7]])".
241
-
242
- ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
243
-
244
- ### Added
245
- - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
246
-
247
- ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
248
-
249
- ### Fixed
250
- - [#65](https://github.com/ssenart/PyGazpar/issues/65): [Bug] PermissionError happens when loading data from Excel file.
251
-
252
- ## [1.2.1](https://github.com/ssenart/PyGazpar/compare/1.2.0...1.2.1) - 2024-05-04
253
-
254
- ### Fixed
255
- - [#64](https://github.com/ssenart/PyGazpar/issues/64): [Issue] Captcha failed issue.
256
-
257
- - [#63](https://github.com/ssenart/PyGazpar/issues/63): [Bug] If the latest received consumption is Sunday, then the last weekly period is duplicated.
258
-
259
- ## [1.2.0](https://github.com/ssenart/PyGazpar/compare/1.1.6...1.2.0) - 2022-12-16
260
-
261
- ### Changed
262
- - [#59](https://github.com/ssenart/PyGazpar/issues/59): [Feature] Support both Excel and Json data source format from GrDF site.
263
-
264
- - [#60](https://github.com/ssenart/PyGazpar/issues/60): [Feature] Permit to load data at multiple frequencies with one method call.
265
-
266
- ### Fixed
267
- - [#47](https://github.com/ssenart/PyGazpar/issues/47): [Bug] No temperature field available.
268
-
269
- - [#58](https://github.com/ssenart/PyGazpar/issues/58): [Issue] No data update - GrDF web site is half broken - Download button does not work anymore.
270
-
271
- ## [1.1.6](https://github.com/ssenart/PyGazpar/compare/1.1.5...1.1.6) - 2022-11-16
272
- ### Fixed
273
- - [#55](https://github.com/ssenart/PyGazpar/issues/55): Problème de connexion.
274
-
275
- ## [1.1.5](https://github.com/ssenart/PyGazpar/compare/1.1.4...1.1.5) - 2022-07-11
276
- ### Fixed
277
- - [#49](https://github.com/ssenart/PyGazpar/issues/49): Authentication failure.
278
-
279
- ## [1.1.4](https://github.com/ssenart/PyGazpar/compare/1.1.2...1.1.4) - 2022-01-18
280
- ### Changed
281
- - [#43](https://github.com/ssenart/PyGazpar/issues/43): Downloaded Excel file name has changed from Donnees_informatives_PCE_$dateDebut_$dateFin.xlsx to Donnees_informatives_$numeroPCE_$dateDebut_$dateFin.xlsx.
282
-
283
- ## [1.1.2](https://github.com/ssenart/PyGazpar/compare/1.1.1...1.1.2) - 2022-01-08
284
- ### Fixed
285
- - [#39](https://github.com/ssenart/PyGazpar/issues/39): NameError: name 'Frequency' is not defined (thanks [nicolas-r](https://github.com/nicolas-r)).
286
- - Numéro PCE pas forcément un nombre: Le numéro PCE de mon compteur commence par un 0 et lorsque j'essaie de récupérer mes relevés avec PyGazpar, une erreur de l'API est renvoyée. Le numéro PCE ne doit donc pas être converti en int lorsque il est passé en paramètre mais doit être une string (thanks [maelgangloff](https://github.com/maelgangloff)).
287
-
288
- ## [1.1.1](https://github.com/ssenart/PyGazpar/compare/1.1.0...1.1.1) - 2021-12-02
289
- ### Changed
290
- - Exact same version as 1.1.0 except that 1.1.0 has not been published on Pypi repository.
291
-
292
- ## [1.1.0](https://github.com/ssenart/PyGazpar/compare/1.0.2...1.1.0) - 2021-12-02
293
- ### Changed
294
- - Remove Selenium usage and use simple Web request for login and data retrieval.
295
-
296
- ## [1.0.2](https://github.com/ssenart/PyGazpar/compare/1.0.1...1.0.2) - 2021-11-25
297
- ### Fixed
298
- - Fix broken command line pygazpar caused by adding the new lastNDays parameter.
299
- - Fix the error : ValueError: could not convert string to float: 'Index de début de période (m3)'. It occurs because the records in the Excel file now starts at line 10 instead of line 8 before (thanks to [DEFAYArnaud](https://github.com/DEFAYArnaud) for having spotted the issue and bringing the fix).
300
-
301
- ### Changed
302
- - In the Excel file, if a cell is empty, then no corresponding key will be inserted in the result dictionary (before we inserted a key with an empty string).
303
-
304
- ## [1.0.1](https://github.com/ssenart/PyGazpar/compare/1.0.0...1.0.1) - 2021-11-24
305
- ### Fixed
306
- - Fix typo warning from Pylance preventing 1.0.0 to be published.
307
-
308
- ## [1.0.0](https://github.com/ssenart/PyGazpar/compare/0.2.0...1.0.0) - 2021-11-24
309
- ### Added
310
- - New lastNDays parameter to query data only over the last N days period.
311
-
312
- ### Fixed
313
- - [#18](https://github.com/ssenart/PyGazpar/issues/18): PyGazpar broken since GRDF Monespace has been upgraded to a new version.
314
-
315
- ## [0.2.0](https://github.com/ssenart/PyGazpar/compare/0.1.27...0.2.0) - 2021-04-21
316
- ### Added
317
- - [#12](https://github.com/ssenart/PyGazpar/issues/10): Be able to retrieve consumption not only on a daily basis, but weekly and monthly:
318
- - API : Add a new parameter 'meterReadingFrequency' to Client that accepts enumeration: Frequency.DAILY, Frequency.WEEKLY or Frequency.MONTHLY.
319
- - Command line : Add a new argument '--frequency' that accepts values : DAILY, WEEKLY or MONTHLY.
320
- - Be able to test using offline data :
321
- - API : Add a new parameter 'testMode' to Clients used to specify whether we want to get some live data (testMode=False) and static testing data (testMode=True).
322
- - Command line : Add a new argument '--testMode' (True if specified and False by default).
323
-
324
- ### Changed
325
- - Some ouput energy property names have changed:
326
- - 'date' => 'time_period'.
327
- - 'converter_factor' => 'converter_factor_kwh/m3'.
328
- - 'local_temperature' => 'temperature_degC'.
329
-
330
- ## [0.1.27](https://github.com/ssenart/PyGazpar/compare/0.1.26...0.1.27) - 2021-04-20
331
- ### Fixed
332
- - [#10](https://github.com/ssenart/PyGazpar/issues/10) : Does not download data file in tmpdir as expected (instead it is downloaded in the default user Download directory). The previous attempt in version 0.1.26 is a failure. The origin of the bug is that we send a relative tmp directory path to Webdriver. Additionally, this path has to be normalized to the runtime OS (using slash or backslash).
333
-
334
- ## [0.1.26](https://github.com/ssenart/PyGazpar/compare/0.1.25...0.1.26) - 2021-04-18
335
- ### Fixed
336
- - [#10](https://github.com/ssenart/PyGazpar/issues/10) : Does not download data file in tmpdir as expected (instead it is downloaded in the default user Download directory).
337
-
338
- ### Added
339
- - A new parameter to drive whether we want Selenium in headless mode or not (mainly for troubleshooting purpose).
340
-
341
- ## [0.1.25] - 2021-04-15
342
- ### Fixed
343
- - Remove useless warning log messages (log message level has been decreased to debug).
344
-
345
- ## [0.1.24] - 2021-04-14
346
- ### Added
347
- - README.md amendment (thanks to pbranly).
348
-
349
- ## [0.1.23] - 2021-04-09
350
- ### Changed
351
- - Final release with CI/CD workflow improvement.
352
-
353
- ## [0.1.22] - 2021-04-09
354
- ### Changed
355
- - Improve CI/CD workflow.
356
-
357
- ## [0.1.21] - 2021-04-07
358
- ### Changed
359
- - Cleanup some codes managing Privacy Conditions popup.
360
-
361
- ## [0.1.20] - 2021-04-07
362
- ### Changed
363
- - Close an eventual Privacy Conditions popup just before clicking the daily button (instead of Cookie banner).
364
-
365
- ## [0.1.19] - 2021-04-06
366
- ### Added
367
- - Close an eventual Cookie popup just before clicking the daily button.
368
- - Add log messages and screenshot capture around click() and send_keys() methods.
369
-
370
- ## [0.1.18] - 2021-04-05
371
- ### Fixed
372
- - Typo in logger usage.
373
-
374
- ## [0.1.17] - 2021-04-05
375
- ### Fixed
376
- - Logger name must be different in each instance. Using __name__ is a good practice, we can get the module hierarchy.
377
-
378
- ## [0.1.16] - 2021-04-05
379
- ### Fixed
380
- - Logger 'pygazpar' initialization must be done inside the main program and not inside the library.
381
-
382
- ## [0.1.15] - 2021-04-05
383
- ### Added
384
- - Many log message to help debugging if GrDF site changes something : pygazpar.log
385
- - Take a screenshot of the corresponding page where a selenium command fails : error_screenshot.png.
386
-
387
- ## [0.1.14] - 2020-09-23
388
- ### Fixed
389
- - GrDF survey popup has to be closed at the home page.
390
- - GrDF Assistant popup may hide the Download button. We have to close it.
391
- - GrDF bottom banner that invite to accept cookies may also hide the Download button. We have to accept it.
392
-
393
- ### Added
394
- - A new parameter 'lastNRows' to get only the last N most recent records.
395
-
396
- ## [0.1.13] - 2020-06-30
397
- ### Fixed
398
- - GrDF data retrieval from Excel file is not limited to the 1000 first rows any more.
399
-
400
- ## [0.1.12] - 2020-06-30
401
- ### Fixed
402
- - The previous 0.1.11 is not sufficient. Hence, 2 new changes : First, make configurable the waiting time so the user can adapt to its context usage.
403
- Second, the condition on clicking on Download button is now based on the corresponding event and not anymore on its identifier.
404
-
405
- ## [0.1.11] - 2020-06-29
406
- ### Fixed
407
- - When GrDF Web site is slower than usual, the client may not wait enough time for pages to load and miss to reach the data file.
408
- It occurs with the page containing 'Jour' button which is very long to load (I increase the wait to load time from 5s to 30s).
409
-
410
- ## [0.1.10] - 2020-06-03
411
- ### Fixed
412
- - Extract rows from Excel until line 1000 (instead of 365 as before).
413
-
414
- ## [0.1.9] - 2019-08-31
415
- ### Fixed
416
- - WebDriver window size must be large enough to display all clickable components.
417
-
418
- ## [0.1.8] - 2019-08-31
419
- ### Changed
420
- - Use PropertyNameEnum type to store all property names.
421
-
422
- ## [0.1.7] - 2019-08-29
423
- ### Added
424
- - Add wait_time option to control how much time the library has to wait for Web page element to load (see https://selenium-python.readthedocs.io/waits.html for details).
425
- - Add LoginError exception raised when PyGazpar is unable to sign in the GrDF Web site with the given username/password.
426
- - Refactor all data property names.
427
-
428
- ## [0.1.6] - 2019-08-26
429
- ### Added
430
- - Add README.md and CHANGELOG.md.
431
- - Add Client.data() method to get the updated data.
432
-
433
- ### Removed
434
- - Remove Client.data property to get the updated data. Replaced with Client.__data private property.
435
-
436
- [0.1.25]: https://github.com/ssenart/PyGazpar/compare/0.1.24...0.1.25
437
- [0.1.24]: https://github.com/ssenart/PyGazpar/compare/0.1.23...0.1.24
438
- [0.1.23]: https://github.com/ssenart/PyGazpar/compare/0.1.22...0.1.23
439
- [0.1.22]: https://github.com/ssenart/PyGazpar/compare/0.1.21...0.1.22
440
- [0.1.21]: https://github.com/ssenart/PyGazpar/compare/0.1.20...0.1.21
441
- [0.1.20]: https://github.com/ssenart/PyGazpar/compare/0.1.19...0.1.20
442
- [0.1.19]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.19
443
- [0.1.18]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.18
444
- [0.1.17]: https://github.com/ssenart/PyGazpar/compare/0.1.16...0.1.17
445
- [0.1.16]: https://github.com/ssenart/PyGazpar/compare/0.1.15...0.1.16
446
- [0.1.15]: https://github.com/ssenart/PyGazpar/compare/0.1.14...0.1.15
447
- [0.1.14]: https://github.com/ssenart/PyGazpar/compare/0.1.13...0.1.14
448
- [0.1.13]: https://github.com/ssenart/PyGazpar/compare/0.1.12...0.1.13
449
- [0.1.12]: https://github.com/ssenart/PyGazpar/compare/0.1.11...0.1.12
450
- [0.1.11]: https://github.com/ssenart/PyGazpar/compare/0.1.10...0.1.11
451
- [0.1.10]: https://github.com/ssenart/PyGazpar/compare/0.1.9...0.1.10
452
- [0.1.9]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.9
453
- [0.1.8]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.8
454
- [0.1.7]: https://github.com/ssenart/PyGazpar/compare/0.1.6...0.1.7
455
- [0.1.6]: https://github.com/ssenart/PyGazpar/compare/0.1.5...0.1.6
456
-
457
- MIT License
458
-
459
- Copyright (c) 2019 Stéphane Senart
460
-
461
- Permission is hereby granted, free of charge, to any person obtaining a copy
462
- of this software and associated documentation files (the "Software"), to deal
463
- in the Software without restriction, including without limitation the rights
464
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
465
- copies of the Software, and to permit persons to whom the Software is
466
- furnished to do so, subject to the following conditions:
467
-
468
- The above copyright notice and this permission notice shall be included in all
469
- copies or substantial portions of the Software.
470
-
471
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
472
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
473
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
474
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
475
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
476
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
477
- SOFTWARE.
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [1.3.0] - 2025-02-08
8
+
9
+ ### Changed
10
+
11
+ [#85](https://github.com/ssenart/PyGazpar/issues/85) : Move to Poetry dependency/package management tool.
12
+
13
+ ## [1.2.8](https://github.com/ssenart/PyGazpar/compare/1.2.8...1.2.7) - 2025-01-11
14
+
15
+ ### Added
16
+ - [#81](https://github.com/ssenart/PyGazpar/issues/81): Add meter/temperature debug log messages to help investigation in case of errors.
17
+
18
+ ## [1.2.7](https://github.com/ssenart/PyGazpar/compare/1.2.7...1.2.6) - 2025-01-06
19
+
20
+ ### Fixed
21
+ - [#79](https://github.com/ssenart/PyGazpar/issues/79): Fix some unittests that wrongly failed because of the new year.
22
+
23
+ ## [1.2.6](https://github.com/ssenart/PyGazpar/compare/1.2.6...1.2.5) - 2025-01-03
24
+
25
+ ### Fixed
26
+ - [#77](https://github.com/ssenart/PyGazpar/issues/77): Some error may occur while requesting data from GrDF API.
27
+
28
+ ## [1.2.5](https://github.com/ssenart/PyGazpar/compare/1.2.5...1.2.4) - 2024-12-21
29
+
30
+ ### Fixed
31
+ - [#75](https://github.com/ssenart/PyGazpar/issues/75): Fix an error when no temperature data is available.
32
+
33
+ ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
34
+
35
+ ### Fixed
36
+ - [#72](https://github.com/ssenart/PyGazpar/issues/72): Remove the warning message "UserWarning: Boolean Series key will be reindexed to match DataFrame index. df = pd.concat([df[(df["count"] >= 7)], df.tail(1)[df["count"] < 7]])".
37
+
38
+ ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
39
+
40
+ ### Added
41
+ - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
42
+
43
+ ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
44
+
45
+ ### Fixed
46
+ - [#65](https://github.com/ssenart/PyGazpar/issues/65): [Bug] PermissionError happens when loading data from Excel file.
47
+
48
+ ## [1.2.1](https://github.com/ssenart/PyGazpar/compare/1.2.0...1.2.1) - 2024-05-04
49
+
50
+ ### Fixed
51
+ - [#64](https://github.com/ssenart/PyGazpar/issues/64): [Issue] Captcha failed issue.
52
+
53
+ - [#63](https://github.com/ssenart/PyGazpar/issues/63): [Bug] If the latest received consumption is Sunday, then the last weekly period is duplicated.
54
+
55
+ ## [1.2.0](https://github.com/ssenart/PyGazpar/compare/1.1.6...1.2.0) - 2022-12-16
56
+
57
+ ### Changed
58
+ - [#59](https://github.com/ssenart/PyGazpar/issues/59): [Feature] Support both Excel and Json data source format from GrDF site.
59
+
60
+ - [#60](https://github.com/ssenart/PyGazpar/issues/60): [Feature] Permit to load data at multiple frequencies with one method call.
61
+
62
+ ### Fixed
63
+ - [#47](https://github.com/ssenart/PyGazpar/issues/47): [Bug] No temperature field available.
64
+
65
+ - [#58](https://github.com/ssenart/PyGazpar/issues/58): [Issue] No data update - GrDF web site is half broken - Download button does not work anymore.
66
+
67
+ ## [1.1.6](https://github.com/ssenart/PyGazpar/compare/1.1.5...1.1.6) - 2022-11-16
68
+ ### Fixed
69
+ - [#55](https://github.com/ssenart/PyGazpar/issues/55): Problème de connexion.
70
+
71
+ ## [1.1.5](https://github.com/ssenart/PyGazpar/compare/1.1.4...1.1.5) - 2022-07-11
72
+ ### Fixed
73
+ - [#49](https://github.com/ssenart/PyGazpar/issues/49): Authentication failure.
74
+
75
+ ## [1.1.4](https://github.com/ssenart/PyGazpar/compare/1.1.2...1.1.4) - 2022-01-18
76
+ ### Changed
77
+ - [#43](https://github.com/ssenart/PyGazpar/issues/43): Downloaded Excel file name has changed from Donnees_informatives_PCE_$dateDebut_$dateFin.xlsx to Donnees_informatives_$numeroPCE_$dateDebut_$dateFin.xlsx.
78
+
79
+ ## [1.1.2](https://github.com/ssenart/PyGazpar/compare/1.1.1...1.1.2) - 2022-01-08
80
+ ### Fixed
81
+ - [#39](https://github.com/ssenart/PyGazpar/issues/39): NameError: name 'Frequency' is not defined (thanks [nicolas-r](https://github.com/nicolas-r)).
82
+ - Numéro PCE pas forcément un nombre: Le numéro PCE de mon compteur commence par un 0 et lorsque j'essaie de récupérer mes relevés avec PyGazpar, une erreur de l'API est renvoyée. Le numéro PCE ne doit donc pas être converti en int lorsque il est passé en paramètre mais doit être une string (thanks [maelgangloff](https://github.com/maelgangloff)).
83
+
84
+ ## [1.1.1](https://github.com/ssenart/PyGazpar/compare/1.1.0...1.1.1) - 2021-12-02
85
+ ### Changed
86
+ - Exact same version as 1.1.0 except that 1.1.0 has not been published on Pypi repository.
87
+
88
+ ## [1.1.0](https://github.com/ssenart/PyGazpar/compare/1.0.2...1.1.0) - 2021-12-02
89
+ ### Changed
90
+ - Remove Selenium usage and use simple Web request for login and data retrieval.
91
+
92
+ ## [1.0.2](https://github.com/ssenart/PyGazpar/compare/1.0.1...1.0.2) - 2021-11-25
93
+ ### Fixed
94
+ - Fix broken command line pygazpar caused by adding the new lastNDays parameter.
95
+ - Fix the error : ValueError: could not convert string to float: 'Index de début de période (m3)'. It occurs because the records in the Excel file now starts at line 10 instead of line 8 before (thanks to [DEFAYArnaud](https://github.com/DEFAYArnaud) for having spotted the issue and bringing the fix).
96
+
97
+ ### Changed
98
+ - In the Excel file, if a cell is empty, then no corresponding key will be inserted in the result dictionary (before we inserted a key with an empty string).
99
+
100
+ ## [1.0.1](https://github.com/ssenart/PyGazpar/compare/1.0.0...1.0.1) - 2021-11-24
101
+ ### Fixed
102
+ - Fix typo warning from Pylance preventing 1.0.0 to be published.
103
+
104
+ ## [1.0.0](https://github.com/ssenart/PyGazpar/compare/0.2.0...1.0.0) - 2021-11-24
105
+ ### Added
106
+ - New lastNDays parameter to query data only over the last N days period.
107
+
108
+ ### Fixed
109
+ - [#18](https://github.com/ssenart/PyGazpar/issues/18): PyGazpar broken since GRDF Monespace has been upgraded to a new version.
110
+
111
+ ## [0.2.0](https://github.com/ssenart/PyGazpar/compare/0.1.27...0.2.0) - 2021-04-21
112
+ ### Added
113
+ - [#12](https://github.com/ssenart/PyGazpar/issues/10): Be able to retrieve consumption not only on a daily basis, but weekly and monthly:
114
+ - API : Add a new parameter 'meterReadingFrequency' to Client that accepts enumeration: Frequency.DAILY, Frequency.WEEKLY or Frequency.MONTHLY.
115
+ - Command line : Add a new argument '--frequency' that accepts values : DAILY, WEEKLY or MONTHLY.
116
+ - Be able to test using offline data :
117
+ - API : Add a new parameter 'testMode' to Clients used to specify whether we want to get some live data (testMode=False) and static testing data (testMode=True).
118
+ - Command line : Add a new argument '--testMode' (True if specified and False by default).
119
+
120
+ ### Changed
121
+ - Some ouput energy property names have changed:
122
+ - 'date' => 'time_period'.
123
+ - 'converter_factor' => 'converter_factor_kwh/m3'.
124
+ - 'local_temperature' => 'temperature_degC'.
125
+
126
+ ## [0.1.27](https://github.com/ssenart/PyGazpar/compare/0.1.26...0.1.27) - 2021-04-20
127
+ ### Fixed
128
+ - [#10](https://github.com/ssenart/PyGazpar/issues/10) : Does not download data file in tmpdir as expected (instead it is downloaded in the default user Download directory). The previous attempt in version 0.1.26 is a failure. The origin of the bug is that we send a relative tmp directory path to Webdriver. Additionally, this path has to be normalized to the runtime OS (using slash or backslash).
129
+
130
+ ## [0.1.26](https://github.com/ssenart/PyGazpar/compare/0.1.25...0.1.26) - 2021-04-18
131
+ ### Fixed
132
+ - [#10](https://github.com/ssenart/PyGazpar/issues/10) : Does not download data file in tmpdir as expected (instead it is downloaded in the default user Download directory).
133
+
134
+ ### Added
135
+ - A new parameter to drive whether we want Selenium in headless mode or not (mainly for troubleshooting purpose).
136
+
137
+ ## [0.1.25] - 2021-04-15
138
+ ### Fixed
139
+ - Remove useless warning log messages (log message level has been decreased to debug).
140
+
141
+ ## [0.1.24] - 2021-04-14
142
+ ### Added
143
+ - README.md amendment (thanks to pbranly).
144
+
145
+ ## [0.1.23] - 2021-04-09
146
+ ### Changed
147
+ - Final release with CI/CD workflow improvement.
148
+
149
+ ## [0.1.22] - 2021-04-09
150
+ ### Changed
151
+ - Improve CI/CD workflow.
152
+
153
+ ## [0.1.21] - 2021-04-07
154
+ ### Changed
155
+ - Cleanup some codes managing Privacy Conditions popup.
156
+
157
+ ## [0.1.20] - 2021-04-07
158
+ ### Changed
159
+ - Close an eventual Privacy Conditions popup just before clicking the daily button (instead of Cookie banner).
160
+
161
+ ## [0.1.19] - 2021-04-06
162
+ ### Added
163
+ - Close an eventual Cookie popup just before clicking the daily button.
164
+ - Add log messages and screenshot capture around click() and send_keys() methods.
165
+
166
+ ## [0.1.18] - 2021-04-05
167
+ ### Fixed
168
+ - Typo in logger usage.
169
+
170
+ ## [0.1.17] - 2021-04-05
171
+ ### Fixed
172
+ - Logger name must be different in each instance. Using __name__ is a good practice, we can get the module hierarchy.
173
+
174
+ ## [0.1.16] - 2021-04-05
175
+ ### Fixed
176
+ - Logger 'pygazpar' initialization must be done inside the main program and not inside the library.
177
+
178
+ ## [0.1.15] - 2021-04-05
179
+ ### Added
180
+ - Many log message to help debugging if GrDF site changes something : pygazpar.log
181
+ - Take a screenshot of the corresponding page where a selenium command fails : error_screenshot.png.
182
+
183
+ ## [0.1.14] - 2020-09-23
184
+ ### Fixed
185
+ - GrDF survey popup has to be closed at the home page.
186
+ - GrDF Assistant popup may hide the Download button. We have to close it.
187
+ - GrDF bottom banner that invite to accept cookies may also hide the Download button. We have to accept it.
188
+
189
+ ### Added
190
+ - A new parameter 'lastNRows' to get only the last N most recent records.
191
+
192
+ ## [0.1.13] - 2020-06-30
193
+ ### Fixed
194
+ - GrDF data retrieval from Excel file is not limited to the 1000 first rows any more.
195
+
196
+ ## [0.1.12] - 2020-06-30
197
+ ### Fixed
198
+ - The previous 0.1.11 is not sufficient. Hence, 2 new changes : First, make configurable the waiting time so the user can adapt to its context usage.
199
+ Second, the condition on clicking on Download button is now based on the corresponding event and not anymore on its identifier.
200
+
201
+ ## [0.1.11] - 2020-06-29
202
+ ### Fixed
203
+ - When GrDF Web site is slower than usual, the client may not wait enough time for pages to load and miss to reach the data file.
204
+ It occurs with the page containing 'Jour' button which is very long to load (I increase the wait to load time from 5s to 30s).
205
+
206
+ ## [0.1.10] - 2020-06-03
207
+ ### Fixed
208
+ - Extract rows from Excel until line 1000 (instead of 365 as before).
209
+
210
+ ## [0.1.9] - 2019-08-31
211
+ ### Fixed
212
+ - WebDriver window size must be large enough to display all clickable components.
213
+
214
+ ## [0.1.8] - 2019-08-31
215
+ ### Changed
216
+ - Use PropertyNameEnum type to store all property names.
217
+
218
+ ## [0.1.7] - 2019-08-29
219
+ ### Added
220
+ - Add wait_time option to control how much time the library has to wait for Web page element to load (see https://selenium-python.readthedocs.io/waits.html for details).
221
+ - Add LoginError exception raised when PyGazpar is unable to sign in the GrDF Web site with the given username/password.
222
+ - Refactor all data property names.
223
+
224
+ ## [0.1.6] - 2019-08-26
225
+ ### Added
226
+ - Add README.md and CHANGELOG.md.
227
+ - Add Client.data() method to get the updated data.
228
+
229
+ ### Removed
230
+ - Remove Client.data property to get the updated data. Replaced with Client.__data private property.
231
+
232
+ [0.1.25]: https://github.com/ssenart/PyGazpar/compare/0.1.24...0.1.25
233
+ [0.1.24]: https://github.com/ssenart/PyGazpar/compare/0.1.23...0.1.24
234
+ [0.1.23]: https://github.com/ssenart/PyGazpar/compare/0.1.22...0.1.23
235
+ [0.1.22]: https://github.com/ssenart/PyGazpar/compare/0.1.21...0.1.22
236
+ [0.1.21]: https://github.com/ssenart/PyGazpar/compare/0.1.20...0.1.21
237
+ [0.1.20]: https://github.com/ssenart/PyGazpar/compare/0.1.19...0.1.20
238
+ [0.1.19]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.19
239
+ [0.1.18]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.18
240
+ [0.1.17]: https://github.com/ssenart/PyGazpar/compare/0.1.16...0.1.17
241
+ [0.1.16]: https://github.com/ssenart/PyGazpar/compare/0.1.15...0.1.16
242
+ [0.1.15]: https://github.com/ssenart/PyGazpar/compare/0.1.14...0.1.15
243
+ [0.1.14]: https://github.com/ssenart/PyGazpar/compare/0.1.13...0.1.14
244
+ [0.1.13]: https://github.com/ssenart/PyGazpar/compare/0.1.12...0.1.13
245
+ [0.1.12]: https://github.com/ssenart/PyGazpar/compare/0.1.11...0.1.12
246
+ [0.1.11]: https://github.com/ssenart/PyGazpar/compare/0.1.10...0.1.11
247
+ [0.1.10]: https://github.com/ssenart/PyGazpar/compare/0.1.9...0.1.10
248
+ [0.1.9]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.9
249
+ [0.1.8]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.8
250
+ [0.1.7]: https://github.com/ssenart/PyGazpar/compare/0.1.6...0.1.7
251
+ [0.1.6]: https://github.com/ssenart/PyGazpar/compare/0.1.5...0.1.6