Skip to content

Commit f73fe99

Browse files
committed
Merge branch 'main' into v3.0.0/main
# Conflicts: # flixopt/core.py # flixopt/effects.py
2 parents 4f95ebc + 106574d commit f73fe99

7 files changed

Lines changed: 303 additions & 0 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributing to FlixOpt
2+
3+
Thanks for your interest in contributing to FlixOpt! 🚀
4+
5+
## Quick Start
6+
7+
1. **Fork & Clone**
8+
```bash
9+
git clone https://github.com/yourusername/flixopt.git
10+
cd flixopt
11+
```
12+
13+
2. **Install for Development**
14+
```bash
15+
pip install -e ".[full]"
16+
```
17+
18+
3. **Make Changes & Submit PR**
19+
```bash
20+
git checkout -b feature/your-change
21+
# Make your changes
22+
git commit -m "Add: description of changes"
23+
git push origin feature/your-change
24+
# Create Pull Request on GitHub
25+
```
26+
27+
## How to Contribute
28+
29+
### 🐛 **Found a Bug?**
30+
Use our [bug report template](https://github.com/flixOpt/flixopt/issues/new?template=bug_report.yml) with:
31+
- Minimal code example
32+
- FlixOpt version, Python version, solver used
33+
- Expected vs actual behavior
34+
35+
### **Have a Feature Idea?**
36+
Use our [feature request template](https://github.com/flixOpt/flixopt/issues/new?template=feature_request.yml) with:
37+
- Clear energy system use case
38+
- Specific examples of what you want to model
39+
40+
### **Need Help?**
41+
- Check the [documentation](https://flixopt.github.io/flixopt/latest/) first
42+
- Search [existing issues](https://github.com/flixOpt/flixopt/issues)
43+
- Start a [discussion](https://github.com/flixOpt/flixopt/discussions)
44+
45+
## Code Guidelines
46+
47+
- **Style**: Follow PEP 8, use descriptive names
48+
- **Documentation**: Add docstrings with units (kW, kWh, etc.) if applicable
49+
- **Energy Focus**: Use energy domain terminology consistently
50+
- **Testing**: Test with different solvers when applicable
51+
52+
### Example
53+
```python
54+
def create_storage(
55+
label: str,
56+
capacity_kwh: float,
57+
charging_power_kw: float
58+
) -> Storage:
59+
"""
60+
Create a battery storage component.
61+
62+
Args:
63+
label: Unique identifier
64+
capacity_kwh: Storage capacity [kWh]
65+
charging_power_kw: Maximum charging power [kW]
66+
"""
67+
```
68+
69+
## What We Welcome
70+
71+
- 🔧 New energy components (batteries, heat pumps, etc.)
72+
- 📚 Documentation improvements
73+
- 🐛 Bug fixes
74+
- 🧪 Test cases
75+
- 💡 Energy system examples
76+
77+
## Questions?
78+
79+
- 📖 [Documentation](https://flixopt.github.io/flixopt/latest/)
80+
- 💬 [Discussions](https://github.com/flixOpt/flixopt/discussions)
81+
- 📧 Contact maintainers (see README)
82+
83+
---
84+
85+
**Every contribution helps advance sustainable energy solutions! 🌱⚡**
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug in flixopt
3+
title: "[BUG] "
4+
labels: ["type: bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: checkboxes
11+
id: checks
12+
attributes:
13+
label: Version Checks (indicate both or one)
14+
options:
15+
- label: >
16+
I have confirmed this bug exists on the latest
17+
[release](https://github.com/flixOpt/flixopt/releases) of FlixOpt.
18+
- label: >
19+
I have confirmed this bug exists on the current
20+
[`main`](https://github.com/flixOpt/flixopt/tree/main) branch of FlixOpt.
21+
- type: textarea
22+
id: problem
23+
attributes:
24+
label: Issue Description
25+
description: >
26+
Please provide a description of the issue.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: example
31+
validations:
32+
required: true
33+
attributes:
34+
label: Reproducible Example
35+
description: >
36+
Please provide a minimal reproducible example. See how to [craft minimal bug reports](https://matthewrocklin.com/minimal-bug-reports).
37+
placeholder: >
38+
import flixopt as fx
39+
40+
# Create simple energy system that reproduces the bug
41+
timesteps = pd.date_range('2024-01-01', periods=24, freq='h')
42+
flow_system = fx.FlowSystem(timesteps)
43+
44+
# Add your components here...
45+
render: python
46+
- type: textarea
47+
id: expected-behavior
48+
validations:
49+
required: true
50+
attributes:
51+
label: Expected Behavior
52+
description: >
53+
Please describe or show a code example of the expected behavior.
54+
- type: dropdown
55+
id: solver
56+
attributes:
57+
label: Solver Used
58+
description: Which solver were you using when the bug occurred?
59+
options:
60+
- HiGHS (default)
61+
- Gurobi
62+
- CPLEX
63+
- GLPK
64+
- Other (please specify in description)
65+
validations:
66+
required: true
67+
- type: textarea
68+
id: version
69+
attributes:
70+
label: Installed Versions
71+
description: >
72+
Please share information on your environment. Paste the output below.
73+
For conda: `conda env export` and for pip: `pip freeze`.
74+
value: >
75+
<details>
76+
77+
```
78+
Replace this with your environment info
79+
```
80+
81+
</details>

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: ❓ Questions & Discussion
4+
url: https://github.com/flixOpt/flixopt/discussions
5+
about: Ask questions and discuss with the community
6+
- name: 📖 Documentation
7+
url: https://flixopt.github.io/flixopt/latest/
8+
about: Check our documentation for guides and examples
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for FlixOpt.
3+
title: "[FEATURE] "
4+
labels: ["type: feature"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a new feature! Please provide as much detail as possible.
10+
- type: checkboxes
11+
id: checks
12+
attributes:
13+
label: Prerequisite Checks
14+
options:
15+
- label: >
16+
I have searched the [existing issues](https://github.com/flixOpt/flixopt/issues)
17+
and confirmed this feature doesn't already exist.
18+
- label: >
19+
I have checked the [documentation](https://flixopt.github.io/flixopt/latest/)
20+
to ensure this feature isn't already available.
21+
- type: textarea
22+
id: problem
23+
attributes:
24+
label: Is your feature request related to a problem?
25+
description: >
26+
A clear and concise description of what the problem is.
27+
placeholder: >
28+
I'm always frustrated when modeling [specific energy system scenario]...
29+
- type: textarea
30+
id: solution
31+
validations:
32+
required: true
33+
attributes:
34+
label: Describe the solution you'd like
35+
description: >
36+
A clear and concise description of what you want to happen.
37+
placeholder: >
38+
I would like to be able to model [specific component/feature]...
39+
- type: textarea
40+
id: use-case
41+
validations:
42+
required: true
43+
attributes:
44+
label: Energy System Use Case
45+
description: >
46+
Describe your specific energy system modeling scenario and how this feature would help.
47+
placeholder: >
48+
I'm modeling a district heating system with seasonal thermal storage and need to...
49+
- type: textarea
50+
id: example
51+
attributes:
52+
label: Desired Code Example (optional)
53+
description: >
54+
If possible, show how you would like to use this feature in code.
55+
placeholder: >
56+
# Example of how the new feature might work
57+
thermal_storage = fx.SeasonalStorage(
58+
label='seasonal_storage',
59+
capacity_mwh=1000,
60+
efficiency=0.95
61+
)
62+
render: python
63+
- type: dropdown
64+
id: component-type
65+
attributes:
66+
label: Component Category (if applicable)
67+
description: What type of energy system component does this relate to?
68+
options:
69+
- Storage (batteries, thermal storage, etc.)
70+
- Generation (PV, wind, CHP, etc.)
71+
- Conversion (heat pumps, boilers, etc.)
72+
- Network/Grid (transmission, distribution)
73+
- Optimization/Calculation (algorithms, solvers)
74+
- Data/Input handling
75+
- Results/Output
76+
- Other
77+
- type: textarea
78+
id: alternatives
79+
attributes:
80+
label: Alternatives considered
81+
description: >
82+
Describe any alternative solutions or workarounds you've considered.
83+
- type: textarea
84+
id: additional-context
85+
attributes:
86+
label: Additional context
87+
description: >
88+
Add any other context, research papers, or examples about the feature request here.

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Description
2+
Brief description of the changes in this PR.
3+
4+
## Type of Change
5+
- [ ] Bug fix
6+
- [ ] New feature
7+
- [ ] Documentation update
8+
- [ ] Code refactoring
9+
10+
## Related Issues
11+
Closes #(issue number)
12+
13+
## Testing
14+
- [ ] I have tested my changes
15+
- [ ] Existing tests still pass
16+
17+
## Checklist
18+
- [ ] My code follows the project style
19+
- [ ] I have updated documentation if needed
20+
- [ ] I have added tests for new functionality (if applicable)

.github/workflows/python-app.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ jobs:
200200
with:
201201
python-version: "3.11"
202202

203+
- name: Sync changelog to docs
204+
run: |
205+
cp CHANGELOG.md docs/changelog.md
206+
echo "✅ Synced changelog to docs"
207+
203208
- name: Install documentation dependencies
204209
run: |
205210
python -m pip install --upgrade pip

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@ This might occur when scenarios represent years or months, while an investment d
8383
* The assignment of Bus Objects to Flow.bus is deprecated and will be removed in a future version. Use the label of the Bus instead.
8484
* The usage of Effects objects in Dicts to assign shares to Effects is deprecated and will be removed in a future version. Use the label of the Effect instead.
8585

86+
## [2.1.5] - 2025-07-08
87+
88+
### Fixed
89+
- Fixed Docs deployment
90+
91+
## [2.1.4] - 2025-07-08
92+
93+
### Fixed
94+
- Fixing release notes of 2.1.3, as well as documentation build.
95+
96+
97+
## [2.1.3] - 2025-07-08
98+
99+
### Fixed
100+
- Using `Effect.maximum_operation_per_hour` raised an error, needing an extra timestep. This has been fixed thanks to @PRse4.
101+
86102
## [2.1.2] - 2025-06-14
87103

88104
### Fixed

0 commit comments

Comments
 (0)