Skip to content

ci: use pixi for model tests#1443

Merged
lkstrp merged 13 commits intoPyPSA:masterfrom
lkstrp:fix-model-tests
Nov 19, 2025
Merged

ci: use pixi for model tests#1443
lkstrp merged 13 commits intoPyPSA:masterfrom
lkstrp:fix-model-tests

Conversation

@lkstrp
Copy link
Copy Markdown
Member

@lkstrp lkstrp commented Nov 17, 2025

No description provided.

@lkstrp
Copy link
Copy Markdown
Member Author

lkstrp commented Nov 18, 2025

@brynpickering In here, we wanna run the same PyPSA-Eur test workflow (integration and unit tests), but install instead the current ref of PyPSA. I did a couple of unsuccessful tries and errors, and before it gets hacky, could you point me to the right way to do this with pixi?

I was thinking that the below does the job, but the lock file always blocks it or is created and then blocks it:

pixi add --pypi --git https://github.com/PyPSA/PyPSA.git --rev ecff0543638b26a217059d2b5215685b194c95d5 PyPSA

@lkstrp
Copy link
Copy Markdown
Member Author

lkstrp commented Nov 18, 2025

Ref #1446

Copy link
Copy Markdown
Contributor

@brynpickering brynpickering left a comment

Choose a reason for hiding this comment

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

Sorry, didn't see this PR when I opened mine!

I have it working on my fork (see here - it fails, but in a predictable way as its expecting Bus when pypsa v1 doesn't use that terminology anymore there).

if: env.pinned == 'false'
run: |
pixi remove pypsa
pixi remove ${{ lower(github.event.repository.name) }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This command is removing the package so it should stay as pypsa, no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I just want it to be generalised so that we can copy and paste the workflow to e.g. linopy. But I've added a package name environment variable now

@lkstrp lkstrp merged commit cd5d65b into PyPSA:master Nov 19, 2025
18 of 20 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