diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7e71a9..11f3dc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,3 +90,26 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + github-release: + name: Create GitHub Release + needs: publish-pypi + runs-on: ubuntu-latest + if: github.event_name == 'push' + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create "$GITHUB_REF_NAME" dist/* \ + --repo "$GITHUB_REPOSITORY" \ + --title "$GITHUB_REF_NAME" \ + --generate-notes \ + --latest diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ff1b9..339a52f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,21 +5,21 @@ 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.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.8.0] - 2026-10-28 ### Added -- `PVSystem` enum inputs (`mounting`, `module_orientation`, `inverter_type`) accept case-insensitive strings, - at construction and on assignment. -- `PVSystem.with_defaults_applied()` returns a copy with all unset derived inputs resolved. +- `PVSystem` enum inputs (`mounting`, `module_orientation`, `inverter_type`) accept case-insensitive strings, at construction and on assignment. - `PVSystem.terrain_azimuth` and `PVSystem.terrain_slope` set the terrain orientation of all layouts (default `0.0`). They are ignored for flush-mount fixed-tilt systems. +- `PVSystem.with_defaults_applied()` returns a copy with all unset derived inputs resolved. +- `PVSystem.tracking_algorithm` selects the tracker rotation algorithm (`StandardBacktracking` (default), + `SlopeAwareBacktracking` or `SunTracking`, case-insensitive). The generated `TrackerSystem` now sets + `tracker_algorithm` instead of the deprecated `is_backtracking`/`use_slope_aware_backtracking`. ### Changed -- Derived `PVSystem` inputs (`mounting_height`, ohmic losses, bifacial parameters, transformer losses) are now - resolved when the payload is built; they read as `None` until set explicitly. Use `describe()` or - `with_defaults_applied()` to see effective values. +- Derived `PVSystem` inputs (`mounting_height`, ohmic losses, bifacial parameters, transformer losses) are now resolved when the payload is built; they read as `None` until set explicitly. Use `describe()` or `with_defaults_applied()` to see effective values. - `PVSystem.payload` is now an output-only snapshot (JSON string) and is no longer read back; it is omitted from `to_file()` output. - Building a payload no longer overwrites the plant's `dc_capacity_MW`, `ac_capacity_MW` or `gcr`. @@ -40,6 +40,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `__released__` now reports the release date of installed wheels instead of `"unreleased"` or the tag date of whichever git repository the user's working directory belonged to. +### Removed + +- Support for Python 3.10 has been dropped. + +### Security + +- Updated `requests` to version 2.34.2 or later and added `certifi>=2026.10.19` following [PYSEC-2026-4320](https://osv.dev/vulnerability/PYSEC-2026-4320). + ## [0.7.0] - 2026-10-07 ### Added diff --git a/pyproject.toml b/pyproject.toml index 431cc06..d1be98e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dnv-solarfarmer" -version = "0.7.0" +version = "0.8.0" description = "Python SDK for SolarFarmer, a bankable solar PV design and energy yield assessment tool by DNV." readme = "README.md" requires-python = ">=3.11" diff --git a/solarfarmer/models/pvsystem/pvsystem.py b/solarfarmer/models/pvsystem/pvsystem.py index a72e51d..87c8fcd 100644 --- a/solarfarmer/models/pvsystem/pvsystem.py +++ b/solarfarmer/models/pvsystem/pvsystem.py @@ -448,6 +448,11 @@ def weather_file(self, value: PathLike | None) -> None: @property def horizon_file(self) -> Path | None: + """Path to a horizon file, or ``None`` if not set (string or Path accepted). + + Alternatively, define the horizon with :meth:`horizon` using elevation and + azimuth angle arrays. + """ return self._horizon_file @horizon_file.setter @@ -1411,7 +1416,7 @@ def run_energy_calculation( **kwargs, ) -> CalculationResults | None: """ - Runs the SolarFArmer API calculation for the defined PV plant. + Runs the SolarFarmer API calculation for the defined PV plant. Parameters ----------