Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
460 commits
Select commit Hold shift + click to select a range
b248f58
Improve BoundingPatterns
FBumann Jul 18, 2025
d34445c
Fix duration Modeling
FBumann Jul 18, 2025
bde07b4
Fix On + Size
FBumann Jul 18, 2025
5861b28
Fix InvestmentModel
FBumann Jul 19, 2025
7809ee4
Fix Models
FBumann Jul 19, 2025
2bbdb44
Update constraint names in test
FBumann Jul 19, 2025
2a01abe
Fix OnOffModel for multiple Flows
FBumann Jul 19, 2025
1f1ebb7
Update constraint names in tests
FBumann Jul 19, 2025
c7b351f
Simplify
FBumann Jul 19, 2025
5d9b591
Improve handling of vars/cons and models
FBumann Jul 19, 2025
5c56b63
Revising the basic structure of a class Model
FBumann Jul 20, 2025
9d242b6
Revising the basic structure of a class Model
FBumann Jul 20, 2025
0997843
Simplify and focus more on own Model class
FBumann Jul 21, 2025
1d6ef97
Update tests
FBumann Jul 21, 2025
972cb90
Improve state computation in ModelingUtilities
FBumann Jul 21, 2025
29bec8c
Improve handling of previous flowrates
FBumann Jul 21, 2025
370ac94
Imropove repr and submodel acess
FBumann Jul 21, 2025
0f89ff0
Update access pattern in tests
FBumann Jul 21, 2025
4781cff
Fix PiecewiseEffects and StorageModel
FBumann Jul 21, 2025
333ab83
Fix StorageModel and Remove PreventSimultaniousUseModel
FBumann Jul 21, 2025
9702303
Fix Aggregation and SegmentedCalculation
FBumann Jul 21, 2025
91bd461
Update tests
FBumann Jul 21, 2025
94314c3
Loosen precision in tests
FBumann Jul 21, 2025
50cc2cb
Update test_on_hours_computation.py and some types
FBumann Jul 21, 2025
e52f800
Rename class Model to Submodel
FBumann Jul 21, 2025
9281256
rename sub_model to submodel everywhere
FBumann Jul 21, 2025
9001c6a
rename self.model to self.submodel everywhere
FBumann Jul 21, 2025
286a8b7
Rename .model with .submodel if its only a submodel
FBumann Jul 21, 2025
ae1752b
Rename .sub_models with .submodels
FBumann Jul 21, 2025
1822384
Improve repr
FBumann Jul 22, 2025
2aa9d4b
Improve repr
FBumann Jul 22, 2025
5ca9707
Include def do_modeling() into __init__() of models
FBumann Jul 22, 2025
7e04399
Make properties private
FBumann Jul 22, 2025
4f95ebc
Improve Inheritance of Models
FBumann Jul 22, 2025
f73fe99
Merge branch 'main' into v3.0.0/main
FBumann Jul 22, 2025
2d9c920
V3.0.0/plotting (#285)
FBumann Jul 22, 2025
5fd05e3
ruff check
FBumann Jul 22, 2025
20a1964
Improve typehints
FBumann Jul 22, 2025
9b05f8f
Update CHANGELOG.md
FBumann Jul 22, 2025
4d7fd29
Bugfix from renaming to .submodel
FBumann Jul 22, 2025
3626517
Bugfix from renaming to .submodel
FBumann Jul 23, 2025
50fbb67
Improve indexer in results plotting
FBumann Jul 23, 2025
9368985
rename register_submodel() to .add_submodels() adn add SUbmodels coll…
FBumann Jul 23, 2025
e4ec410
Add nice repr to FlowSystemModel and Submodel
FBumann Jul 23, 2025
66283cb
Bugfix .variables and .constraints
FBumann Jul 23, 2025
a84dfad
Add type checks to modeling.py
FBumann Jul 23, 2025
d2182aa
Improve assertion in tests
FBumann Jul 23, 2025
75c05ee
Improve docstrings and register ElementModels directly in FlowSystemM…
FBumann Jul 23, 2025
66a6ff1
Improve __repr__()
FBumann Jul 23, 2025
e2e1f13
ruff check
FBumann Jul 23, 2025
62b18b6
Use new method to compare sets in tests
FBumann Jul 23, 2025
5f0b503
ruff check
FBumann Jul 23, 2025
15a08e9
Update Contribute.md, some dependencies and add pre-commit
FBumann Jul 23, 2025
97de53c
Pre commit hook
FBumann Jul 23, 2025
25f726e
Run Pre-Commit Hook for the first time
FBumann Jul 23, 2025
1716607
Fix link in README.md
FBumann Jul 23, 2025
b4a9236
Update Effect name in tests to be 'costs' instead of 'Costs' Everywhere
FBumann Jul 23, 2025
b7734f8
Improve some of the modeling and coord handling
FBumann Jul 23, 2025
e06692b
Add tests with years and scenarios
FBumann Jul 23, 2025
cf0186c
Update tests to run with multiple coords
FBumann Jul 23, 2025
5510297
Fix Effects dataset computation in case of empty effects
FBumann Jul 23, 2025
b694dbe
Update Test for multiple dims
FBumann Jul 24, 2025
262e8b4
Fix test with multiple dims
FBumann Jul 28, 2025
2a469f1
Fix test with multiple dims
FBumann Jul 28, 2025
159bcb3
New test
FBumann Jul 28, 2025
e764a13
New test for previous flow_rates
FBumann Jul 28, 2025
20f74f3
Merge pull request #286 from flixOpt/v3.0.0/testing
FBumann Jul 28, 2025
2c1c750
Add Model for YearAwareInvestments
FBumann Jul 29, 2025
70979fb
Add FlowSystem.years_per_year attribute and "years_of_last_year" para…
FBumann Jul 29, 2025
c9c4ddf
Add YearAwareInvestmentModel
FBumann Jul 29, 2025
85ec956
Add new Interface
FBumann Jul 29, 2025
18146c2
Improve YearAwareInvestmentModel
FBumann Jul 29, 2025
015aa1d
Rename and improve
FBumann Jul 30, 2025
e6da5ad
Move piecewise_effects
FBumann Jul 30, 2025
aafe95b
COmbine TImingInvestment into a single interface
FBumann Jul 30, 2025
9316d8a
Add model tests for investment
FBumann Jul 30, 2025
5ecb3c9
Add size_changes variables
FBumann Jul 31, 2025
b1c9b71
Add size_changes variables
FBumann Jul 31, 2025
3c98553
Improve InvestmentModel
FBumann Jul 31, 2025
5688c8f
Improve InvestmentModel
FBumann Aug 4, 2025
84c8f15
Rename parameters
FBumann Aug 4, 2025
566bcdf
remove old code
FBumann Aug 4, 2025
c334515
Add a duration_in_years to the InvestTimingParameters
FBumann Aug 4, 2025
98216e2
Improve handling of fixed_duration
FBumann Aug 5, 2025
7b45a19
Improve validation and make Investment/divestment optional by default
FBumann Aug 5, 2025
b919c0a
Rename some vars and improve previous handling
FBumann Aug 5, 2025
8e21165
Add validation for previous size
FBumann Aug 5, 2025
c2ce728
Change fit_to_model_coords to work with a Collection of dims
FBumann Aug 5, 2025
02c1f31
Improve fit_to_model_coords
FBumann Aug 5, 2025
5f85887
Improve test
FBumann Aug 5, 2025
815b8bf
Update transform_data()
FBumann Aug 6, 2025
1ffe27f
Add new "year of investment" coord to FlowSystem
FBumann Aug 7, 2025
3632965
Add 'year_of_investment' dimension to FlowSystem
FBumann Aug 7, 2025
9d78314
Improve InvestmentTiming
FBumann Aug 7, 2025
ca6fb06
Improve InvestmentTiming
FBumann Aug 7, 2025
abbe534
Add specific_effect back
FBumann Aug 7, 2025
6f550dd
add effects_by_investment_year back
FBumann Aug 7, 2025
b618578
Add year_of_investment to FLowSystem.sel()
FBumann Aug 7, 2025
4ff3e31
Improve Interface
FBumann Aug 7, 2025
98b6072
Handle selection of years properly again
FBumann Aug 7, 2025
fa4c107
Temp
FBumann Aug 7, 2025
f29dcde
Make ModelingPrimitives.consecutive_duration_tracking() dim-agnostic
FBumann Aug 13, 2025
d7574d8
Use new lifetime variable and constraining methods
FBumann Aug 13, 2025
1e61937
Improve Plausibility check
FBumann Aug 13, 2025
da3f29f
Improve InvestmentTImingParameters
FBumann Aug 13, 2025
331ed06
Improve weights
FBumann Aug 13, 2025
16c7481
Adjust test
FBumann Aug 13, 2025
e9e5e04
Remove old classes
FBumann Aug 13, 2025
1474af6
V3.0.0/main fit to model coords improve (#295)
FBumann Aug 13, 2025
d81a150
Merge branch 'v3.0.0/main' into v3.0.0/invest
FBumann Aug 13, 2025
3f03d22
ruff format
FBumann Sep 2, 2025
299f629
Merge remote-tracking branch 'origin/v3.0.0/invest' into dev
FBumann Sep 13, 2025
b9cf441
Revert changes
FBumann Sep 23, 2025
42e4f59
Revert changes
FBumann Sep 23, 2025
e1dcfb8
Update type hints
FBumann Sep 23, 2025
d1a6cae
Increase time delay of pypi install retrys in CI-CD
FBumann Sep 24, 2025
0552d8a
Feature/changelog (#353)
FBumann Sep 25, 2025
6452f28
Remove examples drom default CI for speedup (#359)
FBumann Sep 27, 2025
c1afaf0
Update Renovate config: add minimum release age and dependency groupi…
FBumann Sep 29, 2025
9ad68cc
Release v2.1.10
FBumann Sep 29, 2025
bbb3871
Exclude packages
FBumann Sep 29, 2025
6041b58
Update packaging configuration
FBumann Sep 29, 2025
0899360
Change to save netcdf files with 'h5netcdf' instead of netcdf4. Follo…
FBumann Sep 30, 2025
fa61e6e
Feature/h5netcdf update (#375)
FBumann Sep 30, 2025
80a9071
Update Renovate config: set custom rules for CalVer dependencies
FBumann Sep 30, 2025
55dea59
Allow automerge on dev dependencies with renovate.json
FBumann Sep 30, 2025
4b2b31f
Add "separateMinorPatch": false to renovate.json
FBumann Sep 30, 2025
dee2b23
Fix `charge_state` Constraint in `Storage` leading to incorrect losse…
FBumann Oct 5, 2025
8791012
Fix CHANGELOG.md
FBumann Oct 5, 2025
eb6bab0
Simplify changes from next release
FBumann Oct 5, 2025
1281d82
Update CHANGELOG.md
FBumann Oct 5, 2025
f8c196e
Fix CHANGELOG.md
FBumann Oct 5, 2025
f61a978
chore(deps): update dependency mkdocs-material to v9.6.20 (#369)
renovate[bot] Oct 5, 2025
2cc5af7
Improve renovate.json to automerge ruff despite 0.x version
FBumann Oct 6, 2025
bd1ef9c
chore(deps): update dependency tsam to v2.3.9 (#379)
renovate[bot] Oct 6, 2025
5e66d50
chore(deps): update dependency ruff to v0.13.2 (#378)
renovate[bot] Oct 7, 2025
493ca97
Feature/Improve Configuration options and handling (#385)
FBumann Oct 9, 2025
906fe99
Update CHANGELOG.md
FBumann Oct 9, 2025
f957ee8
Fix CHANGELOG.md
FBumann Oct 9, 2025
f3e765c
Allow blank issues
FBumann Oct 9, 2025
b4dde06
Add Multi-Period-modeling and stochastic modeling to flixopt (#348)
FBumann Oct 13, 2025
1bf330a
chore(deps): update dependency ruff to v0.13.3 (#400)
renovate[bot] Oct 13, 2025
06bb79d
chore(deps): update dependency mkdocs-material to v9.6.21 (#399)
renovate[bot] Oct 13, 2025
0f80565
chore(deps): update dependency astral-sh/uv to v0.8.23 (#368)
renovate[bot] Oct 13, 2025
6d2b56e
Fix docs and add migration guide (#404)
FBumann Oct 13, 2025
d6bb01f
Fix broken link in docs
FBumann Oct 13, 2025
924ef17
Feature/readme and vision (#405)
FBumann Oct 14, 2025
79233f1
Update CHANGELOG.md
FBumann Oct 14, 2025
64eb5ed
Fix workflow to run example test IN PARALLEL and WITH WARNINGS
FBumann Oct 14, 2025
e04c5aa
Update CI
FBumann Oct 14, 2025
c70a54c
Revert Development increase to new Status "Beta"
FBumann Oct 15, 2025
8294a64
Use Readme in docs for maintainability
FBumann Oct 15, 2025
552569a
Fix/update migration guide and changelog (#411)
FBumann Oct 16, 2025
236a387
Fix/revert rename of mode to style in plotting (#412)
FBumann Oct 16, 2025
f332c00
Update CHANGELOG.md
FBumann Oct 16, 2025
f6aef3a
Improve CHANGELOG.md
FBumann Oct 16, 2025
c72357e
Add error handling for empty buses (#416)
FBumann Oct 17, 2025
8323b27
Fix/409 bug error handling in investparameterslinked periods (#415)
FBumann Oct 17, 2025
babe326
Feature/pretty docs with theme (#413)
FBumann Oct 18, 2025
84ab912
Update CHANGELOG.md
FBumann Oct 18, 2025
75a2391
Feature/398 feature facet plots in results (#419) (#422)
FBumann Oct 19, 2025
9dd1342
Improved CHANGELOG.md
FBumann Oct 19, 2025
6b587e2
Readd Changelog Unreleased section
FBumann Oct 19, 2025
9b498e7
Convert numpy style docstrings to google style
FBumann Oct 19, 2025
434eebe
Fix/effects per component bug (#430)
FBumann Oct 20, 2025
27e4754
Update CHANGELOG.md
FBumann Oct 20, 2025
63b39af
Update CHANGELOG.md
FBumann Oct 20, 2025
28a6b9a
Fix concurrency testing issue
FBumann Oct 20, 2025
4296cde
chore(deps): update dependency astral-sh/uv to v0.9.2 (#425)
renovate[bot] Oct 20, 2025
dbec1bb
Improve examples
FBumann Oct 21, 2025
4305ed2
Fix docstring
FBumann Oct 22, 2025
feb0ced
Feature/plotting kwargs and streamline data conversion (#439)
FBumann Oct 24, 2025
ae56e6c
Feature/component colors (#440)
FBumann Oct 24, 2025
2b72783
Feature/centralized io (#441)
FBumann Oct 26, 2025
a6ee2c2
Update CHANGELOG.md
FBumann Oct 26, 2025
612ef70
Fix CI for examples
FBumann Oct 26, 2025
16aebe2
chore(deps): update dependency mkdocs-material to v9.6.22
renovate[bot] Oct 27, 2025
0d8e2b1
Merge pull request #445 from flixOpt/renovate/mkdocs-material-9.x
FBumann Oct 28, 2025
1794d0b
chore(deps): update dependency astral-sh/uv to v0.9.5 (#444)
renovate[bot] Oct 28, 2025
633a067
Improve bug_report.yml
FBumann Oct 28, 2025
acf35eb
Make minimal_example actually minimal
FBumann Oct 28, 2025
6ed521f
Add task.yml and strip down config.yml
FBumann Oct 28, 2025
dd33f6a
Fix Bug in resample regarding the duration of the last timestep durat…
FBumann Oct 29, 2025
c40cc9d
Update CI: RUn examples on push to main to catch errors pre release
FBumann Oct 29, 2025
98db5e4
Update CHANGELOG.md
FBumann Oct 29, 2025
2b2e835
Feature/containers-and-reprs-for-better-element-organization (#443)
FBumann Oct 29, 2025
3e9839b
Update CHANGELOG.md
FBumann Oct 30, 2025
4bf5cfc
Feature/improve docs (#449)
FBumann Oct 30, 2025
5905d9d
Typo and update CONTRIBUTE.md
FBumann Oct 30, 2025
0fc96d4
447 fix bug with switch on and multiple periods or scenarios (#450)
FBumann Oct 30, 2025
2cdc9fd
Feature/yaml representer (#451)
FBumann Oct 30, 2025
3b4809a
Update CHANGELOG.md
FBumann Oct 30, 2025
b91f804
Added type hint to all submodel attributes (#424)
FBumann Oct 30, 2025
28f0472
chore(deps): update dependency dash to v3.2.0 (#426)
renovate[bot] Oct 31, 2025
3fd56b5
Merge from main
FBumann Oct 31, 2025
363f9b6
Merge remote-tracking branch 'origin/main' into feature/v3/invest-mul…
FBumann Oct 31, 2025
d24c3eb
Merge from main
FBumann Oct 31, 2025
451b6d4
Temp 1
FBumann Oct 31, 2025
6beebb6
Only allow fixed lifetime for now
FBumann Nov 1, 2025
560b5ff
Rename parameters of InvestParameters
FBumann Nov 1, 2025
d62a9c1
Rename parameters of InvestParameters
FBumann Nov 1, 2025
ac7be9d
Rename parameters of InvestParameters
FBumann Nov 1, 2025
422d9c1
Rename InvestParameters to Sizing Parameters
FBumann Nov 1, 2025
15896b9
Rename piecewise_effects_of_investment to piecewise_effects_per_size
FBumann Nov 1, 2025
0d0e301
Remove linked_periods
FBumann Nov 1, 2025
1510a5b
Update
FBumann Nov 1, 2025
c1da66f
Update
FBumann Nov 1, 2025
3584d3c
Update
FBumann Nov 1, 2025
553d784
Update
FBumann Nov 1, 2025
b9cf855
Improve _SizeModel
FBumann Nov 1, 2025
4b6eaab
Improve _SizeModel
FBumann Nov 1, 2025
b131781
Rename to InvestmentModel
FBumann Nov 1, 2025
34bad2a
Reuse code
FBumann Nov 1, 2025
3c305d7
Rename initial_level to previous_level and use it
FBumann Nov 1, 2025
8e48c0b
Remove old InvestmentTiming class
FBumann Nov 1, 2025
a0c3e31
Fix old year dim
FBumann Nov 1, 2025
193581e
Fix in Storage
FBumann Nov 1, 2025
63707a5
Re-add old InvestParameters
FBumann Nov 1, 2025
efd6b31
Unify Contributing guides
FBumann Nov 1, 2025
31844f0
Feature/402 feature silent framework (#407)
FBumann Nov 1, 2025
7d5392a
Merge remote-tracking branch 'origin/main' into feature/v3/invest-mul…
FBumann Nov 1, 2025
ca3d88e
Typo Bugfix
FBumann Nov 1, 2025
e7fe67b
Add proper handling of mandatory size for all cases: all, some, no pe…
FBumann Nov 1, 2025
3c65db9
Bugfix
FBumann Nov 1, 2025
36fae3b
Bugfix
FBumann Nov 1, 2025
2bddd5a
Rename fixed_lifetime to lifetime
FBumann Nov 2, 2025
52c1f8a
Fix type hints
FBumann Nov 2, 2025
ae14baf
Small bugfixes
FBumann Nov 2, 2025
3db741d
Small bugfixes
FBumann Nov 2, 2025
24618d9
Fix inherritance issues
FBumann Nov 2, 2025
f8ac1eb
Fix missing availlable variable
FBumann Nov 2, 2025
7f28d62
Track lifetime
FBumann Nov 3, 2025
190ae49
Temp
FBumann Nov 3, 2025
e9b5287
Temp
FBumann Nov 3, 2025
45c3fad
Revert "Temp"
FBumann Nov 3, 2025
e465a62
Revert "Temp"
FBumann Nov 3, 2025
3d2e52b
Add constraints for lifetime with warnings
FBumann Nov 3, 2025
c1d501e
Improve warning massage
FBumann Nov 3, 2025
85e7cc7
Improve warning message
FBumann Nov 3, 2025
3a8bebd
Fix
FBumann Nov 3, 2025
e95f651
Fix
FBumann Nov 3, 2025
2bd61d5
Fix
FBumann Nov 3, 2025
75cb42a
Fix
FBumann Nov 3, 2025
603f54f
Use ffill instead of bfill
FBumann Nov 3, 2025
37cebdd
Revert "Use ffill instead of bfill"
FBumann Nov 3, 2025
c9caf96
Update
FBumann Nov 3, 2025
b50b0e5
Fix
FBumann Nov 3, 2025
1a9c5a7
Fix
FBumann Nov 3, 2025
c750fdc
Fix
FBumann Nov 3, 2025
43561ed
Fix for scenarios
FBumann Nov 4, 2025
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
199 changes: 141 additions & 58 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,85 +1,168 @@
# Contributing to FlixOpt

Thanks for your interest in contributing to FlixOpt! 🚀
We warmly welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or sharing examples, your contributions are valuable.

## Quick Start
## Ways to Contribute

1. **Fork & Clone**
### 🐛 Report Issues
Found a bug or have a feature request? Please [open an issue](https://github.com/flixOpt/flixopt/issues) on GitHub.

When reporting issues, please include:
- A clear description of the problem
- Steps to reproduce the issue
- Expected vs. actual behavior
- Your environment (OS, Python version, FlixOpt version)
- Minimal code example if applicable

### 💡 Share Examples
Help others learn FlixOpt by contributing examples:
- Real-world use cases
- Tutorial notebooks
- Integration examples with other tools
- Add them to the `examples/` directory

### 📖 Improve Documentation
Documentation improvements are always welcome:
- Fix typos or clarify existing docs
- Add missing documentation
- Translate documentation
- Improve code comments

### 🔧 Submit Code Contributions
Ready to contribute code? Great! See the sections below for setup and guidelines.

---

## Development Setup

### Getting Started
1. Fork and clone the repository:
```bash
git clone https://github.com/yourusername/flixopt.git
git clone https://github.com/flixOpt/flixopt.git
cd flixopt
```

2. **Install for Development**
2. Install development dependencies:
```bash
pip install -e ".[full]"
pip install -e ".[full, dev]"
```

3. **Make Changes & Submit PR**
3. Set up pre-commit hooks (one-time setup):
```bash
git checkout -b feature/your-change
# Make your changes
git commit -m "Add: description of changes"
git push origin feature/your-change
# Create Pull Request on GitHub
pre-commit install
```

## How to Contribute

### 🐛 **Found a Bug?**
Use our [bug report template](https://github.com/flixOpt/flixopt/issues/new?template=bug_report.yml) with:
- Minimal code example
- FlixOpt version, Python version, solver used
- Expected vs actual behavior

### ✨ **Have a Feature Idea?**
Use our [feature request template](https://github.com/flixOpt/flixopt/issues/new?template=feature_request.yml) with:
- Clear energy system use case
- Specific examples of what you want to model
4. Verify your setup:
```bash
pytest
```

### ❓ **Need Help?**
- Check the [documentation](https://flixopt.github.io/flixopt/latest/) first
- Search [existing issues](https://github.com/flixOpt/flixopt/issues)
- Start a [discussion](https://github.com/flixOpt/flixopt/discussions)
### Working with Documentation
FlixOpt uses [mkdocs](https://www.mkdocs.org/) to generate documentation.

## Code Guidelines
To work on documentation:
```bash
pip install -e ".[docs]"
mkdocs serve
```
Then navigate to http://127.0.0.1:8000/

- **Style**: Follow PEP 8, use descriptive names
- **Documentation**: Add docstrings with units (kW, kWh, etc.) if applicable
- **Energy Focus**: Use energy domain terminology consistently
- **Testing**: Test with different solvers when applicable
---

### Example
## Code Quality Standards

### Automated Checks
We use [Ruff](https://github.com/astral-sh/ruff) for linting and formatting. After the one-time setup above, **code quality checks run automatically on every commit**.

### Manual Checks
To run checks manually:
- `ruff check --fix .` - Check and fix linting issues
- `ruff format .` - Format code
- `pre-commit run --all-files` - Run all pre-commit checks

### Testing
All tests are located in the `tests/` directory with a flat structure:
- `test_component.py` - Component tests
- `test_flow.py` - Flow tests
- `test_storage.py` - Storage tests
- etc.

#### Running Tests
- `pytest` - Run the full test suite (excluding examples by default)
- `pytest tests/test_component.py` - Run a specific test file
- `pytest tests/test_component.py::TestClassName` - Run a specific test class
- `pytest tests/test_component.py::TestClassName::test_method` - Run a specific test
- `pytest -m slow` - Run only slow tests
- `pytest -m examples` - Run example tests (normally skipped)
- `pytest -k "keyword"` - Run tests matching a keyword

#### Common Test Patterns
The `tests/conftest.py` file provides shared fixtures:
- `solver_fixture` - Parameterized solver fixture (HiGHS, Gurobi)
- `highs_solver` - HiGHS solver instance
- Coordinate configuration fixtures for timesteps, periods, scenarios

Use these fixtures by adding them as function parameters:
```python
def create_storage(
label: str,
capacity_kwh: float,
charging_power_kw: float
) -> Storage:
"""
Create a battery storage component.

Args:
label: Unique identifier
capacity_kwh: Storage capacity [kWh]
charging_power_kw: Maximum charging power [kW]
"""
def test_my_feature(solver_fixture):
# solver_fixture is automatically provided by pytest
model = fx.FlowSystem(...)
model.solve(solver_fixture)
```

## What We Welcome
#### Testing Guidelines
- Write tests for all new functionality
- Ensure all tests pass before submitting a PR
- Aim for 100% test coverage for new code
- Use descriptive test names that explain what's being tested
- Add the `@pytest.mark.slow` decorator for tests that take >5 seconds

- 🔧 New energy components (batteries, heat pumps, etc.)
- 📚 Documentation improvements
- 🐛 Bug fixes
- 🧪 Test cases
- 💡 Energy system examples
### Coding Guidelines
- Follow [PEP 8](https://pep8.org/) style guidelines
- Write clear, self-documenting code with helpful comments
- Include type hints for function signatures
- Create or update tests for new functionality
- Aim for 100% test coverage for new code

## Questions?
---

- 📖 [Documentation](https://flixopt.github.io/flixopt/latest/)
- 💬 [Discussions](https://github.com/flixOpt/flixopt/discussions)
- 📧 Contact maintainers (see README)
## Workflow

### Branches & Pull Requests
1. Create a feature branch from `main`:
```bash
git checkout -b feature/your-feature-name
```

2. Make your changes and commit them with clear messages

3. Push your branch and open a Pull Request

4. Ensure all CI checks pass

### Branch Naming
- Features: `feature/feature-name`
- Bug fixes: `fix/bug-description`
- Documentation: `docs/what-changed`

### Commit Messages
- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, Remove, etc.)
- Keep the first line under 72 characters

---

**Every contribution helps advance sustainable energy solutions! 🌱⚡**
## Releases

We follow **Semantic Versioning** (MAJOR.MINOR.PATCH). Releases are created manually from the `main` branch by maintainers.

---

## Questions?

If you have questions or need help, feel free to:
- Open a discussion on GitHub
- Ask in an issue
- Reach out to the maintainers

Thank you for contributing to FlixOpt!
118 changes: 41 additions & 77 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,106 +6,70 @@ body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

**Before submitting**: Please search [existing issues](https://github.com/flixOpt/flixopt/issues) to avoid duplicates.

- type: checkboxes
id: checks
attributes:
label: Version Confirmation
description: Please confirm you can reproduce this on a supported version
options:
- label: I have confirmed this bug exists on the latest [release](https://github.com/flixOpt/flixopt/releases) of FlixOpt
required: true
**Quick guide**: Describe what's broken, provide code to reproduce if possible.
For simple bugs, just fill the first field.

- type: textarea
id: problem
attributes:
label: Bug Description
description: Clearly describe what went wrong
placeholder: |
What happened? What did you expect to happen instead?

Include any error messages or unexpected outputs.
label: What's broken?
description: Describe the bug - what happened vs. what you expected
validations:
required: true

- type: textarea
id: example
attributes:
label: Minimal Reproducible Example
label: Code to reproduce
description: |
Provide the smallest possible code example that reproduces the bug.
See [how to create minimal bug reports](https://matthewrocklin.com/minimal-bug-reports).
placeholder: |
import flixopt as fx
value: |
import pandas as pd
import numpy as np
import flixopt as fx

# Minimal example that reproduces the bug
timesteps = pd.date_range('2024-01-01', periods=24, freq='h')
flow_system = fx.FlowSystem(timesteps)
fx.CONFIG.Logging.console = True
fx.CONFIG.Logging.level = 'DEBUG'
fx.CONFIG.apply()
flow_system = fx.FlowSystem(pd.date_range('2020-01-01', periods=3, freq='h'))

# Add components that trigger the bug...
flow_system.add_elements(
fx.Bus('Heat'),
fx.Bus('Gas'),
fx.Effect('Costs', '€', 'Cost', is_standard=True, is_objective=True),
fx.linear_converters.Boiler(
'Boiler',
eta=0.5,
Q_th=fx.Flow(label='Heat', bus='Heat', size=50),
Q_fu=fx.Flow(label='Gas', bus='Gas'),
),
fx.Sink(
'Sink',
inputs=[
fx.Flow(label='Demand', bus='Heat', size=1, fixed_relative_profile=np.array([30, 0, 20]))
],
),
fx.Source(
'Source',
outputs=[fx.Flow(label='Gas', bus='Gas', size=1000, effects_per_flow_hour=0.04)],
),
)

calculation = fx.FullCalculation('Simulation1', flow_system).do_modeling().solve(fx.solvers.HighsSolver(0.01, 60))

# Show the problematic operation
result = flow_system.solve() # This should fail/behave unexpectedly
render: python
validations:
required: true

- type: textarea
id: error-output
attributes:
label: Error Output
description: If there's an error message, paste the full traceback here
label: Error message
description: Paste the full traceback if there is one
render: shell

- type: dropdown
id: solver
attributes:
label: Solver Used
description: Which solver were you using?
options:
- HiGHS (default)
- Gurobi
- CPLEX
- GLPK
- CBC
- Other (specify below)
validations:
required: true

- type: input
id: os
attributes:
label: Operating System
placeholder: "e.g., Windows 11, macOS 14.2, Ubuntu 22.04"
validations:
required: true

- type: input
id: python-version
attributes:
label: Python Version
placeholder: "e.g., 3.11.5"
validations:
required: true

- type: textarea
id: environment
id: context
attributes:
label: Environment Info
description: |
Run one of these commands and paste the output:
- `pip freeze`
- `conda env export`
render: shell
value: >
<details>

```
Replace this with your environment info
```

</details>
label: Additional context
description: Solver, Python/OS version, environment details, or anything else relevant
placeholder: "HiGHS solver, Python 3.11, macOS 14"
10 changes: 2 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: 🤔 Modeling Questions
url: https://github.com/flixOpt/flixopt/discussions/categories/q-a
about: "How to model specific energy systems, components, and constraints"
- name: ⚡ Performance & Optimization
url: https://github.com/flixOpt/flixopt/discussions/categories/performance
about: "Solver performance, memory usage, and optimization speed issues"
- name: 💡 Ideas & Suggestions
url: https://github.com/flixOpt/flixopt/discussions/categories/ideas
about: "Share ideas and discuss potential improvements with the community"
- name: 📖 Documentation
url: https://flixopt.github.io/flixopt/latest/
about: "Browse guides, API reference, and examples"
about: "Guides, API reference, and examples"
Loading
Loading