Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to pixi #74
Switch to pixi #74
Changes from 13 commits
3b5533e
2a35bd0
e660daa
dc731ef
1d84dcd
2f8b73e
942670e
42b5c48
d0c1181
8efc514
74e0500
c558577
bf92eeb
03e58b9
b9de78e
dfe8fc4
36a4c5e
3337043
d83ffca
6b50ac0
b312a97
febe2ec
724f12c
083f951
279c4ca
9be911d
1d22893
13748cc
acb73c0
2a1d6a0
5941f9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just occurred to me when I wanted to update nbqa-ruff to v0.4.6 (need to keep this in sync with ruff manually, please change): How does pixi play with pre-commit? Would I still have a conda base env / the system Python to base pre-commit on? Sounds like trouble for some things...
I just confirmed that:
pixi run pre-commit
leads toAn unexpected error has occurred: CalledProcessError: command: ('/mnt/econ/lcm/lcm/.pixi/envs/default/bin/python3.12', '-mvirtualpenv', '/home/hmg/.cache/pre-commit/repor0qq6lyq/py_env-python3.11', '-p', 'python3.11')
because thetool.ruff
section still specifiestarget-version = "py311"
😆Can we somehow use the pixi-installed Python automatically when pre-commit is run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pixi shell
, which is similar to activating a conda environment. I don't know whether the pre-commit hooks use the correct Python version in this case thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think we do not want that. I think this would also be difficult with the pre-commit CI, since there we would require the pixi environment as well.
I think the version now should work as before under conda.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it worked under conda only if you activated the correct environment or your activated Python happened to be the correct version, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so there may be more clever solutions that I'm not aware of, but I think the easiest for now is to use pixi like conda.
I.e., you activate the pixi environment before you work in a project.
Alternatively, you could start with
pixi run pre-commit install
, and then afterwards runpixi run git commit -m "commit msg"
, which would use the correct Python version.This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.