Skip to content

Autogenerate pixi.toml #1542

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

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 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
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
- 'setup.cfg'
- 'requirements.txt'
- '.pre-commit-config.yaml'
- 'pixi.toml'
- 'pixi.lock'

style:
name: Check code style
Expand All @@ -63,6 +65,17 @@
with:
python-version: ${{ matrix.python-version }}
- uses: pre-commit/[email protected]
# Check that pixi stuff is consistent
- uses: prefix-dev/[email protected]

Check failure

Code scanning / zizmor

unpinned action reference Error test

unpinned action reference
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should tackle this separately across all the workflows

with:
run-install: false
- name: Check that the pixi.lock is consistent with pixi.toml
run: |
pixi run --no-install --locked echo "All good!"
- name: Check that pixi.toml is consistent with environment.yml and pyproject.toml
run: |
pip install tomlkit
python scripts/generate-pixi-toml.py --verify-only

test:
name: "${{ matrix.os }} test py${{ matrix.python-version }} numpy${{ matrix.numpy-version }} : fast-compile ${{ matrix.fast-compile }} : float32 ${{ matrix.float32 }} : ${{ matrix.part }}"
Expand Down
7 changes: 5 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ dependencies:
- pytest-xdist
- pytest-benchmark
- pytest-mock
- pip:
- pytest-sphinx
- pytest-sphinx
# For building docs
- sphinx>=5.1.0,<6
- sphinx_rtd_theme
Expand All @@ -57,3 +56,7 @@ dependencies:
- cython
- graphviz
- pydot

# This line can be ignored by users, it's only needed by the script
# `scripts/generate-pixi-toml.py`. It is used to determine the feature name.
category: conda-dev
103 changes: 103 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# THIS FILE WAS GENERATED BY `scripts/generate-pixi-toml.py`
# You can edit this file locally, but if you want to push changes
# upstream to pymc-devs/pytensor, then you should instead modify
# the script.

[project]
name = "pytensor"
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
channels = ["conda-forge"]

[dependencies]
cons = "*"
etuples = "*"
filelock = ">=3.15"
logical-unification = "*"
minikanren = "*"
numpy = ">=1.17.0"
scipy = "<2,>=1"
setuptools = ">=59.0.0"

[pypi-dependencies]
pytensor = {path = ".", editable = true}

[feature.blas.target.linux-64.dependencies]
libblas = {version = "*", build = "*mkl"}
mkl = "*"
mkl-service = "*"

[feature.blas.target.osx-64.dependencies]
libblas = {version = "*", build = "*mkl"}
mkl = "*"
mkl-service = "*"

[feature.blas.target.osx-arm64.dependencies]
libblas = {version = "*", build = "*accelerate"}

[feature.blas.target.win-64.dependencies]
libblas = {version = "*", build = "*mkl"}
mkl = "*"
mkl-service = "*"

[feature.conda-dev.dependencies]
compilers = "*"
coveralls = "*"
cython = "*"
diff-cover = "*"
graphviz = "*"
ipython = "*"
matplotlib = "*"
mypy = "*"
myst-nb = "*"
packaging = "*"
pandas = "*"
pydeprecate = "*"
pymc-sphinx-theme = "*"
pytest-xdist = "*"
python = ">=3.10"
ruff = "*"
sphinx-design = "*"
sphinx_rtd_theme = "*"
types-setuptools = "*"
watermark = "*"

[feature.jax]
platforms = ["linux-64", "osx-64", "osx-arm64"]

[feature.jax.dependencies]
jax = "*"
jaxlib = "*"


[feature.numba.dependencies]
llvmlite = "*"
numba = ">=0.57"

[feature.rtd.dependencies]
pydot = "*"
pygments = "*"
sphinx = "<6,>=5.1.0"

[feature.tests.dependencies]
coverage = ">=5.1"
pre-commit = "*"
pytest = "*"
pytest-benchmark = "*"
pytest-cov = ">=2.6.1"
pytest-mock = "*"
pytest-sphinx = "*"
tomlkit = "*"


[environments]
default = {features = ["blas", "conda-dev", "jax", "numba", "rtd", "tests"], solve-group = "default"}

# Disable non-default environments pending <https://github.com/prefix-dev/pixi/issues/2725>
# If you want to re-enable some of these, it's recommended to remove the solve-group key.
# minimal = {features = [], solve-group = "default"}
# blas = {features = ["blas"], solve-group = "default"}
# conda-dev = {features = ["conda-dev"], solve-group = "default"}
# jax = {features = ["jax"], solve-group = "default"}
# numba = {features = ["numba"], solve-group = "default"}
# rtd = {features = ["rtd"], solve-group = "default"}
# tests = {features = ["tests"], solve-group = "default"}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tests = [
"pytest-benchmark",
"pytest-mock",
"pytest-sphinx",
"tomlkit",
]
rtd = ["sphinx>=5.1.0,<6", "pygments", "pydot"]
jax = ["jax", "jaxlib"]
Expand Down
22 changes: 22 additions & 0 deletions scripts/environment-blas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file defines BLAS for pixi.toml generation via
# `scripts/generate-pixi-toml.py`.

name: pytensor-blas
channels:
- conda-forge
dependencies:
# Use MKL for Linux, Intel macOS, and Windows.
- mkl # [linux]
- mkl-service # [linux]
- libblas=*=*mkl # [linux]
- mkl # [osx64]
- mkl-service # [osx64]
- libblas=*=*mkl # [osx64]
- mkl # [win]
- mkl-service # [win]
- libblas=*=*mkl # [win]

# Use Accelerate for Apple Silicon.
- libblas=*=*accelerate # [arm64]

category: blas
Loading
Loading