-
-
Notifications
You must be signed in to change notification settings - Fork 228
Add pixi [pyconde sprints] #2525
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -78,3 +78,20 @@ jobs: | |||||
| # and is recommending this work-around for the time being, see | ||||||
| # https://status.coveralls.io/incidents/pdbt7vdzlvpj | ||||||
| fail-on-error: false | ||||||
|
|
||||||
| check-environment: | ||||||
| name: Check dependencies in sync | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/checkout@v6 | ||||||
| - uses: prefix-dev/setup-pixi@v0.9.5 | ||||||
| with: | ||||||
| run-install: false | ||||||
| - name: Check pyproject.toml and environment.yml are in sync | ||||||
| run: | | ||||||
| pixi workspace export conda-environment --name conda-smithy | sed '/^$/d' > environment.yml | ||||||
| if ! git diff --exit-code environment.yml; then | ||||||
| echo "error: pyproject.toml [tool.pixi] and environment.yml are out of sync" | ||||||
| echo "Run: pixi workspace export conda-environment --name conda-smithy | sed '/^\$/d' > environment.yml" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| exit 1 | ||||||
| fi | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,46 +1,40 @@ | ||||||||||
| name: conda-smithy | ||||||||||
| channels: | ||||||||||
| - conda-forge | ||||||||||
| - nodefaults | ||||||||||
| - conda-forge | ||||||||||
| - nodefaults | ||||||||||
| dependencies: | ||||||||||
|
cdeil marked this conversation as resolved.
|
||||||||||
| - python>=3.6 | ||||||||||
| # Development dependencies | ||||||||||
| - pip | ||||||||||
| - python-build | ||||||||||
| - setuptools>=45 | ||||||||||
| - setuptools_scm>=8.1 | ||||||||||
| - tomli>=1.0.0 | ||||||||||
| - pre-commit | ||||||||||
| - mock | ||||||||||
| - pytest | ||||||||||
| - pytest-cov | ||||||||||
| # # Part of some optional lint tests | ||||||||||
| - conda-recipe-manager >=0.9 | ||||||||||
| - conda-souschef | ||||||||||
| # Runtime dependencies | ||||||||||
| - conda >=4.2 | ||||||||||
| - conda-build >=25.3.1 | ||||||||||
| - conda-package-handling >=1.9.0 | ||||||||||
| - jinja2 | ||||||||||
| - requests | ||||||||||
| - pycryptodome | ||||||||||
| - referencing | ||||||||||
| - pygit2 | ||||||||||
| - pygithub >=2,<3 | ||||||||||
| - ruamel.yaml | ||||||||||
| - conda-forge-pinning | ||||||||||
| - vsts-python-api | ||||||||||
| - toolz | ||||||||||
| - shellcheck | ||||||||||
| - scrypt | ||||||||||
| - license-expression | ||||||||||
| - libarchive | ||||||||||
| - cirun >=0.30 | ||||||||||
| - pydantic >=2.11,<3 | ||||||||||
| - pixi >=0.59.0 | ||||||||||
| - jsonschema | ||||||||||
| - backports.strenum | ||||||||||
| - exceptiongroup | ||||||||||
| # py-rattler's API subject to change, pin to minor | ||||||||||
| - py-rattler >=0.22,<0.23 | ||||||||||
| - rattler-build-conda-compat >=1.4.5,<2.0.0a0 | ||||||||||
| - pre-commit * | ||||||||||
| - mock * | ||||||||||
| - pytest * | ||||||||||
| - pytest-cov * | ||||||||||
| - conda-recipe-manager >=0.9 | ||||||||||
| - conda-souschef * | ||||||||||
| - conda >=4.2 | ||||||||||
| - conda-build >=25.3.1 | ||||||||||
| - conda-package-handling >=1.9.0 | ||||||||||
| - jinja2 * | ||||||||||
| - requests * | ||||||||||
| - pycryptodome * | ||||||||||
| - referencing * | ||||||||||
| - pygit2 * | ||||||||||
| - pygithub >=2,<3 | ||||||||||
| - ruamel.yaml * | ||||||||||
| - conda-forge-pinning * | ||||||||||
| - vsts-python-api * | ||||||||||
| - toolz * | ||||||||||
| - shellcheck * | ||||||||||
| - scrypt * | ||||||||||
| - license-expression * | ||||||||||
| - libarchive * | ||||||||||
| - cirun >=0.30 | ||||||||||
| - pydantic >=2.11,<3 | ||||||||||
| - pixi >=0.59.0 | ||||||||||
| - jsonschema * | ||||||||||
| - backports.strenum * | ||||||||||
| - exceptiongroup * | ||||||||||
| - py-rattler >=0.22,<0.23 | ||||||||||
| - rattler-build-conda-compat >=1.4.5,<2.0.0a0 | ||||||||||
| - python >=3.9 | ||||||||||
|
Comment on lines
+36
to
+37
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
As per recently merged PRs. |
||||||||||
| - pip | ||||||||||
| - pip: | ||||||||||
| - -e . | ||||||||||
|
Comment on lines
+39
to
+40
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this please
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is added by @cdeil, if you are into Rust, adding a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just out of curiosity, why do you want to remove this? Isnt it just as nice that you dont have to run
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like tools doing sneaky things. It's a hack anyway that
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pixi-build might solve this here? #general > Add a pixi-build section to conda-smithy @ 💬
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I implemented the |
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||
| **Added:** | ||||||||
|
|
||||||||
| * Add Pixi dev support in `pyproject.toml`, keeping `conda` support as-is. | ||||||||
| This is for devs working on `conda-smithy`. | ||||||||
|
Comment on lines
+3
to
+4
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| **Changed:** | ||||||||
|
|
||||||||
| * <news item> | ||||||||
|
|
||||||||
| **Deprecated:** | ||||||||
|
|
||||||||
| * <news item> | ||||||||
|
|
||||||||
| **Removed:** | ||||||||
|
|
||||||||
| * <news item> | ||||||||
|
|
||||||||
| **Fixed:** | ||||||||
|
|
||||||||
| * <news item> | ||||||||
|
|
||||||||
| **Security:** | ||||||||
|
|
||||||||
| * <news item> | ||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -78,3 +78,53 @@ markers = [ | |||||
| "legacy_appveyor: Test designed to run as if prior to the azure migration", | ||||||
| "cli: CLI tests outside of test/test_cli.py", | ||||||
| ] | ||||||
|
|
||||||
| [tool.pixi.workspace] | ||||||
| channels = ["conda-forge"] | ||||||
| name = "conda-smithy" | ||||||
| platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"] | ||||||
|
|
||||||
| [tool.pixi.pypi-dependencies] | ||||||
| conda-smithy = { path = ".", editable = true } | ||||||
|
|
||||||
| # Runtime dependencies | ||||||
| [tool.pixi.dependencies] | ||||||
| conda = ">=4.2" | ||||||
| conda-build = ">=25.3.1" | ||||||
| conda-package-handling = ">=1.9.0" | ||||||
| jinja2 = "*" | ||||||
| requests = "*" | ||||||
| pycryptodome = "*" | ||||||
| referencing = "*" | ||||||
| pygit2 = "*" | ||||||
| pygithub = ">=2,<3" | ||||||
| "ruamel.yaml" = "*" | ||||||
| conda-forge-pinning = "*" | ||||||
| vsts-python-api = "*" | ||||||
| toolz = "*" | ||||||
| shellcheck = "*" | ||||||
| scrypt = "*" | ||||||
| license-expression = "*" | ||||||
| libarchive = "*" | ||||||
| cirun = ">=0.30" | ||||||
| pydantic = ">=2.11,<3" | ||||||
| pixi = ">=0.59.0" | ||||||
| jsonschema = "*" | ||||||
| "backports.strenum" = "*" | ||||||
| exceptiongroup = "*" | ||||||
| # py-rattler's API subject to change, pin to minor | ||||||
| py-rattler = ">=0.22,<0.23" | ||||||
| rattler-build-conda-compat = ">=1.4.5,<2.0.0a0" | ||||||
|
cdeil marked this conversation as resolved.
cdeil marked this conversation as resolved.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
As per recently merged PRs. |
||||||
|
|
||||||
| # Development and testing dependencies | ||||||
| [tool.pixi.feature.dev.dependencies] | ||||||
| pre-commit = "*" | ||||||
| mock = "*" | ||||||
| pytest = "*" | ||||||
| pytest-cov = "*" | ||||||
| # Part of some optional lint tests | ||||||
| conda-recipe-manager = ">=0.9" | ||||||
| conda-souschef = "*" | ||||||
|
|
||||||
| [tool.pixi.environments] | ||||||
| default = { features = ["dev"], solve-group = "default" } | ||||||
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.
Can you please post the diff here? There's no need for a developer to force pixi to figure out this change.
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.
The diff is currently empty because the two files are consistent.
This CI check guarantees they will remain in sync moving forward.
In the future if a dev adjusts a dependency they have to do it in
pyproject.tomlandenvironment.ymlconsistently, or they just do it inpyproject.tomland run thepixi workspace exportcommand which applies the correct consistent change toenvironment.yml.As far as I know there is no better way to do it. But seems OK, no?
@isuruf Does this answer your question?
(Apologies if I misunderstood/don't get what you are looking for)
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.
I mean report the failing diff in the CI test, so that a PR author can apply the diff without needing to have pixi.
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.
AFAIK the line
if ! git diff --exit-code environment.ymlis not redirecting output anywhere, so it'll be printed by default 🤔 See this example with a single line change in README.md: