Skip to content

Commit a98ff77

Browse files
Merge pull request #31 from Solcast/feature/pv_sites_example_notebook
Feature/pv sites example notebook
2 parents 3856cde + 01c482b commit a98ff77

6 files changed

Lines changed: 531 additions & 44 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [1.2.2] - 2024-02-28
4+
5+
- Add example notebook showing use of `pv_power_sites` module
6+
- Bug fix for handling Response Code 204 (valid no content)
7+
38
## [1.2.1] - 2024-02-12
49

510
- Remove `to_pandas` method from `pv_power_sites` responses

docs/notebooks/4.1 Setting up and Using PV Sites.ipynb

Lines changed: 478 additions & 0 deletions
Large diffs are not rendered by default.

docs/pv_power_sites.md

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,48 @@ res = pv_power_sites.get_pv_power_site('ba75-e17a-7374-95ed')
2222

2323
res.to_dict()
2424
```
25-
{'resource_id': 'ba75-e17a-7374-95ed',
26-
'name': 'Test Site: Sydney Opera House',
27-
'latitude': -33.856784,
28-
'longitude': 151.215297,
29-
'capacity': 10,
30-
'capacity_dc': 15,
31-
'azimuth': 0,
32-
'tilt': 30.22,
33-
'tracking_type': 'horizontal_single_axis',
34-
'install_date': '2021-07-01T00:00:00.0000000Z',
35-
'module_type': 'poly-si',
36-
'ground_coverage_ratio': 0.47,
37-
'derating_temp_module': 0.0039,
38-
'derating_age_system': 0.0059,
39-
'derating_other_system': 0.07,
40-
'inverter_peak_efficiency': 0.985,
41-
'tracker_axis_azimuth': 0,
42-
'tracker_max_rotation_angle': 60,
43-
'tracker_back_tracking': True,
44-
'tracker_smart_tracking': False,
45-
'terrain_slope': 0,
46-
'terrain_azimuth': 0,
47-
'dust_soiling_average': [0.015,
48-
0.015,
49-
0.015,
50-
0.015,
51-
0.015,
52-
0.015,
53-
0.015,
54-
0.015,
55-
0.015,
56-
0.015,
57-
0.015,
58-
0.015],
59-
'bifacial_system': False,
60-
'site_ground_albedo': 0.25,
61-
'bifaciality_factor': 0.7,
62-
'pvrow_height': 1.5,
63-
'pvrow_width': 2,
64-
'is_unmetered': True,
65-
'confirmed_metadata': '2023-12-19T07:18:21.2378120Z'}
66-
25+
```
26+
{
27+
'resource_id': 'ba75-e17a-7374-95ed',
28+
'name': 'Test Site: Sydney Opera House',
29+
'latitude': -33.856784,
30+
'longitude': 151.215297,
31+
'capacity': 10,
32+
'capacity_dc': 15,
33+
'azimuth': 0,
34+
'tilt': 30.22,
35+
'tracking_type': 'horizontal_single_axis',
36+
'install_date': '2021-07-01T00:00:00.0000000Z',
37+
'module_type': 'poly-si',
38+
'ground_coverage_ratio': 0.47,
39+
'derating_temp_module': 0.0039,
40+
'derating_age_system': 0.0059,
41+
'derating_other_system': 0.07,
42+
'inverter_peak_efficiency': 0.985,
43+
'tracker_axis_azimuth': 0,
44+
'tracker_max_rotation_angle': 60,
45+
'tracker_back_tracking': True,
46+
'tracker_smart_tracking': False,
47+
'terrain_slope': 0,
48+
'terrain_azimuth': 0,
49+
'dust_soiling_average': [0.015,
50+
0.015,
51+
0.015,
52+
0.015,
53+
0.015,
54+
0.015,
55+
0.015,
56+
0.015,
57+
0.015,
58+
0.015,
59+
0.015,
60+
0.015],
61+
'bifacial_system': False,
62+
'site_ground_albedo': 0.25,
63+
'bifaciality_factor': 0.7,
64+
'pvrow_height': 1.5,
65+
'pvrow_width': 2,
66+
'is_unmetered': True,
67+
'confirmed_metadata': '2023-12-19T07:18:21.2378120Z'
68+
}
69+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ nav:
2424
- '3.2 Comparing to Measurements [GHI]: Quality Controlling and Gap Filling Measurements with Solcast Actuals': 'notebooks/3.2 Comparing to Measurements [GHI] - Quality Controlling and Gap Filling Measurements with Solcast Actuals.ipynb'
2525
- '3.2b Comparing to Measurements [GTI]: Quality Controlling and Gap Filling Measurements with Solcast Actuals': 'notebooks/3.2b Comparing to Measurements [GTI] - Quality Controlling and Gap Filling Measurements with Solcast Actuals.ipynb'
2626
- '3.3 Comparing to Measurements: Accuracy Metrics': 'notebooks/3.3 Comparing to Measurements - Accuracy Metrics.ipynb'
27+
- '4.1 Advanced PV Power: Setting up and Using PV Sites': 'notebooks/4.1 Setting up and Using PV Sites.ipynb'
2728
- data:
2829
- '3.1_sample_measurements.csv': 'notebooks/data/3.1_sample_measurements.csv'
2930
- '3.2_sample_measurements.csv': 'notebooks/data/3.2_sample_measurements.csv'

solcast/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.2.2"
1+
__version__ = "1.2.3"
22

33
from . import api, forecast, historic, live, tmy, unmetered_locations, urls
44

solcast/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __repr__(self):
3232
return f"status code={self.code}, url={self.url}, method={self.method}"
3333

3434
def to_dict(self):
35-
if self.code != 200:
35+
if self.code not in [200, 204]:
3636
raise Exception(self.exception)
3737
if self.code == 204: # Case of valid no content
3838
return dict()

0 commit comments

Comments
 (0)