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

Switch to pixi and support windows #1

Merged
merged 28 commits into from
Jun 11, 2024
Merged

Switch to pixi and support windows #1

merged 28 commits into from
Jun 11, 2024

Conversation

pavelzw
Copy link
Member

@pavelzw pavelzw commented Jun 10, 2024

Checklist

  • Added a CHANGELOG.rst entry

@pavelzw pavelzw changed the title pre-commit Switch to pixi Jun 10, 2024
pixi.toml Outdated Show resolved Hide resolved
pixi.toml Outdated Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
Comment on lines +43 to +48
- name: Publish package on TestPyPi
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish package on PyPi
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
Copy link
Member Author

Choose a reason for hiding this comment

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

You need to create a first package manually and upload it to testpypi and pypi.
Also, you need to add trusted publishers s.t. auth via OIDC works

image

pixi.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
.gitattributes Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
README.md Outdated

# Set up development environment
pixi shell
pre-commit install
Copy link
Member Author

Choose a reason for hiding this comment

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

this won't always work since pre-commit is not part of the default env. why not use pixi run pre-commit-install which automatically uses the lint env?

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough - wanted to keep the set up familiar to non pixi users. I think I'll create a dev env with everything bundled into it.

README.md Outdated
pre-commit install
pip install --no-build-isolation -e .
pip install -e .
Copy link
Member Author

Choose a reason for hiding this comment

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

this will use build isolation, i.e. use setuptools-scm outside of the pixi environment. you would need --no-build-isolation for this. Also, you should specify --no-deps to not use pypi dependencies from pyproject.toml and instead use the conda dependencies from your pixi environment

pyproject.toml Outdated
Comment on lines 84 to 91
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["osx-arm64"]

[tool.pixi.pypi-dependencies]
ndonnx = { path = ".", editable = true }

[tool.pixi.tasks]
Copy link
Member Author

Choose a reason for hiding this comment

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

you should specify these things in pixi.toml (or use pyproject.toml solely). also, i wouldn't recommend ndonnx = { path = ".", editable = true } as of now: prefix-dev/pixi#1046

@adityagoel4512 adityagoel4512 changed the title Switch to pixi Switch to pixi and support windows Jun 10, 2024
@adityagoel4512 adityagoel4512 marked this pull request as ready for review June 10, 2024 23:44
Copy link
Member Author

@pavelzw pavelzw left a comment

Choose a reason for hiding this comment

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

Other than my few comments this looks good to me

README.md Show resolved Hide resolved
pixi.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@adityagoel4512 adityagoel4512 merged commit 329c3b8 into main Jun 11, 2024
14 checks passed
@adityagoel4512 adityagoel4512 deleted the pixi branch June 11, 2024 08:24
@Quantco Quantco deleted a comment from pavelzw Jun 16, 2024
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