| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| --- | ||
| name: Pixi | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "pixi.lock" | ||
| - "pyproject.toml" | ||
| - "src/**" | ||
| - "lib/**" | ||
| - ".github/workflows/pixi.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "pixi.lock" | ||
| - "pyproject.toml" | ||
| - "src/**" | ||
| - "lib/**" | ||
| - ".github/workflows/pixi.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| check-lockfile: | ||
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| fetch-depth: 1 | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up pixi | ||
| uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 | ||
| with: | ||
| pixi-version: v0.73.0 | ||
| run-install: false | ||
|
|
||
| - name: Check that pixi.lock is up to date | ||
| run: | | ||
| if ! pixi install --locked --manifest-path pyproject.toml; then | ||
| echo "::error file=pixi.lock::pixi.lock is not consistent with pyproject.toml. " \ | ||
| "Run 'pixi lock' locally and commit the updated pixi.lock." | ||
| exit 1 | ||
| fi | ||
|
|
||
| pixi-linux-install: | ||
| needs: check-lockfile | ||
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| fetch-depth: 0 | ||
|
Comment thread
jklymak marked this conversation as resolved.
|
||
| persist-credentials: false | ||
|
|
||
| - name: Set up pixi and install environment | ||
| uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0 | ||
| with: | ||
| pixi-version: v0.73.0 | ||
| locked: true | ||
| cache: true | ||
| cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
|
|
||
| - name: Show pixi info | ||
| run: | | ||
| pixi info | ||
| pixi list | ||
|
|
||
| - name: Clean build artifacts | ||
| run: | | ||
| rm -rf build meson-logs meson-private .mesonpy-* | ||
|
|
||
| - name: Install Matplotlib editable | ||
| run: pixi run python -m pip install --config-settings=setup-args="-Db_lto=false" --editable . | ||
|
|
||
| - name: Smoke test editable install | ||
| run: | | ||
| pixi run python -c "import matplotlib; print(matplotlib.__version__)" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -141,6 +141,7 @@ setup. | |
|
|
||
| .. _venv: https://docs.python.org/3/library/venv.html | ||
| .. _conda: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html | ||
| .. _pixi: https://pixi.prefix.dev/ | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| Expand Down Expand Up | @@ -199,6 +200,37 @@ setup. | |
|
|
||
| Remember to activate the environment whenever you start working on Matplotlib! | ||
|
|
||
| .. tab-item:: pixi environment | ||
|
|
||
| A `pixi`_ configuration is included in ``pyproject.toml`` that will | ||
| install the development dependencies:: | ||
|
|
||
| pixi install | ||
|
Comment thread
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityDo we need a dedicated pixi install? I assume pixi run would install the needed dependencies automatically? So we could simplify.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI suppose we could just have the one command, but I like keeping them separate so the user knows it was the pixi part that failed, not the pip install part. When these things fail they are pretty opaque...
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityFair. OTOH the pixi install failing is quite unlikely. That‘d mean either an issue in the package infrastructure like a failing server) which is beyond our responsibility and should be rare) or it’s a configuration issue on our side. In the latter case we‘d also notice soon as this would also be broken in CI. I leave this up to you.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI'm more thinking it may fail on machines we don't test...
Sorry, something went wrong.
All reactions
|
||
|
|
||
| and then to install an editable version of Matplotlib:: | ||
|
|
||
| pixi run python -m pip install \ | ||
| --no-build-isolation \ | ||
| --config-settings=setup-args="-Db_lto=false" \ | ||
| --editable . | ||
|
|
||
| (the ``-Db_lto=false`` is not needed on all platforms). You can test the installation with:: | ||
|
|
||
| pixi run python -c "import matplotlib; print(matplotlib.__file__)" | ||
|
|
||
|
|
||
| .. tip:: | ||
| We provide some pixi tasks as shortcuts for common development tasks, | ||
| listed via:: | ||
|
|
||
| pixi task list | ||
|
|
||
| If you do not want to use ``pixi run`` in front of every command, run:: | ||
|
|
||
| pixi shell | ||
|
|
||
| and continue to use pixi as a python environment. | ||
|
|
||
|
|
||
| Install external dependencies | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.