Skip to content

Commit

Permalink
use pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Sep 17, 2024
1 parent 9b5a4f3 commit 5cda1b0
Show file tree
Hide file tree
Showing 7 changed files with 3,602 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
40 changes: 12 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,32 @@ name: Tests
on:
pull_request:
push:
branches: [main]
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
pixi-environment: [ py310, py311, py312 ]
os: [ windows-latest, ubuntu-latest, macos-latest ]
experimental: [false]
include:
- python-version: "3.12"
os: "ubuntu-latest"
experimental: true
fail-fast: false
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- name: Setup Micromamba ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v1
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=${{ matrix.python-version }} pip
--file requirements.txt
--file requirements-dev.txt
--channel conda-forge
- name: Install unstable dependencies
if: matrix.experimental == true
run: |
micromamba install conda-forge/label/numpy_dev::numpy
manifest-path: pyproject.toml

- name: Install ciso
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
run: |
python -m pytest -rxs ciso/tests
- name: Run Tests
run: pixi run --environment ${{ matrix.pixi-environment }} test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ _ciso*.so
build/
ciso/_version.py
dist/
# pixi environments
.pixi
*.egg-info
3,552 changes: 3,552 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

38 changes: 33 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ requires = [
"setuptools>=41.2",
"setuptools-scm",
"cython>=3",
"oldest-supported-numpy ; python_version < '3.9'",
"numpy>=2.0.0rc1 ; python_version >= '3.9'",
"numpy>=2",
"wheel",
]
build-backend = "setuptools.build_meta"
Expand All @@ -18,11 +17,10 @@ authors = [
{email = "hetland@tamu.edu"},
{name = "Robert Hetland"}
]
requires-python = ">=3.9"
requires-python = ">=3.10"
license = {text = "BSD-2-Clause"}
dependencies = [
"oldest-supported-numpy ; python_version < '3.9'",
"numpy>=2.0.0rc1 ; python_version >= '3.9'",
"numpy>=2",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -79,3 +77,33 @@ exclude = ["setup.py", "docs", "tests"]
verbose = 1
quiet = false
color = true

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64"]

[tool.pixi.environments]
default = { features = ["py312"], solve-group = "py312" }
py312 = { features = ["py312"], solve-group = "py312" }
py311 = ["py311"]
py310 = ["py310"]

[tool.pixi.tasks]
install-pre-commit = "pre-commit install"
pre-commit = "pre-commit run --all-files"
test = "pytest -rxs ciso/tests"

[tool.pixi.feature.py312.dependencies]
python = "3.12.*"

[tool.pixi.feature.py311.dependencies]
python = "3.11.*"

[tool.pixi.feature.py310.dependencies]
python = "3.10.*"

[tool.pixi.dependencies]
cython = ">=3.0.11,<4"
numpy = ">1.19"
pytest = ">=8.3.3,<9"
pre-commit = ">=3.8.0,<4"
19 changes: 0 additions & 19 deletions requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

0 comments on commit 5cda1b0

Please sign in to comment.