Skip to content

feat: add environment variable support for options#1513

Merged
lkstrp merged 4 commits intoPyPSA:masterfrom
lkstrp:better-options
Jan 15, 2026
Merged

feat: add environment variable support for options#1513
lkstrp merged 4 commits intoPyPSA:masterfrom
lkstrp:better-options

Conversation

@lkstrp
Copy link
Copy Markdown
Member

@lkstrp lkstrp commented Jan 5, 2026

Changes proposed in this Pull Request

Adds support to set options via environment variables. E.g. system wide PYPSA_PARAMS__OPTIMIZE__SOLVER_NAME=gurobi in your bashrc. Environment variables bring less overhead than own config files (like matplotlib etc.)

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in docs.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes docs/release-notes.md of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

Copy link
Copy Markdown
Member

@coroa coroa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. The docs are also great.

@lkstrp lkstrp enabled auto-merge (squash) January 15, 2026 15:40
@lkstrp lkstrp disabled auto-merge January 15, 2026 17:12
@lkstrp lkstrp merged commit 7bfca83 into PyPSA:master Jan 15, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants