diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b048f2..ada27b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 + - uses: extractions/setup-just@v2 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' + cache-dependency-path: 'requirements-test.txt' + - name: Run ruff + run: | + make -C python pip-install + make ruff clippy: if: "!contains(github.event.head_commit.message, 'skip ci')" @@ -59,7 +68,7 @@ jobs: with: python-version: '3.13' cache: 'pip' - cache-dependency-path: 'python/requirements-dev.txt' + cache-dependency-path: 'python/requirements-test.txt' - name: Main Script run: | make -C python pip-install @@ -90,7 +99,7 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' - cache-dependency-path: 'python/requirements-dev.txt' + cache-dependency-path: 'python/requirements-test.txt' - name: Run tests run: | make -C python pip-install diff --git a/Cargo.lock b/Cargo.lock index b387acf..9d0f85c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,18 +82,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" +checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.23" +version = "4.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" +checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121" dependencies = [ "anstyle", "clap_lex", @@ -233,9 +233,9 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -243,9 +243,9 @@ dependencies = [ [[package]] name = "lambert_w" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb65fe07e2fe197be2c067f3e85becc0db1b819d22e289ab953317b3bf44629" +checksum = "5dd27b68ad78410452bd4c87b08222a6174a939642abb39494ed3527fb2bfc49" dependencies = [ "libm", ] @@ -264,9 +264,9 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" @@ -408,9 +408,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -503,6 +503,12 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" @@ -540,9 +546,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" dependencies = [ "itoa", "memchr", @@ -562,9 +568,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.94" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -605,20 +611,21 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", @@ -630,9 +637,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -640,9 +647,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -653,15 +660,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/python/Cargo.lock b/python/Cargo.lock index 7fc64f5..ee94142 100644 --- a/python/Cargo.lock +++ b/python/Cargo.lock @@ -28,9 +28,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "lambert_w" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb65fe07e2fe197be2c067f3e85becc0db1b819d22e289ab953317b3bf44629" +checksum = "5dd27b68ad78410452bd4c87b08222a6174a939642abb39494ed3527fb2bfc49" dependencies = [ "libm", ] @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -219,9 +219,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15" +checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc" dependencies = [ "cfg-if", "indoc", @@ -238,9 +238,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b" +checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7" dependencies = [ "once_cell", "target-lexicon", @@ -248,9 +248,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1547a7f9966f6f1a0f0227564a9945fe36b90da5a93b3933fc3dc03fae372d" +checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d" dependencies = [ "libc", "pyo3-build-config", @@ -258,9 +258,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb6da8ec6fa5cedd1626c886fc8749bdcbb09424a86461eb8cdf096b7c33257" +checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.23.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a385202ff5a92791168b1136afae5059d3ac118457bb7bc304c197c2d33e7d" +checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4" dependencies = [ "heck", "proc-macro2", @@ -314,9 +314,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.94" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", diff --git a/python/Makefile b/python/Makefile index 40a2c39..11ef1ca 100644 --- a/python/Makefile +++ b/python/Makefile @@ -62,22 +62,22 @@ clippy: ## Run clippy lint checks # {{{ testing REQUIREMENTS=\ - requirements-dev.txt \ + requirements-test.txt \ requirements.txt requirements.in: @echo "# This file is autogenerated. Do not modify it!" > $@ @$(PYTHON) -c \ 'import tomllib; \ - c = tomllib.load(open("python/pyproject.toml", "rb")); \ + c = tomllib.load(open("pyproject.toml", "rb")); \ print("\n".join(c["build-system"]["requires"]))' >> $@ .PHONY: requirements.in -requirements-dev.txt: requirements.in pyproject.toml +requirements-test.txt: requirements.in pyproject.toml uv pip compile --upgrade --universal --python-version '3.10' \ - --extra dev \ + --extra test \ -o $@ $^ -.PHONY: requirements-dev.txt +.PHONY: requirements-test.txt requirements.txt: requirements.in pyproject.toml uv pip compile --upgrade --universal --python-version '3.10' \ @@ -89,7 +89,7 @@ pin: $(REQUIREMENTS) ## Pin dependencies versions to requirements.txt .PHONY: pin pip-install: ## Install pinned dependencies from requirements.txt - $(PYTHON) -m pip install -r requirements-dev.txt + $(PYTHON) -m pip install -r requirements-test.txt $(PYTHON) -m pip install --verbose --no-build-isolation --editable . .PHONY: pip-install diff --git a/python/pyproject.toml b/python/pyproject.toml index c1403d4..fb88f5b 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -36,11 +36,8 @@ dependencies = [ "numpy>=2", ] optional-dependencies.dev = [ - "mypy", "pyproject-fmt", - "pytest", "reuse", - "ruff", "typos", "uv", ] @@ -48,6 +45,11 @@ optional-dependencies.docs = [ "sphinx>=6", "sphinx-book-theme", ] +optional-dependencies.test = [ + "mypy", + "pytest", + "ruff", +] urls.Documentation = "https://mittagleffler.readthedocs.io" urls.Repository = "https://github.com/alexfikl/mittagleffler" diff --git a/python/requirements-dev.txt b/python/requirements-dev.txt deleted file mode 100644 index e8a87a7..0000000 --- a/python/requirements-dev.txt +++ /dev/null @@ -1,70 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile --universal --python-version 3.10 --extra dev -o requirements-dev.txt requirements.in pyproject.toml -attrs==24.3.0 - # via reuse -binaryornot==0.4.4 - # via reuse -boolean-py==4.0 - # via - # license-expression - # reuse -chardet==5.2.0 - # via - # binaryornot - # python-debian -click==8.1.8 - # via reuse -colorama==0.4.6 ; sys_platform == 'win32' - # via - # click - # pytest -exceptiongroup==1.2.2 ; python_full_version < '3.11' - # via pytest -iniconfig==2.0.0 - # via pytest -jinja2==3.1.5 - # via reuse -license-expression==30.4.0 - # via reuse -markupsafe==3.0.2 - # via jinja2 -maturin==1.8.1 - # via -r requirements.in -mypy==1.14.1 - # via mittagleffler (pyproject.toml) -mypy-extensions==1.0.0 - # via mypy -numpy==2.2.1 - # via - # -r requirements.in - # mittagleffler (pyproject.toml) -packaging==24.2 - # via pytest -pluggy==1.5.0 - # via pytest -pyproject-fmt==2.5.0 - # via mittagleffler (pyproject.toml) -pytest==8.3.4 - # via mittagleffler (pyproject.toml) -python-debian==0.1.49 - # via reuse -reuse==5.0.2 - # via mittagleffler (pyproject.toml) -ruff==0.8.4 - # via mittagleffler (pyproject.toml) -toml-fmt-common==1.0.1 - # via pyproject-fmt -tomli==2.2.1 ; python_full_version < '3.11' - # via - # maturin - # mypy - # pytest - # toml-fmt-common -tomlkit==0.13.2 - # via reuse -typing-extensions==4.12.2 - # via mypy -typos==1.29.0 - # via mittagleffler (pyproject.toml) -uv==0.5.13 - # via mittagleffler (pyproject.toml) diff --git a/python/requirements-test.txt b/python/requirements-test.txt new file mode 100644 index 0000000..746de47 --- /dev/null +++ b/python/requirements-test.txt @@ -0,0 +1,33 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --universal --python-version 3.10 --extra test -o requirements-test.txt requirements.in pyproject.toml +colorama==0.4.6 ; sys_platform == 'win32' + # via pytest +exceptiongroup==1.2.2 ; python_full_version < '3.11' + # via pytest +iniconfig==2.0.0 + # via pytest +maturin==1.8.1 + # via -r requirements.in +mypy==1.14.1 + # via pymittagleffler (pyproject.toml) +mypy-extensions==1.0.0 + # via mypy +numpy==2.2.2 + # via + # -r requirements.in + # pymittagleffler (pyproject.toml) +packaging==24.2 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.3.4 + # via pymittagleffler (pyproject.toml) +ruff==0.9.2 + # via pymittagleffler (pyproject.toml) +tomli==2.2.1 ; python_full_version < '3.11' + # via + # maturin + # mypy + # pytest +typing-extensions==4.12.2 + # via mypy diff --git a/python/requirements.txt b/python/requirements.txt index 9690787..603295b 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -2,9 +2,9 @@ # uv pip compile --universal --python-version 3.10 -o requirements.txt requirements.in pyproject.toml maturin==1.8.1 # via -r requirements.in -numpy==2.2.1 +numpy==2.2.2 # via # -r requirements.in - # mittagleffler (pyproject.toml) + # pymittagleffler (pyproject.toml) tomli==2.2.1 ; python_full_version < '3.11' # via maturin