Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
41 changes: 19 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
Expand All @@ -23,38 +23,37 @@ jobs:
timeout-minutes: 1

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2

- name: typos
uses: crate-ci/typos@master
uses: crate-ci/typos@v1.35.1

- name: markdownlint
uses: DavidAnson/markdownlint-cli2-action@v20
uses: DavidAnson/markdownlint-cli2-action@v20.0.0
with:
config: "docs/.markdownlint.yaml"
globs: "**/*.md"

- uses: uncenter/setup-taplo@v1
- uses: uncenter/setup-taplo@v1.0.8
with:
version: "0.9.3"
- name: taplo
run: |
taplo validate --colors never --no-schema
taplo fmt --colors never --check

- uses: astral-sh/setup-uv@v6
- run: uv sync --only-group=list_and_test
- uses: astral-sh/setup-uv@v6.4.3

- name: ruff
run: |
uv run --no-sync ruff check --output-format=github
uv run --no-sync ruff format --check
uv run ruff check --output-format=github
uv run ruff format --check

- name: pytest
run: uv run --no-sync pytest
run: uv run pytest

- name: format-ignores
run: uv run --no-sync tool/format_ignores.py --check
run: uv run tool/format_ignores.py --check

basedpyright:
runs-on: ubuntu-latest
Expand All @@ -64,15 +63,15 @@ jobs:
matrix:
py: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2

- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@v6.4.3
with:
enable-cache: true
python-version: ${{ matrix.py }}

- name: basedpyright
run: uv run --only-group=basedpyright basedpyright
run: uv run basedpyright

mypy:
runs-on: ubuntu-latest
Expand All @@ -82,16 +81,14 @@ jobs:
matrix:
py: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2

- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@v6.4.3
with:
python-version: ${{ matrix.py }}

- name: mypy
run: >
uv run --only-group=mypy --no-editable
mypy --no-incremental --cache-dir=/dev/null --soft-error-limit=-1 .
run: uv run --no-editable mypy --no-incremental --cache-dir=/dev/null .

stubtest:
runs-on: ${{ matrix.os }}
Expand All @@ -102,11 +99,11 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
py: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2

- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@v6.4.3
with:
python-version: ${{ matrix.py }}

- name: stubtest
run: uv run --active -p ${{ matrix.py }} tool/stubtest.py
run: uv run --active tool/stubtest.py
22 changes: 9 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ name = "numtype"
version = "2.3.2.0.dev0"
description = "Experimental Typing Stubs for NumPy"
readme = "README.md"
authors = [
{name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com"},
]
maintainers = [
{name = "NumPy Developers", email = "numpy-discussion@python.org"},
]
authors = [{name = "Joren Hammudoglu", email = "jhammudoglu@gmail.com"}]
maintainers = [{name = "NumPy Developers", email = "numpy-discussion@python.org"}]
license = "BSD-3-Clause"
keywords = ["numpy", "typing", "stubs"]
classifiers = [
Expand Down Expand Up @@ -48,41 +44,41 @@ dependencies = []

[dependency-groups]
numpy = ["numtype[numpy]"]
lint = ["ruff>=0.12.1"]
lint = ["ruff>=0.12.7"]
pytest = [
{include-group = "numpy"},
"pytest>=8.4.1",
"typing_extensions>=4.14.0",
"typing_extensions>=4.14.1",
]
list_and_test = [
{include-group = "lint"},
{include-group = "pytest"},
]
types = [
{include-group = "pytest"},
"types-setuptools>=80.9.0.20250529",
"types-setuptools>=80.9.0.20250801",
"types-tabulate>=0.9.0.20241207",
]
basedpyright = [
{include-group = "numpy"},
{include-group = "types"},
"basedpyright>=1.29.5",
"basedpyright>=1.31.1",
]
mypy = [
{include-group = "types"},
"mypy[faster-cache]>=1.16.1",
"mypy[faster-cache]>=1.17.1",
]
typecheck = [
{include-group = "basedpyright"},
{include-group = "mypy"},
]
docs = [
"mkdocs-material>=9.6.15",
"mkdocs-material>=9.6.16",
"mkdocs-awesome-nav>=3.1.2",
"markdown-callouts>=0.4.0",
"mkdocs-include-markdown-plugin>=7.1.6",
"mkdocs-minify-plugin>=0.8.0",
"mkdocstrings[python]>=0.29.1",
"mkdocstrings[python]>=0.30.0",
"pygments>=2.19.2",
]
dev = [
Expand Down
2 changes: 1 addition & 1 deletion tool/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# requires-python = ">=3.11"
# dependencies = [
# "numtype[numpy]",
# "mypy[faster-cache]>=1.16.0", # keep in sync with pyproject.toml
# "mypy[faster-cache]>=1.17.1", # keep in sync with pyproject.toml
#
# "PyInstaller",
# "hypothesis",
Expand Down
Loading
Loading