Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 15 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion solarfarmer/models/pvsystem/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
----------
Expand Down
Loading