diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b26c025f..d4577760 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,13 +57,6 @@ repos: - mdformat-gfm-alerts - mdformat-pyproject - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - additional_dependencies: - - tomli - - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.8.1 hooks: @@ -77,20 +70,20 @@ repos: - repo: local hooks: - id: typetest - name: just typetest - entry: just typetest + name: typetest + entry: uv run poe typetest language: system always_run: true pass_filenames: false - id: basedmypy name: basedmypy - entry: just mypy + entry: uv run poe mypy language: system types_or: [python, pyi] - id: basedpyright name: basedpyright - entry: just pyright + entry: uv run poe pyright language: system types_or: [python, pyi] diff --git a/justfile b/justfile deleted file mode 100644 index 75c88f26..00000000 --- a/justfile +++ /dev/null @@ -1,81 +0,0 @@ -clean: - rm -rf \ - codegen/*.pyc \ - codegen/__pycache__ \ - scipy-stubs/**/*.pyc \ - scipy-stubs/**/__pycache__ \ - ./**/.mypy_cache \ - ./**/.ruff_cache \ - ./**/.tox - -mdformat: - mdformat \ - CODE_OF_CONDUCT.md \ - CONTRIBUTING.md \ - README.md \ - SECURITY.md \ - tests/README.md - -_ruff_format: - ruff format - -_ruff_check: - ruff check --show-fixes - -codespell: - codespell - -repo-review: - repo-review . - -format: mdformat _ruff_format - -ruff: _ruff_format _ruff_check - -check: codespell repo-review ruff - mdformat --check - -lint: check format - -pre-commit: - pre-commit run --all-files - -tox: - tox -p all - -_test_bpr: - basedpyright tests - -_test_mypy: - mypy --config-file=pyproject.toml tests - -typetest: _test_bpr _test_mypy - -# Commands with arguments - -[positional-arguments] -pyright *paths='scipy-stubs codegen': - basedpyright {{paths}} - -[positional-arguments] -mypy *paths='scipy-stubs codegen': - mypy --config-file=pyproject.toml {{paths}} - -[positional-arguments] -stubtest *modules='scipy': - stubtest \ - --mypy-config-file=pyproject.toml \ - --allowlist=.mypyignore \ - --ignore-unused-allowlist \ - {{modules}} - -[positional-arguments] -codemod name path='scipy-stubs': - python -m libcst.tool codemod \ - -x \ - --hide-generated-warnings \ - --hide-blacklisted-warnings \ - --hide-progress \ - --include-stubs \ - codegen.mods.{{name}} \ - {{path}} diff --git a/pyproject.toml b/pyproject.toml index fe335448..fcac6de4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,9 +76,7 @@ dev-dependencies = [ # task runners "poethepoet>=0.31.1", "pre-commit>=4.0.1", - "pre-commit-uv>=4.1.4", "tox>=4.23.2", - "tox-uv>=1.16.0", # codemodding "libcst>=1.5.1", @@ -265,21 +263,21 @@ env_list = ["repo-review", "pre-commit", "3.10", "3.11", "3.12", "3.13"] [tool.tox.env_run_base] description = "stubtest with {base_python}" -runner = "uv-venv-lock-runner" -# use_develop = true -commands_pre = [["uv", "sync", "--frozen"]] # TODO: remove the sync when the above works -commands = [["just", "stubtest"]] +skip_install = true +allowlist_externals = ["uv", "poe"] +commands_pre = [["uv", "sync", "--frozen"]] +commands = [["poe", "stubtest"]] [tool.tox.env.pre-commit] description = "pre-commit" -runner = "uv-venv-lock-runner" -# use_develop = true -commands_pre = [["uv", "sync", "--frozen"]] # TODO: remove the sync when the above works -commands = [["just", "pre-commit"]] +skip_install = true +allowlist_externals = ["uv", "poe"] +commands_pre = [["uv", "sync", "--frozen"]] +commands = [["poe", "pre-commit"]] [tool.tox.env.repo-review] description = "repo-review" -runner = "uv-venv-lock-runner" -# use_develop = true -commands_pre = [["uv", "sync", "--frozen"]] # TODO: remove the sync when the above works -commands = [["just", "repo-review"]] +skip_install = true +allowlist_externals = ["uv", "poe"] +commands_pre = [["uv", "sync", "--frozen"]] +commands = [["poe", "repo-review"]] diff --git a/uv.lock b/uv.lock index e6a3d74f..ba1d65cc 100644 --- a/uv.lock +++ b/uv.lock @@ -528,19 +528,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/16/8f/496e10d51edd6671ebe0432e33ff800aa86775d2d147ce7d43389324a525/pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878", size = 218713 }, ] -[[package]] -name = "pre-commit-uv" -version = "4.1.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pre-commit" }, - { name = "uv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b1/6c/c3c1d01698c8abb0b546defc0304971fa7fb2ba84ad35587b9dad095d73f/pre_commit_uv-4.1.4.tar.gz", hash = "sha256:3db606a79b226127b27dbbd8381b78c0e30de3ac775a8492c576a68e9250535c", size = 6493 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/70/1b65f9118ef64f6ffe5d57a67170bbff25d4f4a3d1cb78e8ed3392e16114/pre_commit_uv-4.1.4-py3-none-any.whl", hash = "sha256:7f01fb494fa1caa5097d20a38f71df7cea0209197b2564699cef9b3f3aa9d135", size = 5578 }, -] - [[package]] name = "pygments" version = "2.18.0" @@ -748,12 +735,10 @@ dev = [ { name = "mdformat-pyproject" }, { name = "poethepoet" }, { name = "pre-commit" }, - { name = "pre-commit-uv" }, { name = "ruff" }, { name = "scipy" }, { name = "sp-repo-review", extra = ["cli"] }, { name = "tox" }, - { name = "tox-uv" }, ] [package.metadata] @@ -772,12 +757,10 @@ dev = [ { name = "mdformat-pyproject", specifier = ">=0.0.2,<1.0" }, { name = "poethepoet", specifier = ">=0.31.1" }, { name = "pre-commit", specifier = ">=4.0.1" }, - { name = "pre-commit-uv", specifier = ">=4.1.4" }, { name = "ruff", specifier = ">=0.8.1" }, { name = "scipy", specifier = "==1.14.1" }, { name = "sp-repo-review", extras = ["cli"], specifier = ">=2024.8.19" }, { name = "tox", specifier = ">=4.23.2" }, - { name = "tox-uv", specifier = ">=1.16.0" }, ] [[package]] @@ -860,20 +843,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/af/c0/124b73d01c120e917383bc6c53ebc34efdf7243faa9fca64d105c94cf2ab/tox-4.23.2-py3-none-any.whl", hash = "sha256:452bc32bb031f2282881a2118923176445bac783ab97c874b8770ab4c3b76c38", size = 166758 }, ] -[[package]] -name = "tox-uv" -version = "1.16.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "packaging" }, - { name = "tox" }, - { name = "uv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ed/5e/c3d2a45ab5465dddbbc267a589c9cfce23b91750d49af10738a08c98534e/tox_uv-1.16.0.tar.gz", hash = "sha256:71b2e2fa6c35c1360b91a302df1d65b3e5a1f656b321c5ebf7b84545804c9f01", size = 16337 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/8d/1baa9f725ddd4824708759cf7b74bc43379f5f7feb079fde0629d7b32b3e/tox_uv-1.16.0-py3-none-any.whl", hash = "sha256:e6f0b525a687e745ab878d07cbf5c7e85d582028d4a7c8935f95e84350651432", size = 13661 }, -] - [[package]] name = "typing-extensions" version = "4.12.2" @@ -892,31 +861,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/37/87/1f677586e8ac487e29672e4b17455758fce261de06a0d086167bb760361a/uc_micro_py-1.0.3-py3-none-any.whl", hash = "sha256:db1dffff340817673d7b466ec86114a9dc0e9d4d9b5ba229d9d60e5c12600cd5", size = 6229 }, ] -[[package]] -name = "uv" -version = "0.5.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/46/95/ba000f161640015c9f2ecc2681f38eb161b8edac600a0451b36e4ad15aa4/uv-0.5.5.tar.gz", hash = "sha256:7f8db4bdf7eaef6be271457c4b2a167f41ad115434944a09f5034018a29b4093", size = 2324705 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/91/ac61feea1b11e4dc342a4fd174f311b628a04ec3b4614a24676c4d214bd1/uv-0.5.5-py3-none-linux_armv6l.whl", hash = "sha256:d091e88a9c2c830169c3ccf95fd972759e0ab629dacc2d5eff525e5ba3583904", size = 13887911 }, - { url = "https://files.pythonhosted.org/packages/84/18/461af22fd1f80f86548013639ab345810dbf35aa44dff1732c6faf311a48/uv-0.5.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f0bfc7ced2fe0c85b3070dfa219072a1406133e18aab2f2fe10b6455ede0f8b2", size = 13900075 }, - { url = "https://files.pythonhosted.org/packages/68/5f/7a236ad48f81c580691f9e5f28dd47289a9819f18410f12ee3c621791efd/uv-0.5.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:553901e95cb5a4da1da19e288c29c5f886793f981750400e5cef48e3031b970b", size = 12869530 }, - { url = "https://files.pythonhosted.org/packages/94/d6/d6f441fd041fb4883332b999481896e28502b51681bcb786a001fb1e4a50/uv-0.5.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:a4f0c7647187044056dc6f6f5d31b01f445d8695eb7d2f442b29fd5c9216a56f", size = 13158009 }, - { url = "https://files.pythonhosted.org/packages/9b/3d/cc1e44e14266bbdb71eb020d14454f4f24f72fcc2eb84a52bf809e030918/uv-0.5.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:34e894c922ba29a59bbe812a458a7095a575f76b87dfc362e0c3f4f650d6f631", size = 13676515 }, - { url = "https://files.pythonhosted.org/packages/10/5f/b81ed7ab715687a790b9b06a6f4e2781d7f7222840eead0392c3ef6f80ea/uv-0.5.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f5569798fc8eaad58fbb4fb70ced8f09ebe607fbbfb95fa42c559f57bbe0cabd", size = 14245499 }, - { url = "https://files.pythonhosted.org/packages/f7/e1/ce5a88bc5ed61ee310a8e0acc3fa3032280bb2d49514fd48b801bb36f96f/uv-0.5.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:59d53cce11718ce5d5367afc8c93ebcfc5e1cddfa4a44aedbf08d08d9b738381", size = 14920230 }, - { url = "https://files.pythonhosted.org/packages/03/84/6fa2deb5bed9dab815cb7f57e14885ecf8de22249b992f9c4ea5dd042c28/uv-0.5.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dee9517ebba13d07d8f139c439c5ff63e438d31ebda4d7eb0af8d0f0cc6a181", size = 14701845 }, - { url = "https://files.pythonhosted.org/packages/59/b2/7078d52a73c1e13d984c22fae1888993e5cd3f40cea029ab2666d79d92a7/uv-0.5.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:29286cd6b9f8e040d02894a67c6b6304811ea393ca9dfade109e93cf4b3b842c", size = 18963098 }, - { url = "https://files.pythonhosted.org/packages/b9/89/a91d927574ce2103d22b7beab319468d915a1d04757cf82b6eaf79b56a10/uv-0.5.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f7f04ae5a5430873d8610d8ea0a5d35df92e60bf701f80b3cf24857e0ac5e72", size = 14442788 }, - { url = "https://files.pythonhosted.org/packages/46/3d/2c5a9d362771aeef13c2ba1c9b1267b469e11331b874486f03f6c6fc5eb1/uv-0.5.5-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:5a47345ccafc0105b2f0cc22fcb0bb05be4d0e60df67f5beea28069b0bb372c8", size = 13394955 }, - { url = "https://files.pythonhosted.org/packages/cf/92/8d646385401472e7358cdf0fc86015edc9bf9132c9b79d7e2a11c300dd84/uv-0.5.5-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:b55d507bfe2bd2330c41680e4b0077972381f40975a59b53007254196abc4477", size = 13639522 }, - { url = "https://files.pythonhosted.org/packages/da/23/5e00b71f9c8b9c16f0947bf84b71265bafdf24947d2e271a657da00a0c6a/uv-0.5.5-py3-none-musllinux_1_1_i686.whl", hash = "sha256:365715e7247c2cd8ef661e8f96927b181248f689c07e48b076c9dbc78a4a0877", size = 13957451 }, - { url = "https://files.pythonhosted.org/packages/02/38/0c624a8d89416fa6c849c6670066c74f420aa898eafdf7cefd3adf77d686/uv-0.5.5-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:0314a4b9a25bf00afe4e5472c338c8c6bd34688c23d63ce1ad35462cf087b492", size = 15840287 }, - { url = "https://files.pythonhosted.org/packages/a8/bd/1a81700d2555be504f0b1ff82f86d666384805e354c8eec2fdf7558d0cf9/uv-0.5.5-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:f4e9ddcffc29f009f692cda699912b02f6a12089d741b71d2fcd0b181eb71c5d", size = 14560282 }, - { url = "https://files.pythonhosted.org/packages/cd/71/c0b137c62a5a8ab5ecc0a8f505b77e5a05d5b94fd9da7560a247dac000f3/uv-0.5.5-py3-none-win32.whl", hash = "sha256:9af7018430da1f0960eee1592c820c343e2619f2d71f66c3be62da330826c537", size = 13810875 }, - { url = "https://files.pythonhosted.org/packages/e3/d8/56dbbe07aba3cf561fff52b8ed75ce7b694a0710ab676fae4cd7fbf1bdae/uv-0.5.5-py3-none-win_amd64.whl", hash = "sha256:69e15f24493d86c3a2da3764891e35a033ceda09404c1f9b386671d509db95f3", size = 15604848 }, -] - [[package]] name = "virtualenv" version = "20.28.0"