pygazpar 1.3.0a15__tar.gz → 1.3.0a24__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. pygazpar-1.3.0a24/CHANGELOG.md +245 -0
  2. {pygazpar-1.3.0a15/pygazpar.egg-info → pygazpar-1.3.0a24}/PKG-INFO +18 -8
  3. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/README.md +1 -3
  4. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/datasource.py +528 -522
  5. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/excelparser.py +138 -136
  6. pygazpar-1.3.0a24/pygazpar/version.py +1 -0
  7. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24/pygazpar.egg-info}/PKG-INFO +18 -8
  8. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/SOURCES.txt +1 -0
  9. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/entry_points.txt +0 -1
  10. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/tests/test_client.py +159 -159
  11. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/tests/test_datasource.py +166 -166
  12. pygazpar-1.3.0a15/pygazpar/version.py +0 -1
  13. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/LICENSE.md +0 -0
  14. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/MANIFEST.in +0 -0
  15. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/__init__.py +0 -0
  16. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/__main__.py +0 -0
  17. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/client.py +0 -0
  18. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/enum.py +0 -0
  19. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/jsonparser.py +0 -0
  20. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/resources/daily_data_sample.json +0 -0
  21. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/resources/hourly_data_sample.json +0 -0
  22. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/resources/monthly_data_sample.json +0 -0
  23. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/resources/weekly_data_sample.json +0 -0
  24. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar/resources/yearly_data_sample.json +0 -0
  25. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/dependency_links.txt +0 -0
  26. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/not-zip-safe +0 -0
  27. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/requires.txt +0 -0
  28. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/pygazpar.egg-info/top_level.txt +0 -0
  29. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/samples/__init__.py +0 -0
  30. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/samples/excelSample.py +0 -0
  31. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/samples/jsonSample.py +0 -0
  32. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/samples/testSample.py +0 -0
  33. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/setup.cfg +0 -0
  34. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/setup.py +0 -0
  35. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/tests/__init__.py +0 -0
  36. {pygazpar-1.3.0a15 → pygazpar-1.3.0a24}/tests/test_datafileparser.py +0 -0
@@ -0,0 +1,245 @@
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.2.8](https://github.com/ssenart/PyGazpar/compare/1.2.8...1.2.7) - 2025-01-11
8
+
9
+ ### Added
10
+ - [#81](https://github.com/ssenart/PyGazpar/issues/81): Add meter/temperature debug log messages to help investigation in case of errors.
11
+
12
+ ## [1.2.7](https://github.com/ssenart/PyGazpar/compare/1.2.7...1.2.6) - 2025-01-06
13
+
14
+ ### Fixed
15
+ - [#79](https://github.com/ssenart/PyGazpar/issues/79): Fix some unittests that wrongly failed because of the new year.
16
+
17
+ ## [1.2.6](https://github.com/ssenart/PyGazpar/compare/1.2.6...1.2.5) - 2025-01-03
18
+
19
+ ### Fixed
20
+ - [#77](https://github.com/ssenart/PyGazpar/issues/77): Some error may occur while requesting data from GrDF API.
21
+
22
+ ## [1.2.5](https://github.com/ssenart/PyGazpar/compare/1.2.5...1.2.4) - 2024-12-21
23
+
24
+ ### Fixed
25
+ - [#75](https://github.com/ssenart/PyGazpar/issues/75): Fix an error when no temperature data is available.
26
+
27
+ ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
28
+
29
+ ### Fixed
30
+ - [#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]])".
31
+
32
+ ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
33
+
34
+ ### Added
35
+ - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
36
+
37
+ ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
38
+
39
+ ### Fixed
40
+ - [#65](https://github.com/ssenart/PyGazpar/issues/65): [Bug] PermissionError happens when loading data from Excel file.
41
+
42
+ ## [1.2.1](https://github.com/ssenart/PyGazpar/compare/1.2.0...1.2.1) - 2024-05-04
43
+
44
+ ### Fixed
45
+ - [#64](https://github.com/ssenart/PyGazpar/issues/64): [Issue] Captcha failed issue.
46
+
47
+ - [#63](https://github.com/ssenart/PyGazpar/issues/63): [Bug] If the latest received consumption is Sunday, then the last weekly period is duplicated.
48
+
49
+ ## [1.2.0](https://github.com/ssenart/PyGazpar/compare/1.1.6...1.2.0) - 2022-12-16
50
+
51
+ ### Changed
52
+ - [#59](https://github.com/ssenart/PyGazpar/issues/59): [Feature] Support both Excel and Json data source format from GrDF site.
53
+
54
+ - [#60](https://github.com/ssenart/PyGazpar/issues/60): [Feature] Permit to load data at multiple frequencies with one method call.
55
+
56
+ ### Fixed
57
+ - [#47](https://github.com/ssenart/PyGazpar/issues/47): [Bug] No temperature field available.
58
+
59
+ - [#58](https://github.com/ssenart/PyGazpar/issues/58): [Issue] No data update - GrDF web site is half broken - Download button does not work anymore.
60
+
61
+ ## [1.1.6](https://github.com/ssenart/PyGazpar/compare/1.1.5...1.1.6) - 2022-11-16
62
+ ### Fixed
63
+ - [#55](https://github.com/ssenart/PyGazpar/issues/55): Problème de connexion.
64
+
65
+ ## [1.1.5](https://github.com/ssenart/PyGazpar/compare/1.1.4...1.1.5) - 2022-07-11
66
+ ### Fixed
67
+ - [#49](https://github.com/ssenart/PyGazpar/issues/49): Authentication failure.
68
+
69
+ ## [1.1.4](https://github.com/ssenart/PyGazpar/compare/1.1.2...1.1.4) - 2022-01-18
70
+ ### Changed
71
+ - [#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.
72
+
73
+ ## [1.1.2](https://github.com/ssenart/PyGazpar/compare/1.1.1...1.1.2) - 2022-01-08
74
+ ### Fixed
75
+ - [#39](https://github.com/ssenart/PyGazpar/issues/39): NameError: name 'Frequency' is not defined (thanks [nicolas-r](https://github.com/nicolas-r)).
76
+ - 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)).
77
+
78
+ ## [1.1.1](https://github.com/ssenart/PyGazpar/compare/1.1.0...1.1.1) - 2021-12-02
79
+ ### Changed
80
+ - Exact same version as 1.1.0 except that 1.1.0 has not been published on Pypi repository.
81
+
82
+ ## [1.1.0](https://github.com/ssenart/PyGazpar/compare/1.0.2...1.1.0) - 2021-12-02
83
+ ### Changed
84
+ - Remove Selenium usage and use simple Web request for login and data retrieval.
85
+
86
+ ## [1.0.2](https://github.com/ssenart/PyGazpar/compare/1.0.1...1.0.2) - 2021-11-25
87
+ ### Fixed
88
+ - Fix broken command line pygazpar caused by adding the new lastNDays parameter.
89
+ - 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).
90
+
91
+ ### Changed
92
+ - 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).
93
+
94
+ ## [1.0.1](https://github.com/ssenart/PyGazpar/compare/1.0.0...1.0.1) - 2021-11-24
95
+ ### Fixed
96
+ - Fix typo warning from Pylance preventing 1.0.0 to be published.
97
+
98
+ ## [1.0.0](https://github.com/ssenart/PyGazpar/compare/0.2.0...1.0.0) - 2021-11-24
99
+ ### Added
100
+ - New lastNDays parameter to query data only over the last N days period.
101
+
102
+ ### Fixed
103
+ - [#18](https://github.com/ssenart/PyGazpar/issues/18): PyGazpar broken since GRDF Monespace has been upgraded to a new version.
104
+
105
+ ## [0.2.0](https://github.com/ssenart/PyGazpar/compare/0.1.27...0.2.0) - 2021-04-21
106
+ ### Added
107
+ - [#12](https://github.com/ssenart/PyGazpar/issues/10): Be able to retrieve consumption not only on a daily basis, but weekly and monthly:
108
+ - API : Add a new parameter 'meterReadingFrequency' to Client that accepts enumeration: Frequency.DAILY, Frequency.WEEKLY or Frequency.MONTHLY.
109
+ - Command line : Add a new argument '--frequency' that accepts values : DAILY, WEEKLY or MONTHLY.
110
+ - Be able to test using offline data :
111
+ - 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).
112
+ - Command line : Add a new argument '--testMode' (True if specified and False by default).
113
+
114
+ ### Changed
115
+ - Some ouput energy property names have changed:
116
+ - 'date' => 'time_period'.
117
+ - 'converter_factor' => 'converter_factor_kwh/m3'.
118
+ - 'local_temperature' => 'temperature_degC'.
119
+
120
+ ## [0.1.27](https://github.com/ssenart/PyGazpar/compare/0.1.26...0.1.27) - 2021-04-20
121
+ ### Fixed
122
+ - [#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).
123
+
124
+ ## [0.1.26](https://github.com/ssenart/PyGazpar/compare/0.1.25...0.1.26) - 2021-04-18
125
+ ### Fixed
126
+ - [#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).
127
+
128
+ ### Added
129
+ - A new parameter to drive whether we want Selenium in headless mode or not (mainly for troubleshooting purpose).
130
+
131
+ ## [0.1.25] - 2021-04-15
132
+ ### Fixed
133
+ - Remove useless warning log messages (log message level has been decreased to debug).
134
+
135
+ ## [0.1.24] - 2021-04-14
136
+ ### Added
137
+ - README.md amendment (thanks to pbranly).
138
+
139
+ ## [0.1.23] - 2021-04-09
140
+ ### Changed
141
+ - Final release with CI/CD workflow improvement.
142
+
143
+ ## [0.1.22] - 2021-04-09
144
+ ### Changed
145
+ - Improve CI/CD workflow.
146
+
147
+ ## [0.1.21] - 2021-04-07
148
+ ### Changed
149
+ - Cleanup some codes managing Privacy Conditions popup.
150
+
151
+ ## [0.1.20] - 2021-04-07
152
+ ### Changed
153
+ - Close an eventual Privacy Conditions popup just before clicking the daily button (instead of Cookie banner).
154
+
155
+ ## [0.1.19] - 2021-04-06
156
+ ### Added
157
+ - Close an eventual Cookie popup just before clicking the daily button.
158
+ - Add log messages and screenshot capture around click() and send_keys() methods.
159
+
160
+ ## [0.1.18] - 2021-04-05
161
+ ### Fixed
162
+ - Typo in logger usage.
163
+
164
+ ## [0.1.17] - 2021-04-05
165
+ ### Fixed
166
+ - Logger name must be different in each instance. Using __name__ is a good practice, we can get the module hierarchy.
167
+
168
+ ## [0.1.16] - 2021-04-05
169
+ ### Fixed
170
+ - Logger 'pygazpar' initialization must be done inside the main program and not inside the library.
171
+
172
+ ## [0.1.15] - 2021-04-05
173
+ ### Added
174
+ - Many log message to help debugging if GrDF site changes something : pygazpar.log
175
+ - Take a screenshot of the corresponding page where a selenium command fails : error_screenshot.png.
176
+
177
+ ## [0.1.14] - 2020-09-23
178
+ ### Fixed
179
+ - GrDF survey popup has to be closed at the home page.
180
+ - GrDF Assistant popup may hide the Download button. We have to close it.
181
+ - GrDF bottom banner that invite to accept cookies may also hide the Download button. We have to accept it.
182
+
183
+ ### Added
184
+ - A new parameter 'lastNRows' to get only the last N most recent records.
185
+
186
+ ## [0.1.13] - 2020-06-30
187
+ ### Fixed
188
+ - GrDF data retrieval from Excel file is not limited to the 1000 first rows any more.
189
+
190
+ ## [0.1.12] - 2020-06-30
191
+ ### Fixed
192
+ - 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.
193
+ Second, the condition on clicking on Download button is now based on the corresponding event and not anymore on its identifier.
194
+
195
+ ## [0.1.11] - 2020-06-29
196
+ ### Fixed
197
+ - 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.
198
+ 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).
199
+
200
+ ## [0.1.10] - 2020-06-03
201
+ ### Fixed
202
+ - Extract rows from Excel until line 1000 (instead of 365 as before).
203
+
204
+ ## [0.1.9] - 2019-08-31
205
+ ### Fixed
206
+ - WebDriver window size must be large enough to display all clickable components.
207
+
208
+ ## [0.1.8] - 2019-08-31
209
+ ### Changed
210
+ - Use PropertyNameEnum type to store all property names.
211
+
212
+ ## [0.1.7] - 2019-08-29
213
+ ### Added
214
+ - 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).
215
+ - Add LoginError exception raised when PyGazpar is unable to sign in the GrDF Web site with the given username/password.
216
+ - Refactor all data property names.
217
+
218
+ ## [0.1.6] - 2019-08-26
219
+ ### Added
220
+ - Add README.md and CHANGELOG.md.
221
+ - Add Client.data() method to get the updated data.
222
+
223
+ ### Removed
224
+ - Remove Client.data property to get the updated data. Replaced with Client.__data private property.
225
+
226
+ [0.1.25]: https://github.com/ssenart/PyGazpar/compare/0.1.24...0.1.25
227
+ [0.1.24]: https://github.com/ssenart/PyGazpar/compare/0.1.23...0.1.24
228
+ [0.1.23]: https://github.com/ssenart/PyGazpar/compare/0.1.22...0.1.23
229
+ [0.1.22]: https://github.com/ssenart/PyGazpar/compare/0.1.21...0.1.22
230
+ [0.1.21]: https://github.com/ssenart/PyGazpar/compare/0.1.20...0.1.21
231
+ [0.1.20]: https://github.com/ssenart/PyGazpar/compare/0.1.19...0.1.20
232
+ [0.1.19]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.19
233
+ [0.1.18]: https://github.com/ssenart/PyGazpar/compare/0.1.17...0.1.18
234
+ [0.1.17]: https://github.com/ssenart/PyGazpar/compare/0.1.16...0.1.17
235
+ [0.1.16]: https://github.com/ssenart/PyGazpar/compare/0.1.15...0.1.16
236
+ [0.1.15]: https://github.com/ssenart/PyGazpar/compare/0.1.14...0.1.15
237
+ [0.1.14]: https://github.com/ssenart/PyGazpar/compare/0.1.13...0.1.14
238
+ [0.1.13]: https://github.com/ssenart/PyGazpar/compare/0.1.12...0.1.13
239
+ [0.1.12]: https://github.com/ssenart/PyGazpar/compare/0.1.11...0.1.12
240
+ [0.1.11]: https://github.com/ssenart/PyGazpar/compare/0.1.10...0.1.11
241
+ [0.1.10]: https://github.com/ssenart/PyGazpar/compare/0.1.9...0.1.10
242
+ [0.1.9]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.9
243
+ [0.1.8]: https://github.com/ssenart/PyGazpar/compare/0.1.7...0.1.8
244
+ [0.1.7]: https://github.com/ssenart/PyGazpar/compare/0.1.6...0.1.7
245
+ [0.1.6]: https://github.com/ssenart/PyGazpar/compare/0.1.5...0.1.6
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pygazpar
3
- Version: 1.3.0a15
3
+ Version: 1.3.0a24
4
4
  Summary: Retrieve gas consumption from GrDF web site (French Gas Company)
5
5
  Home-page: https://github.com/ssenart/pygazpar
6
+ Download-URL: https://github.com/ssenart/pygazpar/releases
6
7
  Author: Stephane Senart
7
8
  Author-email: stephane.senart@gmail.com
8
9
  License: MIT
9
- Download-URL: https://github.com/ssenart/pygazpar/releases
10
10
  Project-URL: Home, https://github.com/ssenart/pygazpar
11
11
  Project-URL: Source, https://github.com/ssenart/pygazpar
12
12
  Project-URL: Issues, https://github.com/ssenart/PyGazpar/issues
@@ -26,12 +26,14 @@ Classifier: Programming Language :: Python :: 3.12
26
26
  Requires-Python: >=3.7
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE.md
29
+ Requires-Dist: openpyxl>=2.6.3
30
+ Requires-Dist: requests>=2.26.0
31
+ Requires-Dist: pandas
32
+ Dynamic: download-url
29
33
 
30
34
  # PyGazpar
31
35
 
32
- ## <span style="color:green">!!! This library is working again. CAPTCHA has been removed !!!</span>
33
-
34
- ## <span style="color:red">~~!!! This library is broken since CAPTCHA is mandatory on GrDF site !!!~~</span>
36
+ ## $\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$
35
37
 
36
38
  PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
37
39
 
@@ -217,6 +219,16 @@ All notable changes to this project will be documented in this file.
217
219
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
218
220
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
219
221
 
222
+ ## [1.2.8](https://github.com/ssenart/PyGazpar/compare/1.2.8...1.2.7) - 2025-01-11
223
+
224
+ ### Added
225
+ - [#81](https://github.com/ssenart/PyGazpar/issues/81): Add meter/temperature debug log messages to help investigation in case of errors.
226
+
227
+ ## [1.2.7](https://github.com/ssenart/PyGazpar/compare/1.2.7...1.2.6) - 2025-01-06
228
+
229
+ ### Fixed
230
+ - [#79](https://github.com/ssenart/PyGazpar/issues/79): Fix some unittests that wrongly failed because of the new year.
231
+
220
232
  ## [1.2.6](https://github.com/ssenart/PyGazpar/compare/1.2.6...1.2.5) - 2025-01-03
221
233
 
222
234
  ### Fixed
@@ -468,5 +480,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
468
480
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
469
481
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
470
482
  SOFTWARE.
471
-
472
-
@@ -1,8 +1,6 @@
1
1
  # PyGazpar
2
2
 
3
- ## <span style="color:green">!!! This library is working again. CAPTCHA has been removed !!!</span>
4
-
5
- ## <span style="color:red">~~!!! This library is broken since CAPTCHA is mandatory on GrDF site !!!~~</span>
3
+ ## $\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$
6
4
 
7
5
  PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
8
6