Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full git history for setuptools_scm
fetch-tags: true # Fetch tags for setuptools_scm

- uses: prefix-dev/setup-pixi@v0.8.10
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: tests-${{ github.ref }}
group: pytest-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
build:
test:
name: ${{ matrix.os }} ${{ matrix.environment }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -57,6 +57,9 @@ jobs:
cache: ${{ matrix.environment != 'upstream' }}
locked: ${{ matrix.environment != 'upstream' }}

- name: Smoke test
run: pixi run -e ${{ matrix.environment }} smoke-test

- name: pytest with coverage
if: matrix.environment != 'nogil'
run: pixi run -e ${{ matrix.environment }} coverage
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ jobs:
- name: Install wheel
run: pip install dist/*.whl

- name: Test import
working-directory: /
run: python -c "import TEMPLATE; print(TEMPLATE.__version__)"
- name: Smoke test
working-directory: /tmp
run: |
cp ${{ github.workspace }}/smoke_test.py .
python smoke_test.py

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion TEMPLATE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
__version__ = importlib.metadata.version("TEMPLATE")
except importlib.metadata.PackageNotFoundError: # pragma: nocover
# Local copy, not installed with pip
__version__ = "999"
__version__ = "9999"


__all__ = ("__version__", "hello")
19 changes: 12 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ sphinx-lint = "*"
install-git-hooks = { cmd = "lefthook install", description = "Install pre-commit hooks" }
lint = { cmd = "lefthook run pre-commit --all-files --force", description = "Run all linters" }

[tool.pixi.feature.smoke.tasks]
smoke-test = { cmd = "python smoke_test.py", description = "Test import the library and print essential information" }

[tool.pixi.feature.tests.dependencies]
pytest = "*"
pytest-cov = "*"
Expand Down Expand Up @@ -217,8 +220,10 @@ pytest-run-parallel = "*"
python = "=3.11"
# TODO repeat dependencies here, but use = instead of >=

[tool.pixi.feature.upstream.dependencies]
python = "=3.13" # TODO python 3.14 prereleases?

[tool.pixi.feature.upstream.pypi-dependencies]
# TODO python 3.14 prereleases?
# TODO uncomment relevant dependencies
# numpy = { index = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" }
# pandas = { index = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" }
Expand All @@ -239,12 +244,12 @@ twine-upload = { depends-on = ["dist"], cmd = "python -m twine upload dist/*" }

[tool.pixi.environments]
# FIXME use same solve-groups with and without numba
default = { features = ["py313", "docs", "tests", "ipython"], solve-group = "py313" }
default = { features = ["py313", "docs", "smoke", "tests", "ipython"], solve-group = "py313" }
dist = { features = ["dist"], no-default-feature = true }
lint = { features = ["lint"], no-default-feature = true }
docs = { features = ["py313", "docs"], solve-group = "py313" }
mindeps = { features = ["mindeps", "tests"] }
py311 = { features = ["py311", "tests"] }
py313 = { features = ["py313", "tests"], solve-group = "py313" }
nogil = { features = ["nogil", "tests"] }
upstream = { features = ["py313", "upstream", "tests"], no-default-feature = true }
mindeps = { features = ["mindeps", "smoke", "tests"] }
py311 = { features = ["py311", "smoke", "tests"] }
py313 = { features = ["py313", "smoke", "tests"], solve-group = "py313" }
nogil = { features = ["nogil", "smoke", "tests"], no-default-feature = true }
upstream = { features = ["upstream", "smoke", "tests"], no-default-feature = true }
10 changes: 10 additions & 0 deletions smoke_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Test import the library and print essential information"""

import sys

import TEMPLATE

print("Python interpreter:", sys.executable)
print("Python version :", sys.version)
print("Library path :", TEMPLATE.__file__)
print("Library version :", TEMPLATE.__version__)
Loading