pygazpar 1.3.0a12__py37-none-any.whl → 1.3.0a13__py37-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pygazpar/jsonparser.py CHANGED
@@ -29,7 +29,7 @@ class JsonParser:
29
29
 
30
30
  for releve in data[pceIdentifier]['releves']:
31
31
  temperature = releve['temperature']
32
- if temperature is None:
32
+ if temperature is None and temperatures is not None and len(temperatures) > 0:
33
33
  temperature = temperatures.get(releve['journeeGaziere'])
34
34
 
35
35
  item = {}
pygazpar/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.0a12"
1
+ __version__ = "1.3.0a13"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygazpar
3
- Version: 1.3.0a12
3
+ Version: 1.3.0a13
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
@@ -219,6 +219,11 @@ All notable changes to this project will be documented in this file.
219
219
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
220
220
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
221
221
 
222
+ ## [1.2.5](https://github.com/ssenart/PyGazpar/compare/1.2.5...1.2.4) - 2024-12-21
223
+
224
+ ### Fixed
225
+ - [#75](https://github.com/ssenart/PyGazpar/issues/75): Fix an error when no temperature data is available.
226
+
222
227
  ## [1.2.4](https://github.com/ssenart/PyGazpar/compare/1.2.4...1.2.3) - 2024-10-09
223
228
 
224
229
  ### Fixed
@@ -4,8 +4,8 @@ pygazpar/client.py,sha256=JdVm0jZbeibwtTumcRbUSFadfXnCUClPMjL95_J6p5Y,2595
4
4
  pygazpar/datasource.py,sha256=N9OVdJr4BwtA0W8DvKe4PEE4kLKbSEH2wxAYGNk-iIU,21558
5
5
  pygazpar/enum.py,sha256=3ZCk4SziXF6pxgP3MuQ1qxYfqB3X5DOV8Rtd0GHsK9w,898
6
6
  pygazpar/excelparser.py,sha256=QNFIErXNgMjGGjsGjdnRxAbNpfVagdYmZQtXRub3_Xc,5931
7
- pygazpar/jsonparser.py,sha256=AWdU3h7UohsOov8HpeP8GNuqcnDmM4r3I7-CI_crDvA,1804
8
- pygazpar/version.py,sha256=NYLHmRgRpna4gqXDsWvEWKVyypmZM3RBiuJ43vesebY,25
7
+ pygazpar/jsonparser.py,sha256=OrRdMZNBi7rI4dRGoRW7gjyFwJFk-IvtkRZ_t1XVFrI,1859
8
+ pygazpar/version.py,sha256=fteP4W4hbooBmvXetTEMAiyQM-pQD7RL7NcxjAIFl9Y,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=DVGGubMPMM56LvQW-4_pCouvG9qTCbVZVPoRTBGuCU4,5111
19
+ tests/test_client.py,sha256=UiJCqy_Nctl_YDSVpdaYfrbUEzuu9Td22a4WxNnIhJw,5606
20
20
  tests/test_datafileparser.py,sha256=nAeUpOHtelblMpmbrrnf-2GuMjK5ai65veDoymceprE,818
21
21
  tests/test_datasource.py,sha256=Fkn9BOGVKITAgrx9XipR1_ykT7rdvPyt_PAg3ftjfSU,5983
22
- pygazpar-1.3.0a12.dist-info/LICENSE.md,sha256=XsCJx_7_BC9tvmE0ZxS1cTNR7ekurog_ea9ybdZ-8tc,1073
23
- pygazpar-1.3.0a12.dist-info/METADATA,sha256=HZ-8FX2ADUIyQYdqpuw8LgrAYNjSO30ZEzG-lhaU88Q,18723
24
- pygazpar-1.3.0a12.dist-info/WHEEL,sha256=9FUYUSCt5io1tVBOVa-3S0zjcMzGO1nOIw99iWozm3o,93
25
- pygazpar-1.3.0a12.dist-info/entry_points.txt,sha256=c_FMZPYlRv1w9EqfgWhlkdJOoje7FcglI0UMm2oRLoI,53
26
- pygazpar-1.3.0a12.dist-info/top_level.txt,sha256=P7qn-XtanDPBLQsTvjvLV71wH8RK0DYbx8tzN_rDS70,23
27
- pygazpar-1.3.0a12.dist-info/RECORD,,
22
+ pygazpar-1.3.0a13.dist-info/LICENSE.md,sha256=XsCJx_7_BC9tvmE0ZxS1cTNR7ekurog_ea9ybdZ-8tc,1073
23
+ pygazpar-1.3.0a13.dist-info/METADATA,sha256=7Hn5wpi-QJo0xlUg3kE7sAgWaEFku3WRyJWJ8swyQmg,18926
24
+ pygazpar-1.3.0a13.dist-info/WHEEL,sha256=9FUYUSCt5io1tVBOVa-3S0zjcMzGO1nOIw99iWozm3o,93
25
+ pygazpar-1.3.0a13.dist-info/entry_points.txt,sha256=c_FMZPYlRv1w9EqfgWhlkdJOoje7FcglI0UMm2oRLoI,53
26
+ pygazpar-1.3.0a13.dist-info/top_level.txt,sha256=P7qn-XtanDPBLQsTvjvLV71wH8RK0DYbx8tzN_rDS70,23
27
+ pygazpar-1.3.0a13.dist-info/RECORD,,
tests/test_client.py CHANGED
@@ -52,6 +52,20 @@ class TestClient:
52
52
 
53
53
  assert (len(data[Frequency.HOURLY.value]) == 0)
54
54
 
55
+ def test_one_day_jsonweb(self):
56
+ client = Client(JsonWebDataSource(self.__username, self.__password))
57
+
58
+ data = client.loadSince(self.__pceIdentifier, 1, [Frequency.DAILY])
59
+
60
+ assert (len(data[Frequency.DAILY.value]) <= 1)
61
+
62
+ def test_two_days_jsonweb(self):
63
+ client = Client(JsonWebDataSource(self.__username, self.__password))
64
+
65
+ data = client.loadSince(self.__pceIdentifier, 2, [Frequency.DAILY])
66
+
67
+ assert (len(data[Frequency.DAILY.value]) <= 2)
68
+
55
69
  # @pytest.mark.skip(reason="Requires live data")
56
70
  def test_daily_jsonweb(self):
57
71
  client = Client(JsonWebDataSource(self.__username, self.__password))