From ab3207702f43da82afbcf0037a9303756b0a4981 Mon Sep 17 00:00:00 2001 From: jorenham Date: Tue, 3 Dec 2024 13:45:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix=20`uv=20sync`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 14 +++----------- .pre-commit-config.yaml | 1 - pyproject.toml | 20 +++++++++++--------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5fb36b6..20c0d0f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,10 +33,7 @@ jobs: uses: astral-sh/setup-uv@v4 - name: install - run: | - uv sync --frozen --no-install-project --python 3.13 - uv build - uv pip install "$(find ./dist -name '*.whl')" + run: uv sync --frozen --python 3.13 - name: lint run: uv run poe lint @@ -57,10 +54,7 @@ jobs: uses: astral-sh/setup-uv@v4 - name: install - run: | - uv sync --frozen --no-install-project --python 3.13 - uv build - uv pip install "$(find ./dist -name '*.whl')" + run: uv sync --frozen --python 3.13 - name: typetest run: uv run poe typetest @@ -79,9 +73,7 @@ jobs: - name: install run: | - uv sync --frozen --no-install-project --python=$OLDEST_SUPPORTED_PYTHON - uv build - uv pip install "$(find ./dist -name '*.whl')" + uv sync --frozen --python=$OLDEST_SUPPORTED_PYTHON uv pip install --upgrade numpy==$OLDEST_SUPPORTED_NUMPY - name: typetest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4577760..208c725e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,6 @@ ci: skip: - markdownlint - mdformat - - codespell - ruff - ruff-format - typetest diff --git a/pyproject.toml b/pyproject.toml index fcac6de4..f4ef31fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ description = "Typing stubs for SciPy" readme = "README.md" authors = [{name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com"}] license = "BSD-3-Clause" +keywords = ["scipy", "typing", "pep484"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -36,8 +37,10 @@ Issues = "https://github.com/jorenham/scipy-stubs/issues" Changelog = "https://github.com/jorenham/scipy-stubs/releases" Funding = "https://github.com/sponsors/jorenham" -[tool.hatch.build.targets.sdist] +[tool.hatch.build] packages = ["scipy-stubs"] + +[tool.hatch.build.targets.sdist] exclude = [ "/.cache", "/.github", @@ -147,7 +150,7 @@ skip = "*.lock,*.pyi" [tool.mdformat] end_of_line = "lf" -exclude = [".tox/**", ".venv/**", "**/*.m[!d]", "**/*.[!m]d"] # python >= 3.13 +exclude = [".tox/**", ".venv/**", "**/*.m[!d]", "**/*.[!m]d"] [tool.mypy] python_version = "3.10" @@ -156,7 +159,7 @@ disable_bytearray_promotion = true disable_memoryview_promotion = true warn_unused_ignores = true warn_unreachable = true -disallow_any_explicit = false # no other way to type e.g. `float64 <: number[Any]` +disallow_any_explicit = false # no other way to type e.g. `float64 <: number[Any]` enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] # plugins = ["numpy.typing.mypy_plugin"] @@ -229,7 +232,6 @@ select = ["ALL"] ignore = ["D", "FBT", "COM812", "CPY", "EM", "TD", "FIX", "DOC"] [tool.ruff.lint.per-file-ignores] -# TODO: enable F (pyflakes) "*.pyi" = ["F", "E741", "N", "A", "PYI054", "PLC2701", "PLW3201", "PLR", "FURB"] [tool.ruff.lint.flake8-import-conventions] @@ -266,18 +268,18 @@ description = "stubtest with {base_python}" skip_install = true allowlist_externals = ["uv", "poe"] commands_pre = [["uv", "sync", "--frozen"]] -commands = [["poe", "stubtest"]] +commands = [["uv", "run", "poe", "stubtest"]] [tool.tox.env.pre-commit] description = "pre-commit" skip_install = true -allowlist_externals = ["uv", "poe"] +allowlist_externals = ["uv"] commands_pre = [["uv", "sync", "--frozen"]] -commands = [["poe", "pre-commit"]] +commands = [["uv", "run", "poe", "pre-commit"]] [tool.tox.env.repo-review] description = "repo-review" skip_install = true -allowlist_externals = ["uv", "poe"] +allowlist_externals = ["uv"] commands_pre = [["uv", "sync", "--frozen"]] -commands = [["poe", "repo-review"]] +commands = [["uv", "run", "poe", "repo-review"]]