Skip to content
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

DEV: setup pixi #46

Merged
merged 5 commits into from
Dec 28, 2024
Merged

DEV: setup pixi #46

merged 5 commits into from
Dec 28, 2024

Conversation

lucascolley
Copy link
Collaborator

basically just showing off pixi! Also adds pre-commit to CI

@lucascolley
Copy link
Collaborator Author

lucascolley commented Dec 27, 2024

For some context here, https://data-apis.org/array-api-extra/contributing.html#development-workflow is the kind of development workflow this enables (without having to worry about pip or conda at all). The other main benefit is simplifying the CI workflows, and making them easily reproducible locally.

@mdhaber
Copy link
Owner

mdhaber commented Dec 27, 2024

Thanks! I'm happy with trying this if @keewis is.
Any way to avoid the trivial changes like * to -, though?

@lucascolley
Copy link
Collaborator Author

Any way to avoid the trivial changes like * to -, though?

That seems to be from one of the pre-commit hooks which @keewis added.

@mdhaber
Copy link
Owner

mdhaber commented Dec 27, 2024

Ah, OK. @keewis is that something you could adjust?

Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

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

I'm happy with trying this if @keewis is.

I have never used pixi (or other workflow managers... as far as I can tell, it is a combination of a package and a workflow manager), but I'm happy to try.

However, that means I'll probably ping you whenever I have issues I can't figure out myself.

Ah, OK. @keewis is that something you could adjust?

quite possibly, but normalizing formats like markdown is kinda the point of the auto-formatter (in this case, prettier). We only see this here because this adds (and applies) all hooks, which we should have done earlier. Otherwise we can split this out into a separate PR and discuss there.

@@ -310,10 +310,10 @@ def test_indexing(xp):
# `__setitem__` can change mask
x[1] = mxp.asarray(30, mask=False)
assert x[1].data == 30
assert x[1].mask == False
assert not x[1].mask # mask == array(False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

was this change part of the auto-fixing of lints? I think we only need one of the two versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
python -m pip install --no-deps -e .
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.39.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a way to automatically update this (like, using dependabot or something similar)? Otherwise I think we will only upgrade whenever one of us remembers to manually do so, which will be pretty infrequent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure, let me ask

@mdhaber
Copy link
Owner

mdhaber commented Dec 27, 2024

Otherwise we can split this out into a separate PR and discuss there.

Yeah, let's.

@lucascolley lucascolley marked this pull request as ready for review December 28, 2024 00:14
@lucascolley
Copy link
Collaborator Author

I have never used pixi (or other workflow managers... as far as I can tell, it is a combination of a package and a workflow manager), but I'm happy to try.

However, that means I'll probably ping you whenever I have issues I can't figure out myself.

Sounds good to me! I had never used a task-runner before using pixi, but it is extremely convenient. And it is so nice to not have to worry about pip or conda environments anymore!

This reverts parts of commit aee82ac.
@lucascolley
Copy link
Collaborator Author

for the CI failures, you have to run pixi update and commit and push the changes whenever you modify pyproject.toml.

@keewis
Copy link
Collaborator

keewis commented Dec 28, 2024

can you do that for me, please? I'll have to look into setting up pixi at some point, but I don't have time for that right now.

@lucascolley
Copy link
Collaborator Author

lucascolley commented Dec 28, 2024

sure thing

when you find the time, setup is basically just curl -fsSL https://pixi.sh/install.sh | bash

@lucascolley lucascolley merged commit 981c86c into mdhaber:main Dec 28, 2024
9 checks passed
@lucascolley lucascolley deleted the pixi branch December 28, 2024 00:54
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.

3 participants