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
6 changes: 5 additions & 1 deletion .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
deploy-docs:
runs-on: ubuntu-latest
# Only deploy docs for stable releases (not pre-releases)
if: github.event.release.prerelease == false
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -30,4 +32,6 @@ jobs:
- name: Deploy docs
run: |
VERSION=${GITHUB_REF#refs/tags/v}
mike deploy --push --update-aliases $VERSION latest
echo "Deploying docs for stable release: $VERSION"
mike deploy --push --update-aliases $VERSION latest
mike set-default --push latest
49 changes: 43 additions & 6 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,49 @@ jobs:
- name: Run tests
run: pytest -v -p no:warnings

create-release:
name: Create Release with Changelog
runs-on: ubuntu-22.04
needs: [test]
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Sync changelog to docs
run: |
cp CHANGELOG.md docs/changelog.md
echo "✅ Synced changelog to docs"

- name: Extract release notes
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "Extracting release notes for version: $VERSION"
python scripts/extract_release_notes.py $VERSION > current_release_notes.md

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body_path: current_release_notes.md
draft: false
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-testpypi:
name: Publish to TestPyPI
runs-on: ubuntu-22.04
needs: [test] # Only run after tests pass
if: github.event_name == 'release' && github.event.action == 'created' # Only on release creation
needs: [test, create-release] # Run after tests and release creation
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # Only on tag push

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -86,7 +123,7 @@ jobs:
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: Test install from TestPyPI
run: |
# Create a temporary environment to test installation
Expand All @@ -104,8 +141,8 @@ jobs:
publish-pypi:
name: Publish to PyPI
runs-on: ubuntu-22.04
needs: [test] # Only run after TestPyPI publish succeeds
if: github.event_name == 'release' && github.event.action == 'created' # Only on release creation
needs: [publish-testpypi] # Only run after TestPyPI publish succeeds
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # Only on tag push

steps:
- name: Checkout repository
Expand Down
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Changelog

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).

## [Unreleased]

## [2.1.1] - 2025-05-08

### Fixed
- Fixed bug in the `_ElementResults.constraints` not returning the constraints but rather the variables

### Changed
- Improved docstring and tests

## [2.1.0] - 2025-04-11

### Added
- Python 3.13 support added
- Logger warning if relative_minimum is used without on_off_parameters in Flow
- Greatly improved internal testing infrastructure by leveraging linopy's testing framework

### Fixed
- Fixed the lower bound of `flow_rate` when using optional investments without OnOffParameters
- Fixed bug that prevented divest effects from working
- Added lower bounds of 0 to two unbounded vars (numerical improvement)

### Changed
- **BREAKING**: Restructured the modeling of the On/Off state of Flows or Components
- Variable renaming: `...|consecutive_on_hours` → `...|ConsecutiveOn|hours`
- Variable renaming: `...|consecutive_off_hours` → `...|ConsecutiveOff|hours`
- Constraint renaming: `...|consecutive_on_hours_con1` → `...|ConsecutiveOn|con1`
- Similar pattern for all consecutive on/off constraints

## [2.0.1] - 2025-04-10

### Added
- Logger warning if relative_minimum is used without on_off_parameters in Flow

### Fixed
- Replace "|" with "__" in filenames when saving figures (Windows compatibility)
- Fixed bug that prevented the load factor from working without InvestmentParameters

## [2.0.0] - 2025-03-29

### Changed
- **BREAKING**: Complete migration from Pyomo to Linopy optimization framework
- **BREAKING**: Redesigned data handling to rely on xarray.Dataset throughout the package
- **BREAKING**: Framework renamed from flixOpt to flixopt (`import flixopt as fx`)
- **BREAKING**: Results handling completely redesigned with new `CalculationResults` class

### Added
- Full model serialization support - save and restore unsolved Models
- Enhanced model documentation with YAML export containing human-readable mathematical formulations
- Extend flixopt models with native linopy language support
- Full Model Export/Import capabilities via linopy.Model
- Unified solution exploration through `Calculation.results` attribute
- Compression support for result files
- `to_netcdf/from_netcdf` methods for FlowSystem and core components
- xarray integration for TimeSeries with improved datatypes support
- Google Style Docstrings throughout the codebase

### Fixed
- Improved infeasible model detection and reporting
- Enhanced time series management and serialization
- Reduced file size through improved compression

### Removed
- **BREAKING**: Pyomo dependency (replaced by linopy)
- Period concepts in time management (simplified to timesteps)
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
- [Examples](examples/)
- [FAQ](faq/)
- [API-Reference](api-reference/)
- [Release Notes](release-notes/)
- [Release Notes](changelog.md)
32 changes: 0 additions & 32 deletions docs/release-notes/_template.txt

This file was deleted.

7 changes: 0 additions & 7 deletions docs/release-notes/index.md

This file was deleted.

93 changes: 0 additions & 93 deletions docs/release-notes/v2.0.0.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/release-notes/v2.0.1.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/release-notes/v2.1.0.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/release-notes/v2.1.1.md

This file was deleted.

5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ markdown_extensions:
- pymdownx.snippets:
base_path: ..


plugins:
- search # Enables the search functionality in the documentation
- table-reader # Allows including tables from external files
- include-markdown
- mike
- mike:
version_selector: true
default_version: latest
- gen-files:
scripts:
- scripts/gen_ref_pages.py
Expand Down
Loading