Skip to content

Test types across environments #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
20 changes: 15 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ on: [push, pull_request, workflow_dispatch]

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
# Oldest non-EOL and newest released
# scipy-stubs does not support Python 3.9
python-version: ["3.10", "3.13"]
# Tier 1 OSes
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
Expand All @@ -31,9 +39,10 @@ jobs:
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-prerelease
python-version: ${{ matrix.python-version }}

- name: Run mypy tests
run: python -m mypy .
run: python -m mypy . --python-version=${{ matrix.python-version }}

hygiene:
runs-on: ubuntu-latest
Expand All @@ -45,4 +54,5 @@ jobs:

- name: Run Ruff Linter
uses: astral-sh/ruff-action@v3
- run: ruff format --check
- name: Run Ruff Formatter
run: ruff format --check
10 changes: 9 additions & 1 deletion stubs/matplotlib/_mathtext.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import enum
import functools
from tkinter.tix import HList
import sys
from _typeshed import Incomplete
from typing import Literal

from .font_manager import FontProperties
from .mathtext import MathtextBackend

# tkinter.tix was removed from Python 3.13
# Recent matplotlib versions define HList in this module
if sys.version_info >= (3, 13):
HList: Incomplete
else:
from tkinter.tix import HList

def get_unicode_index(symbol: str, math: bool = True) -> int: ...

class Fonts:
Expand Down
5 changes: 0 additions & 5 deletions stubs/skimage/_shared/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/skimage/draw/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/skimage/future/graph/setup.pyi

This file was deleted.

1 change: 0 additions & 1 deletion stubs/skimage/future/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/skimage/measure/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/skimage/morphology/setup.pyi

This file was deleted.

1 change: 0 additions & 1 deletion stubs/skimage/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/skimage/transform/setup.pyi

This file was deleted.

4 changes: 0 additions & 4 deletions stubs/sklearn/__check_build/setup.pyi

This file was deleted.

1 change: 0 additions & 1 deletion stubs/sklearn/_loss/setup.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions stubs/sklearn/cluster/setup.pyi

This file was deleted.

8 changes: 0 additions & 8 deletions stubs/sklearn/datasets/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/sklearn/decomposition/setup.pyi

This file was deleted.

5 changes: 0 additions & 5 deletions stubs/sklearn/ensemble/setup.pyi

This file was deleted.

5 changes: 0 additions & 5 deletions stubs/sklearn/feature_extraction/setup.pyi

This file was deleted.

4 changes: 0 additions & 4 deletions stubs/sklearn/inspection/setup.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions stubs/sklearn/linear_model/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/sklearn/manifold/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/sklearn/metrics/cluster/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/sklearn/metrics/setup.pyi

This file was deleted.

5 changes: 0 additions & 5 deletions stubs/sklearn/neighbors/setup.pyi

This file was deleted.

5 changes: 0 additions & 5 deletions stubs/sklearn/preprocessing/setup.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions stubs/sklearn/setup.pyi

This file was deleted.

8 changes: 0 additions & 8 deletions stubs/sklearn/svm/setup.pyi

This file was deleted.

7 changes: 0 additions & 7 deletions stubs/sklearn/tree/setup.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions stubs/sklearn/utils/setup.pyi

This file was deleted.

18 changes: 0 additions & 18 deletions stubs/vispy/gloo/glir.pyi
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------

import json
import os
import re
import sys
import weakref
from distutils.version import LooseVersion

import numpy as np

from ..util import logger
from . import gl

# TODO: expose these via an extension space in .gl?
_internalformats: list = ...
_internalformats = ...

Expand Down
5 changes: 0 additions & 5 deletions stubs/vispy/util/check_environment.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import os
from distutils.version import LooseVersion

def has_matplotlib(version="1.2"): ...
def has_skimage(version="0.11"): ...
def has_backend(backend, has=..., capable=..., out=...): ...