pygazpar 1.2.2b1__tar.gz → 1.2.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. {pygazpar-1.2.2b1/pygazpar.egg-info → pygazpar-1.2.4}/PKG-INFO +13 -4
  2. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/README.md +1 -3
  3. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/datasource.py +7 -7
  4. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/excelparser.py +1 -1
  5. pygazpar-1.2.4/pygazpar/version.py +1 -0
  6. {pygazpar-1.2.2b1 → pygazpar-1.2.4/pygazpar.egg-info}/PKG-INFO +13 -4
  7. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/setup.cfg +1 -0
  8. pygazpar-1.2.2b1/pygazpar/version.py +0 -1
  9. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/LICENSE.md +0 -0
  10. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/MANIFEST.in +0 -0
  11. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/__init__.py +0 -0
  12. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/__main__.py +0 -0
  13. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/client.py +0 -0
  14. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/enum.py +0 -0
  15. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/jsonparser.py +0 -0
  16. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/resources/daily_data_sample.json +0 -0
  17. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/resources/hourly_data_sample.json +0 -0
  18. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/resources/monthly_data_sample.json +0 -0
  19. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/resources/weekly_data_sample.json +0 -0
  20. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar/resources/yearly_data_sample.json +0 -0
  21. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/SOURCES.txt +0 -0
  22. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/dependency_links.txt +0 -0
  23. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/entry_points.txt +0 -0
  24. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/not-zip-safe +0 -0
  25. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/requires.txt +0 -0
  26. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/pygazpar.egg-info/top_level.txt +0 -0
  27. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/samples/__init__.py +0 -0
  28. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/samples/excelSample.py +0 -0
  29. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/samples/jsonSample.py +0 -0
  30. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/samples/testSample.py +0 -0
  31. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/setup.py +0 -0
  32. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/tests/__init__.py +0 -0
  33. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/tests/test_client.py +0 -0
  34. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/tests/test_datafileparser.py +0 -0
  35. {pygazpar-1.2.2b1 → pygazpar-1.2.4}/tests/test_datasource.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygazpar
3
- Version: 1.2.2b1
3
+ Version: 1.2.4
4
4
  Summary: Retrieve gas consumption from GrDF web site (French Gas Company)
5
5
  Home-page: https://github.com/ssenart/pygazpar
6
6
  Author: Stephane Senart
@@ -14,9 +14,7 @@ Project-URL: Changelog, https://github.com/ssenart/PyGazpar/blob/master/CHANGELO
14
14
  Project-URL: Download, https://pypi.org/project/pygazpar
15
15
  Description: # PyGazpar
16
16
 
17
- ## <span style="color:green">!!! This library is working again. CAPTCHA has been removed !!!</span>
18
-
19
- ## <span style="color:red">~~!!! This library is broken since CAPTCHA is mandatory on GrDF site !!!~~</span>
17
+ ## $\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$
20
18
 
21
19
  PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
22
20
 
@@ -202,6 +200,16 @@ Description: # PyGazpar
202
200
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
203
201
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
204
202
 
203
+ ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
204
+
205
+ ### Fixed
206
+ - [#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]])".
207
+
208
+ ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
209
+
210
+ ### Added
211
+ - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
212
+
205
213
  ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
206
214
 
207
215
  ### Fixed
@@ -444,5 +452,6 @@ Classifier: Programming Language :: Python :: 3.8
444
452
  Classifier: Programming Language :: Python :: 3.9
445
453
  Classifier: Programming Language :: Python :: 3.10
446
454
  Classifier: Programming Language :: Python :: 3.11
455
+ Classifier: Programming Language :: Python :: 3.12
447
456
  Requires-Python: >=3.7
448
457
  Description-Content-Type: text/markdown
@@ -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
 
@@ -94,14 +94,14 @@ class WebDataSource(IDataSource):
94
94
 
95
95
  params = json.loads(AUTH_TOKEN_PARAMS.format(session_token))
96
96
 
97
- response = session.get(AUTH_TOKEN_URL, params=params, allow_redirects=True, cookies=jar)
97
+ response = session.get(AUTH_TOKEN_URL, params=params, allow_redirects=True, cookies=jar) # type: ignore
98
98
 
99
99
  if response.status_code != 200:
100
100
  raise Exception(f"An error occurred while getting the auth token. Status code: {response.status_code} - {response.text}")
101
101
 
102
102
  auth_token = session.cookies.get("auth_token", domain="monespace.grdf.fr")
103
103
 
104
- return auth_token
104
+ return auth_token # type: ignore
105
105
 
106
106
  @abstractmethod
107
107
  def _loadFromSession(self, auth_token: str, pceIdentifier: str, startDate: date, endDate: date, frequencies: Optional[List[Frequency]] = None) -> MeterReadingsByFrequency:
@@ -211,7 +211,7 @@ class ExcelWebDataSource(WebDataSource):
211
211
 
212
212
  response = session.get(url)
213
213
 
214
- if "text/html" in response.headers.get("Content-Type"):
214
+ if "text/html" in response.headers.get("Content-Type"): # type: ignore
215
215
  raise Exception("An error occurred while loading data. Please check your credentials.")
216
216
 
217
217
  if response.status_code != 200:
@@ -297,7 +297,7 @@ class JsonWebDataSource(WebDataSource):
297
297
  try:
298
298
  response = session.get(downloadUrl)
299
299
 
300
- if "text/html" in response.headers.get("Content-Type"):
300
+ if "text/html" in response.headers.get("Content-Type"): # type: ignore
301
301
  raise Exception("An error occurred while loading data. Please check your credentials.")
302
302
 
303
303
  if response.status_code != 200:
@@ -466,7 +466,7 @@ class FrequencyConverter:
466
466
  df = df.sort_values(by=['first_day_of_week'])
467
467
 
468
468
  # Select rows where we have a full week (7 days) except for the current week.
469
- df = pd.concat([df[(df["count"] >= 7)], df.tail(1)[df["count"] < 7]])
469
+ df = pd.concat([df[(df["count"] >= 7)], df.tail(1)[df.tail(1)["count"] < 7]])
470
470
 
471
471
  # Select target columns.
472
472
  df = df[["time_period", "start_index_m3", "end_index_m3", "volume_m3", "energy_kwh", "timestamp"]]
@@ -494,7 +494,7 @@ class FrequencyConverter:
494
494
  df = df.sort_values(by=['first_day_of_month'])
495
495
 
496
496
  # Select rows where we have a full month (more than 27 days) except for the current month.
497
- df = pd.concat([df[(df["count"] >= 28)], df.tail(1)[df["count"] < 28]])
497
+ df = pd.concat([df[(df["count"] >= 28)], df.tail(1)[df.tail(1)["count"] < 28]])
498
498
 
499
499
  # Rename columns for their target names.
500
500
  df = df.rename(columns={"month_year": "time_period"})
@@ -525,7 +525,7 @@ class FrequencyConverter:
525
525
  df = df.sort_values(by=['year'])
526
526
 
527
527
  # Select rows where we have almost a full year (more than 360) except for the current year.
528
- df = pd.concat([df[(df["count"] >= 360)], df.tail(1)[df["count"] < 360]])
528
+ df = pd.concat([df[(df["count"] >= 360)], df.tail(1)[df.tail(1)["count"] < 360]])
529
529
 
530
530
  # Rename columns for their target names.
531
531
  df = df.rename(columns={"year": "time_period"})
@@ -33,7 +33,7 @@ class ExcelParser:
33
33
 
34
34
  worksheet = workbook.active
35
35
 
36
- res = parseByFrequency[dataReadingFrequency](worksheet)
36
+ res = parseByFrequency[dataReadingFrequency](worksheet) # type: ignore
37
37
 
38
38
  workbook.close()
39
39
 
@@ -0,0 +1 @@
1
+ __version__ = "1.2.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygazpar
3
- Version: 1.2.2b1
3
+ Version: 1.2.4
4
4
  Summary: Retrieve gas consumption from GrDF web site (French Gas Company)
5
5
  Home-page: https://github.com/ssenart/pygazpar
6
6
  Author: Stephane Senart
@@ -14,9 +14,7 @@ Project-URL: Changelog, https://github.com/ssenart/PyGazpar/blob/master/CHANGELO
14
14
  Project-URL: Download, https://pypi.org/project/pygazpar
15
15
  Description: # PyGazpar
16
16
 
17
- ## <span style="color:green">!!! This library is working again. CAPTCHA has been removed !!!</span>
18
-
19
- ## <span style="color:red">~~!!! This library is broken since CAPTCHA is mandatory on GrDF site !!!~~</span>
17
+ ## $\text{\color{green}{!!! This library is working again. CAPTCHA has been removed !!!}}$
20
18
 
21
19
  PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
22
20
 
@@ -202,6 +200,16 @@ Description: # PyGazpar
202
200
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
203
201
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
204
202
 
203
+ ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
204
+
205
+ ### Fixed
206
+ - [#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]])".
207
+
208
+ ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
209
+
210
+ ### Added
211
+ - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
212
+
205
213
  ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
206
214
 
207
215
  ### Fixed
@@ -444,5 +452,6 @@ Classifier: Programming Language :: Python :: 3.8
444
452
  Classifier: Programming Language :: Python :: 3.9
445
453
  Classifier: Programming Language :: Python :: 3.10
446
454
  Classifier: Programming Language :: Python :: 3.11
455
+ Classifier: Programming Language :: Python :: 3.12
447
456
  Requires-Python: >=3.7
448
457
  Description-Content-Type: text/markdown
@@ -27,6 +27,7 @@ classifiers =
27
27
  Programming Language :: Python :: 3.9
28
28
  Programming Language :: Python :: 3.10
29
29
  Programming Language :: Python :: 3.11
30
+ Programming Language :: Python :: 3.12
30
31
 
31
32
  [options]
32
33
  zip_safe = False
@@ -1 +0,0 @@
1
- __version__ = "1.2.2b1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes