Skip to content

Commit 03da771

Browse files
committed
Merge branch 'main' into lazy-class-methods
2 parents 08b7e29 + 984ee9b commit 03da771

8 files changed

Lines changed: 2709 additions & 2162 deletions

File tree

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1+
# Excluding files from an sdist generated by meson-python
2+
#########################################################
3+
4+
# Note: when adding to this list, be aware that you need to commit your changes
5+
# before they take effect (can be confusing during testing)
6+
7+
.github/* export-ignore
8+
.git* export-ignore
9+
codecov.yml export-ignore
10+
pixi.lock export-ignore
11+
RELEASING.md export-ignore
12+
renovate.json export-ignore
13+
114
# GitHub syntax highlighting
215
pixi.lock linguist-language=YAML linguist-generated=true

.github/workflows/docs-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2121

2222
- name: Download Artifact
23-
uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11
23+
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
2424
with:
2525
workflow: docs-build.yml
2626
name: docs-build

RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
1. Update the version in `src/array_api_extra/__init__.py`
1+
1. Update the version in `pyproject.toml`, `meson.build`, and `src/array_api_extra/__init__.py`
22
2. Update the lockfile with `pixi update; pixi install`
33
3. Push your changes
44
4. Cut a release via the GitHub GUI
5-
5. Update the version to `{next micro version}.dev0`
5+
5. Update the version to `{next micro version}.dev0` in `pyproject.toml`, `meson.build`, and `src/array_api_extra/__init__.py`
66
6. `pixi clean cache --pypi; pixi update; pixi install`
77
7. Push your changes
88
8. Merge the automated PR to conda-forge/array-api-extra-feedstock

meson.build

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
project(
2+
'array-api-extra',
3+
version: '0.10.0.dev0'
4+
)
5+
6+
py = import('python').find_installation()
7+
8+
# NOTE: downstream projects may rely on this variable name when vendoring,
9+
# do not change it without consulting with downstream projects
10+
sources = {
11+
'array_api_extra': files(
12+
'src/array_api_extra/__init__.py',
13+
'src/array_api_extra/_delegation.py',
14+
'src/array_api_extra/testing.py',
15+
),
16+
'array_api_extra/_lib': files(
17+
'src/array_api_extra/_lib/__init__.py',
18+
'src/array_api_extra/_lib/_at.py',
19+
'src/array_api_extra/_lib/_backends.py',
20+
'src/array_api_extra/_lib/_funcs.py',
21+
'src/array_api_extra/_lib/_lazy.py',
22+
'src/array_api_extra/_lib/_testing.py',
23+
),
24+
'array_api_extra/_lib/_utils': files(
25+
'src/array_api_extra/_lib/_utils/__init__.py',
26+
'src/array_api_extra/_lib/_utils/_compat.py',
27+
'src/array_api_extra/_lib/_utils/_compat.pyi',
28+
'src/array_api_extra/_lib/_utils/_helpers.py',
29+
'src/array_api_extra/_lib/_utils/_typing.py',
30+
'src/array_api_extra/_lib/_utils/_typing.pyi',
31+
),
32+
}
33+
34+
foreach subdir, files : sources
35+
py.install_sources(files, subdir: subdir)
36+
endforeach
37+
38+
subdir('tests')
39+
subdir('vendor_tests')

pixi.lock

Lines changed: 2574 additions & 2114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
2+
requires = ["meson-python"]
3+
build-backend = "mesonpy"
44

55
[project]
66
name = "array-api-extra"
7+
version = "0.10.0.dev0"
78
authors = [
89
{ name = "Lucas Colley", email = "lucas.colley8@gmail.com" },
910
# { name = "Open Source Contributors" }, # https://github.com/pypi/warehouse/issues/14813
1011
]
1112
description = "Extra array functions built on top of the array API standard."
1213
readme = "README.md"
13-
license.file = "LICENSE"
14+
license = "MIT"
15+
license-files = ["LICENSE"]
1416
requires-python = ">=3.11"
1517
classifiers = [
1618
"Intended Audience :: Developers",
@@ -24,50 +26,84 @@ classifiers = [
2426
"Programming Language :: Python :: Free Threading :: 3 - Stable",
2527
"Typing :: Typed",
2628
]
27-
dynamic = ["version"]
28-
dependencies = ["array-api-compat>=1.12.0,<2"]
29+
dependencies = ["array-api-compat>=1.13.0,<2"]
2930

3031
[project.urls]
3132
Homepage = "https://github.com/data-apis/array-api-extra"
3233
"Bug Tracker" = "https://github.com/data-apis/array-api-extra/issues"
3334
Changelog = "https://github.com/data-apis/array-api-extra/releases"
3435

35-
# Hatch
36-
37-
[tool.hatch]
38-
version.path = "src/array_api_extra/__init__.py"
39-
40-
[tool.hatch.build.targets.sdist]
41-
exclude = ["codecov.yml", "pixi.lock", "RELEASING.md", "renovate.json"]
42-
43-
#  Pixi
36+
# Pixi
4437

4538
[tool.pixi.workspace]
4639
channels = ["https://prefix.dev/conda-forge"]
4740
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
41+
preview = ["pixi-build"]
42+
43+
### array-api-extra package definition ###
44+
45+
[tool.pixi.package.build.backend]
46+
name = "pixi-build-python"
47+
version = "*"
48+
49+
[tool.pixi.package.host-dependencies]
50+
meson-python = "*"
51+
uv = "*" # interfaces with meson-python instead of pip
52+
53+
[tool.pixi.package.run-dependencies]
54+
array-api-compat = "*"
55+
56+
### workspace environments ###
57+
58+
[tool.pixi.environments]
59+
default = { features = ["py313"], solve-group = "py313" }
60+
lint = { features = ["py313", "lint"], solve-group = "py313" }
61+
docs = { features = ["py313", "docs"], solve-group = "py313" }
62+
tests = { features = ["py313", "tests"], solve-group = "py313" }
63+
tests-py313 = { features = ["py313", "tests"], solve-group = "py313" } # alias of tests
64+
65+
# Some backends may pin numpy; use separate solve-group
66+
dev = { features = ["py313", "lint", "tests", "docs", "dev", "backends"], solve-group = "backends" }
67+
tests-backends = { features = ["py313", "tests", "backends"], solve-group = "backends" }
68+
tests-backends-py311 = { features = ["py311", "tests", "backends"] }
69+
70+
# CUDA not available on free github actions and on some developers' PCs
71+
dev-cuda = { features = ["py313", "lint", "tests", "docs", "dev", "backends", "cuda-backends"], solve-group = "cuda" }
72+
tests-cuda = { features = ["py313", "tests", "backends", "cuda-backends"], solve-group = "cuda" }
73+
tests-cuda-py311 = { features = ["py311", "tests", "backends", "cuda-backends"] }
74+
75+
# Ungrouped environments
76+
tests-numpy1 = ["py311", "tests", "numpy1"]
77+
tests-py311 = ["py311", "tests"]
78+
tests-nogil = ["nogil", "tests"]
79+
80+
### default feature definition ###
81+
82+
[tool.pixi.dev]
83+
# this pulls in array-api-extra's host and run dependencies
84+
array-api-extra.path = "."
4885

4986
[tool.pixi.dependencies]
50-
array-api-compat = ">=1.12.0,<2"
87+
array-api-extra.path = "."
5188

52-
[tool.pixi.pypi-dependencies]
53-
array-api-extra = { path = ".", editable = true }
89+
### non-default feature definitions ###
5490

5591
[tool.pixi.feature.lint.dependencies]
5692
typing-extensions = ">=4.15.0"
5793
pylint = ">=4.0.4"
5894
mypy = ">=1.19.1"
59-
basedpyright = ">=1.36.1"
95+
basedpyright = ">=1.37.1"
6096
numpydoc = ">=1.10.0,<2"
6197
# import dependencies for mypy:
6298
array-api-strict = ">=2.4.1,<2.5"
6399
numpy = ">=2.1.3"
64-
hypothesis = ">=6.148.7"
100+
hypothesis = ">=6.148.8"
65101
dask-core = ">=2025.12.0" # No distributed, tornado, etc.
66102
dprint = ">=0.50.0,<0.51"
67103
lefthook = ">=2.0.13,<3"
68-
ruff = ">=0.14.10,<0.15"
69-
typos = ">=1.40.0,<2"
70-
actionlint = ">=1.7.9,<2"
104+
ruff = ">=0.14.11,<0.15"
105+
typos = ">=1.42.0,<2"
106+
actionlint = ">=1.7.10,<2"
71107
blacken-docs = ">=1.20.0,<2"
72108
pytest = ">=9.0.2,<10"
73109
validate-pyproject = ">=0.24.1,<0.25"
@@ -94,7 +130,7 @@ lint = { cmd = "lefthook run pre-commit --all-files --force", description = "Run
94130
[tool.pixi.feature.tests.dependencies]
95131
pytest = ">=9.0.2"
96132
pytest-cov = ">=7.0.0"
97-
hypothesis = ">=6.148.7"
133+
hypothesis = ">=6.148.8"
98134
array-api-strict = ">=2.4.1,<2.5"
99135
numpy = ">=1.22.0"
100136
scipy = ">=1.15.2,<2"
@@ -198,28 +234,6 @@ dask-core = ">=2025.12.0" # No distributed, tornado, etc.
198234
# sparse = "*" # numba not available on Python 3.13t yet
199235
# jax = "*" # ml_dtypes not available on Python 3.13t yet
200236

201-
[tool.pixi.environments]
202-
default = { features = ["py313"], solve-group = "py313" }
203-
lint = { features = ["py313", "lint"], solve-group = "py313" }
204-
docs = { features = ["py313", "docs"], solve-group = "py313" }
205-
tests = { features = ["py313", "tests"], solve-group = "py313" }
206-
tests-py313 = { features = ["py313", "tests"], solve-group = "py313" } # alias of tests
207-
208-
# Some backends may pin numpy; use separate solve-group
209-
dev = { features = ["py313", "lint", "tests", "docs", "dev", "backends"], solve-group = "backends" }
210-
tests-backends = { features = ["py313", "tests", "backends"], solve-group = "backends" }
211-
tests-backends-py311 = { features = ["py311", "tests", "backends"] }
212-
213-
# CUDA not available on free github actions and on some developers' PCs
214-
dev-cuda = { features = ["py313", "lint", "tests", "docs", "dev", "backends", "cuda-backends"], solve-group = "cuda" }
215-
tests-cuda = { features = ["py313", "tests", "backends", "cuda-backends"], solve-group = "cuda" }
216-
tests-cuda-py311 = { features = ["py311", "tests", "backends", "cuda-backends"] }
217-
218-
# Ungrouped environments
219-
tests-numpy1 = ["py311", "tests", "numpy1"]
220-
tests-py311 = ["py311", "tests"]
221-
tests-nogil = ["nogil", "tests"]
222-
223237
# pytest
224238

225239
[tool.pytest.ini_options]

tests/meson.build

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
py.install_sources([
2+
'__init__.py',
3+
'conftest.py',
4+
'test_at.py',
5+
'test_funcs.py',
6+
'test_helpers.py',
7+
'test_lazy.py',
8+
'test_testing.py',
9+
'test_version.py',
10+
],
11+
subdir: 'array_api_extra/tests',
12+
install_tag: 'tests',
13+
)

vendor_tests/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
py.install_sources([
2+
'__init__.py',
3+
'_array_api_compat_vendor.py',
4+
'test_vendor.py',
5+
],
6+
subdir: 'array_api_extra/vendor_tests',
7+
install_tag: 'tests',
8+
)

0 commit comments

Comments
 (0)