generated from guenp/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from scipy-conference/feat/add-pixi-project-sup…
…port feat: Add pixi support for multi platform lock files * Add `pixi` support so that the entire project can be run with the same dependencies across the linux-64, osx-64, osx-arm64 platforms with the same lock file (which installs in seconds). * Add `pixi` support to the CI.
- Loading branch information
Showing
9 changed files
with
6,430 additions
and
1,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,21 +19,15 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-[email protected] | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install uv | ||
python -m uv pip install --system --upgrade pip wheel | ||
uv pip install --system pytest coverage | ||
uv pip install --system --strict --requirement requirements.lock | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
|
||
- name: List installed Python packages | ||
run: python -m pip list | ||
run: pixi list | ||
|
||
- name: Test with pytest and coverage | ||
run: | | ||
coverage run --module pytest tests/ | ||
pixi run --environment test test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,22 +17,19 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Set up pixi | ||
uses: prefix-dev/setup-[email protected] | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install uv | ||
python -m uv pip install --system --upgrade pip wheel | ||
python -m uv pip install --system ruff black | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
|
||
- name: List installed Python packages | ||
run: python -m pip list | ||
run: pixi list | ||
|
||
- name: Lint with ruff | ||
run: ruff check . | ||
run: | | ||
pixi run --environment lint ruff | ||
- name: Check formatting with black | ||
run: black . --check --verbose | ||
run: | | ||
pixi run --environment lint black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ venv/ | |
*ipynb_checkpoints | ||
.DS_Store | ||
*.ipynb | ||
# pixi environments | ||
.pixi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[project] | ||
name = "assign-reviews" | ||
version = "0.1.0" | ||
description = "Workflow to assign reviewers for the SciPy Conference" | ||
authors = [ | ||
"Guen Prawiroatmodjo <[email protected]>", | ||
"Matthew Feickert <[email protected]>" | ||
] | ||
channels = ["conda-forge"] | ||
platforms = ["linux-64", "osx-64", "osx-arm64"] | ||
|
||
[tasks] | ||
|
||
[dependencies] | ||
python = "3.12.*" | ||
scipy = ">=1.10.0" | ||
pandas = ">=2.2.0" | ||
notebook = ">=7.1.2" | ||
jupytext = ">=1.10.0" | ||
|
||
[pypi-dependencies] | ||
duckdb = { version = ">=0.10.0" } | ||
duckdb-engine = { version = ">=0.11.2" } | ||
|
||
[feature.test.tasks] | ||
test = "coverage run --module pytest tests/" | ||
|
||
[feature.test.dependencies] | ||
pytest = ">=8.0.0" | ||
coverage = ">=7.0.0" | ||
|
||
[feature.lint.tasks] | ||
lint = "pre-commit run --all-files" | ||
ruff = "ruff check ." | ||
black = "black . --check --verbose" | ||
|
||
[feature.lint.dependencies] | ||
pre-commit = ">=3.7.0" | ||
ruff = ">=0.3.4" | ||
black = ">=24.3.0" | ||
|
||
[environments] | ||
test = ["test"] | ||
lint = ["lint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.