pygazpar 1.3.0a6__py39-none-any.whl → 1.3.0a11__py39-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pygazpar/datasource.py CHANGED
@@ -144,7 +144,10 @@ class ExcelWebDataSource(WebDataSource):
144
144
  file_list = glob.glob(data_file_path_pattern)
145
145
  for filename in file_list:
146
146
  if os.path.isfile(filename):
147
- os.remove(filename)
147
+ try:
148
+ os.remove(filename)
149
+ except PermissionError:
150
+ pass
148
151
 
149
152
  if frequencies is None:
150
153
  # Transform Enum in List.
@@ -194,7 +197,7 @@ class ExcelWebDataSource(WebDataSource):
194
197
  try:
195
198
  # openpyxl does not close the file properly.
196
199
  os.remove(filename)
197
- except Exception:
200
+ except PermissionError:
198
201
  pass
199
202
 
200
203
  # We compute yearly from daily data.
pygazpar/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.0a6"
1
+ __version__ = "1.3.0a11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygazpar
3
- Version: 1.3.0a6
3
+ Version: 1.3.0a11
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
@@ -22,14 +22,20 @@ Classifier: Programming Language :: Python :: 3.8
22
22
  Classifier: Programming Language :: Python :: 3.9
23
23
  Classifier: Programming Language :: Python :: 3.10
24
24
  Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
25
26
  Requires-Python: >=3.7
26
27
  Description-Content-Type: text/markdown
27
28
  License-File: LICENSE.md
28
- Requires-Dist: openpyxl >=2.6.3
29
- Requires-Dist: requests >=2.26.0
29
+ Requires-Dist: openpyxl>=2.6.3
30
+ Requires-Dist: requests>=2.26.0
30
31
  Requires-Dist: pandas
31
32
 
32
33
  # PyGazpar
34
+
35
+ ## <span style="color:green">!!! This library is working again. CAPTCHA has been removed !!!</span>
36
+
37
+ ## <span style="color:red">~~!!! This library is broken since CAPTCHA is mandatory on GrDF site !!!~~</span>
38
+
33
39
  PyGazpar is a Python library for getting natural gas consumption from GrDF French provider.
34
40
 
35
41
  Their natural gas meter is called Gazpar. It is wireless and transmit the gas consumption once per day.
@@ -214,6 +220,15 @@ All notable changes to this project will be documented in this file.
214
220
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
215
221
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
216
222
 
223
+ ## [1.2.3](https://github.com/ssenart/PyGazpar/compare/1.2.3...1.2.1) - 2024-10-05
224
+
225
+ ### Added
226
+ - [#70](https://github.com/ssenart/PyGazpar/issues/70): Add Python 3.12 support.
227
+
228
+ ## [1.2.2](https://github.com/ssenart/PyGazpar/compare/1.2.1...1.2.2) - 2024-05-08
229
+
230
+ ### Fixed
231
+ - [#65](https://github.com/ssenart/PyGazpar/issues/65): [Bug] PermissionError happens when loading data from Excel file.
217
232
 
218
233
  ## [1.2.1](https://github.com/ssenart/PyGazpar/compare/1.2.0...1.2.1) - 2024-05-04
219
234
 
@@ -1,11 +1,11 @@
1
1
  pygazpar/__init__.py,sha256=qshO_XZbDA2Wrt80ABDs0MoScqJytClAuIJjAnILglk,309
2
2
  pygazpar/__main__.py,sha256=Pt3PInX7QiWcs0aBKZN90NTaU8KFnrQiZ5Hsow1eR5U,3177
3
3
  pygazpar/client.py,sha256=JdVm0jZbeibwtTumcRbUSFadfXnCUClPMjL95_J6p5Y,2595
4
- pygazpar/datasource.py,sha256=gqOREo9OQaBmqWgaDIgShJrP1dZNVFJoIxUu9Rfxmec,21374
4
+ pygazpar/datasource.py,sha256=nlIWxZ6SNSHf09BVBFIChSHf4dN05lC3LCxUUDRTylg,21470
5
5
  pygazpar/enum.py,sha256=3ZCk4SziXF6pxgP3MuQ1qxYfqB3X5DOV8Rtd0GHsK9w,898
6
6
  pygazpar/excelparser.py,sha256=glWlbj22pxYjHGKurOFmhzcVAoWCvfOHn7_Y6GgHUPo,5915
7
7
  pygazpar/jsonparser.py,sha256=AWdU3h7UohsOov8HpeP8GNuqcnDmM4r3I7-CI_crDvA,1804
8
- pygazpar/version.py,sha256=rcyBYFWxUArZ5y56YkLypabOiwSZfCl48nXHK0ebB20,24
8
+ pygazpar/version.py,sha256=_dBppxmPi6eC2EiB3BcrYBcY9pm4iNlyhbySqBY4Y0Y,25
9
9
  pygazpar/resources/daily_data_sample.json,sha256=YJovtrNUMs257magTfyxiewLmecySFypcelbGFUUeT8,199583
10
10
  pygazpar/resources/hourly_data_sample.json,sha256=N1F-Xz3GaBn2H1p7uKzhkhKCQV8QVR0t76XD6wmFtXA,3
11
11
  pygazpar/resources/monthly_data_sample.json,sha256=yrr4SqrB2MubeVU2HX_FRDZKHIhC0LXCqkO1iqnFWcg,3351
@@ -16,12 +16,12 @@ samples/excelSample.py,sha256=ltAl-bBz9-U9YI802JpcIswra-vDS7tR_KL5VNdxJ5c,765
16
16
  samples/jsonSample.py,sha256=sYAIusdEJhZdwDAMgHqoWcwDR0FA2eWhSt_2gL_mJRk,736
17
17
  samples/testSample.py,sha256=UeirdEtezHwfZDv_75oxul17YzGWn5yZuHfJYTF3Ez0,387
18
18
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- tests/test_client.py,sha256=OwYBeNC66WiykU1IUEf4eZacAU49xQJXsFQY6kYiXCQ,5111
19
+ tests/test_client.py,sha256=DVGGubMPMM56LvQW-4_pCouvG9qTCbVZVPoRTBGuCU4,5111
20
20
  tests/test_datafileparser.py,sha256=nAeUpOHtelblMpmbrrnf-2GuMjK5ai65veDoymceprE,818
21
- tests/test_datasource.py,sha256=2BCrnUh9ZbR_dAdvKT9498u5a-jGnC4aZafP7V9iZn8,5983
22
- pygazpar-1.3.0a6.dist-info/LICENSE.md,sha256=XsCJx_7_BC9tvmE0ZxS1cTNR7ekurog_ea9ybdZ-8tc,1073
23
- pygazpar-1.3.0a6.dist-info/METADATA,sha256=EBrPJTTN7QVCXLQvvxcXiWH54BB7QRoHqTNXHthuktk,17766
24
- pygazpar-1.3.0a6.dist-info/WHEEL,sha256=kG0f_S63jJ569yg8d_OdUrqQSrnKsZBVKN5Kb1RSnpA,93
25
- pygazpar-1.3.0a6.dist-info/entry_points.txt,sha256=c_FMZPYlRv1w9EqfgWhlkdJOoje7FcglI0UMm2oRLoI,53
26
- pygazpar-1.3.0a6.dist-info/top_level.txt,sha256=P7qn-XtanDPBLQsTvjvLV71wH8RK0DYbx8tzN_rDS70,23
27
- pygazpar-1.3.0a6.dist-info/RECORD,,
21
+ tests/test_datasource.py,sha256=Fkn9BOGVKITAgrx9XipR1_ykT7rdvPyt_PAg3ftjfSU,5983
22
+ pygazpar-1.3.0a11.dist-info/LICENSE.md,sha256=XsCJx_7_BC9tvmE0ZxS1cTNR7ekurog_ea9ybdZ-8tc,1073
23
+ pygazpar-1.3.0a11.dist-info/METADATA,sha256=Ei4SwL0HLpRu-4cLOdeA-4Ybc1FXCwgMYs3ebmqoPt0,18419
24
+ pygazpar-1.3.0a11.dist-info/WHEEL,sha256=FQUktIEL0Svmrm0vtDnkVkbaotVNpS5un0v2TQiPCxk,93
25
+ pygazpar-1.3.0a11.dist-info/entry_points.txt,sha256=c_FMZPYlRv1w9EqfgWhlkdJOoje7FcglI0UMm2oRLoI,53
26
+ pygazpar-1.3.0a11.dist-info/top_level.txt,sha256=P7qn-XtanDPBLQsTvjvLV71wH8RK0DYbx8tzN_rDS70,23
27
+ pygazpar-1.3.0a11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.44.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py39-none-any
5
5
 
tests/test_client.py CHANGED
@@ -72,7 +72,7 @@ class TestClient:
72
72
 
73
73
  data = client.loadSince(self.__pceIdentifier, 365, [Frequency.MONTHLY])
74
74
 
75
- assert (len(data[Frequency.MONTHLY.value]) >= 12 and len(data[Frequency.MONTHLY.value]) <= 13)
75
+ assert (len(data[Frequency.MONTHLY.value]) >= 11 and len(data[Frequency.MONTHLY.value]) <= 13)
76
76
 
77
77
  def test_yearly_jsonweb(self):
78
78
  client = Client(JsonWebDataSource(self.__username, self.__password))
tests/test_datasource.py CHANGED
@@ -143,7 +143,7 @@ class TestAllDataSource:
143
143
 
144
144
  assert (len(data[Frequency.WEEKLY.value]) >= 51 and len(data[Frequency.WEEKLY.value]) <= 54)
145
145
 
146
- assert (len(data[Frequency.MONTHLY.value]) >= 12 and len(data[Frequency.MONTHLY.value]) <= 13)
146
+ assert (len(data[Frequency.MONTHLY.value]) >= 11 and len(data[Frequency.MONTHLY.value]) <= 13)
147
147
 
148
148
  assert (len(data[Frequency.YEARLY.value]) == 1)
149
149