Skip to content

Commit 8733a5e

Browse files
authored
Release version 0.2.5 (#56)
* Update package version * Update whatsnew.md * Add link to Osborn reference * Fix warnings * Avoid runtime warning
1 parent 3829fba commit 8733a5e

File tree

6 files changed

+28
-21
lines changed

6 files changed

+28
-21
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
7676
'matplotlib': ('https://matplotlib.org/stable', None),
7777
'shapely': ('https://shapely.readthedocs.io/en/stable/', None),
78-
'pvlib': ('http://pvlib-python.readthedocs.io/en/stable/', None),
78+
'pvlib': ('https://pvlib-python.readthedocs.io/en/stable/', None),
7979
}
8080

8181
# Number of seconds for a cell to execute before timeout (default=30)

docs/source/notebooks/reference_dataset.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@
888888
"\n",
889889
"[Meller, Y., 2010. Analytically calculating shading in regular arrays of sun-pointing collectors. Sol. Energy 84, 1967–1974.](https://doi.org/10.1016/j.solener.2010.08.006)\n",
890890
"\n",
891-
"Osborn, D.B., 1980. Generalized Shading Analysis for Parabolodial Collector Fields, in: Energy Technology Conference & Exhibition, American Society of Mechanical Engineers. pp. 1–8.\n",
891+
"[Osborn, D.B., 1980. Generalized Shading Analysis for Parabolodial Collector Fields, in: Energy Technology Conference & Exhibition, American Society of Mechanical Engineers. pp. 1–8.](https://ntrs.nasa.gov/citations/19800059174)\n",
892892
"\n",
893893
"[Pons, R.L., Dugan, A.F., 1984. The effect of concentrator field layout on the performance of point-focus distributed receiver systems. J. Sol. Energy Eng. Trans. ASME 106, 35–38.](https://doi.org/10.1115/1.3267559)\n"
894894
]

docs/source/notebooks/validation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@
611611
" divide(dfc['asl_cumpston']).multiply(100)\n",
612612
"\n",
613613
"result_columns = ['asl_cumpston', 'asl_twoaxistracking', 'absolute_deviation', 'relative_deviation']\n",
614-
"dfc.set_index('gcr')[result_columns].round(2).applymap(lambda s: f\"{s:.2f} %\")"
614+
"dfc.set_index('gcr')[result_columns].round(2).map(lambda s: f\"{s:.2f} %\")"
615615
]
616616
},
617617
{

docs/source/whatsnew.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.2.5]
7+
## [0.2.5] - 2024-10-13
8+
9+
### Testing
10+
- Added Python 3.13 to the test matrix (see PR#54).
11+
- Removed Python 3.7 and 3.8 from the test matrix (see PR#52 and PR#48)
12+
13+
### Requirements
14+
- Updated the documentation package requirements. Specifically, the Sphinx
15+
version was increased to 8.1.1 from 4.4.0 (see PR#53).
816

917
### Changed
1018
- ``twoaxistracking.__version__`` now correctly reports the version string instead
1119
of raising ``AttributeError`` (see PR#45).
1220

13-
### Testing
14-
- Remove python 3.7 and add python 3.12 to test matrix (see PR#48).
15-
1621

1722
## [0.2.4] - 2023-01-05
1823

1924
### Changed
20-
- Removed Shapely instalation check and added specific import of the affinity module
25+
- Removed Shapely installation check and added specific import of the affinity module
2126
to avoid import errors when using Shapely 2.0 (see PR#40).
2227

2328
### Testing
24-
- Add python 3.11 to test matrix (see PR#38).
29+
- Added Python 3.11 to the test matrix (see PR#38).
2530

2631

2732
## [0.2.3] - 2022-11-11
@@ -42,7 +47,7 @@ This update includes a bug fix in the calculation of the maximum shading elevati
4247
and addition of a section on validation to the documentation.
4348

4449
### Changed
45-
- Fix bug in the calculation of the maximum shading elevation at high GCRs (see PR#28).
50+
- Fixed bug in the calculation of the maximum shading elevation at high GCRs (see PR#28).
4651

4752
### Added
4853
- Button on the documentation website linking to GitHub (see PR#27).
@@ -54,7 +59,7 @@ and addition of a section on validation to the documentation.
5459

5560

5661
## [0.2.1] - 2022-03-11
57-
Add pandas as a required dependency and fix the workflow file responsible for
62+
Added Pandas as a required dependency and fixed the workflow file responsible for
5863
uploading the package to PyPI.
5964

6065
### Requirements
@@ -69,18 +74,18 @@ made into a package and available on PyPI.
6974
- Added automatic documentation using Sphinx and autosummary
7075
- Added ``__init__.py`` file
7176
- Documentation is now hosted at [readthedocs](https://twoaxistracking.readthedocs.io/)
72-
- Tilted fields can now be simulated by specifyig the keywords ``slope_azimuth`` and
77+
- Tilted fields can now be simulated by specifying the keywords ``slope_azimuth`` and
7378
``slope_tilt`` (see PR#7).
74-
- The code now is able to differentiate between the active area and total area (see PR#11).
79+
- The code now is able to differentiate between active and total area (see PR#11).
7580
- The class {py:class}`twoaxistracking.TrackerField` has been added, which is now the recommended way for using
7681
the package and is sufficient for most use cases.
7782
- Added {py:func}`twoaxistracking.layout.max_shading_elevation` for calculating the
78-
maximum elevation for which shading can occur for a specific field layout and collector geoemtry.
83+
maximum elevation for which shading can occur for a specific field layout and collector geometry.
7984
- Added {py:func}`twoaxistracking.shading.horizon_elevation_angle` for calculating the
8085
horizon angle caused by having a sloped field.
8186

8287
### Changed
83-
- Divide code into modules: shading, plotting, and layout
88+
- Divided code into modules: shading, plotting, and layout
8489
- Changed the overall file structure to become a Python package
8590
- Changed names of notebooks
8691
- Change repository name from "two_axis_tracker_shading" to
@@ -92,8 +97,8 @@ made into a package and available on PyPI.
9297
are only available through the {py:class}`twoaxistracking.TrackerField` class.
9398

9499
### Testing
95-
- Linting using flake8 was added in PR#11
96-
- Test coverage was added in PR#14 and PR#16
100+
- Added linting using flake8 in PR#11
101+
- Added test coverage in PR#14 and PR#16
97102

98103

99104
## [0.1.0] - 2022-01-25

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = twoaxistracking
3-
version = 0.2.4
3+
version = 0.2.5
44
author = 'Adam R. Jensen, Kevin Anderson'
55
author_email = adam-r-j@hotmail.com
66
description = twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading.

twoaxistracking/layout.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ def max_shading_elevation(total_collector_geometry, tracker_distance,
171171
y_dim = y_max - y_min
172172
delta_gamma_rad = np.arcsin(x_dim / tracker_distance)
173173
# Calculate max elevation based on the bounding box (rectangular)
174-
max_elevations_rectangular = np.rad2deg(np.arcsin(
175-
y_dim * np.cos(np.deg2rad(relative_slope)) /
176-
(tracker_distance * np.cos(delta_gamma_rad)))) + relative_slope
174+
# Avoid "RuntimeWarning: invalid value encountered in arcsin"
175+
with np.errstate(invalid='ignore'):
176+
max_elevations_rectangular = np.rad2deg(np.arcsin(
177+
y_dim * np.cos(np.deg2rad(relative_slope)) /
178+
(tracker_distance * np.cos(delta_gamma_rad)))) + relative_slope
177179
# Calculate max elevations using the minimum bounding diameter (circular)
178180
D_min = _calculate_min_tracker_spacing(total_collector_geometry)
179181
max_elevations_circular = np.rad2deg(np.arcsin(

0 commit comments

Comments
 (0)