Skip to content

Commit

Permalink
Release version 0.2.5 (#56)
Browse files Browse the repository at this point in the history
* Update package version

* Update whatsnew.md

* Add link to Osborn reference

* Fix warnings

* Avoid runtime warning
  • Loading branch information
AdamRJensen authored Oct 13, 2024
1 parent 3829fba commit 8733a5e
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
'matplotlib': ('https://matplotlib.org/stable', None),
'shapely': ('https://shapely.readthedocs.io/en/stable/', None),
'pvlib': ('http://pvlib-python.readthedocs.io/en/stable/', None),
'pvlib': ('https://pvlib-python.readthedocs.io/en/stable/', None),
}

# Number of seconds for a cell to execute before timeout (default=30)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/reference_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@
"\n",
"[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",
"\n",
"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",
"[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",
"\n",
"[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"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@
" divide(dfc['asl_cumpston']).multiply(100)\n",
"\n",
"result_columns = ['asl_cumpston', 'asl_twoaxistracking', 'absolute_deviation', 'relative_deviation']\n",
"dfc.set_index('gcr')[result_columns].round(2).applymap(lambda s: f\"{s:.2f} %\")"
"dfc.set_index('gcr')[result_columns].round(2).map(lambda s: f\"{s:.2f} %\")"
]
},
{
Expand Down
33 changes: 19 additions & 14 deletions docs/source/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.5]
## [0.2.5] - 2024-10-13

### Testing
- Added Python 3.13 to the test matrix (see PR#54).
- Removed Python 3.7 and 3.8 from the test matrix (see PR#52 and PR#48)

### Requirements
- Updated the documentation package requirements. Specifically, the Sphinx
version was increased to 8.1.1 from 4.4.0 (see PR#53).

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

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


## [0.2.4] - 2023-01-05

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

### Testing
- Add python 3.11 to test matrix (see PR#38).
- Added Python 3.11 to the test matrix (see PR#38).


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

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

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


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

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

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

### Testing
- Linting using flake8 was added in PR#11
- Test coverage was added in PR#14 and PR#16
- Added linting using flake8 in PR#11
- Added test coverage in PR#14 and PR#16


## [0.1.0] - 2022-01-25
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = twoaxistracking
version = 0.2.4
version = 0.2.5
author = 'Adam R. Jensen, Kevin Anderson'
author_email = [email protected]
description = twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading.
Expand Down
8 changes: 5 additions & 3 deletions twoaxistracking/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ def max_shading_elevation(total_collector_geometry, tracker_distance,
y_dim = y_max - y_min
delta_gamma_rad = np.arcsin(x_dim / tracker_distance)
# Calculate max elevation based on the bounding box (rectangular)
max_elevations_rectangular = np.rad2deg(np.arcsin(
y_dim * np.cos(np.deg2rad(relative_slope)) /
(tracker_distance * np.cos(delta_gamma_rad)))) + relative_slope
# Avoid "RuntimeWarning: invalid value encountered in arcsin"
with np.errstate(invalid='ignore'):
max_elevations_rectangular = np.rad2deg(np.arcsin(
y_dim * np.cos(np.deg2rad(relative_slope)) /
(tracker_distance * np.cos(delta_gamma_rad)))) + relative_slope
# Calculate max elevations using the minimum bounding diameter (circular)
D_min = _calculate_min_tracker_spacing(total_collector_geometry)
max_elevations_circular = np.rad2deg(np.arcsin(
Expand Down

0 comments on commit 8733a5e

Please sign in to comment.