From 2a6b536e73de5a72a8003d482b5d83a2378c2e47 Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 10 Oct 2024 02:33:35 +0200 Subject: [PATCH 1/4] loosen the `scipy` version restriction --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index ee7b3929..7f982847 100644 --- a/poetry.lock +++ b/poetry.lock @@ -493,4 +493,4 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" python-versions = "^3.10.1" -content-hash = "14697e57d604e0253359433f29b5bbf2902f45b74117224a49edf56dbd95a619" +content-hash = "f0d76bc39600ccae1cf3b058f7ef7182e5f5a642f20af125a7e8e0876cffa0c6" diff --git a/pyproject.toml b/pyproject.toml index 16ee45bd..1ced3a68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ version = "1.14.1.0.dev0" [tool.poetry.dependencies] python = "^3.10.1" -scipy = "^1.14.1" +scipy = ">=1.14.1" optype = "^0.6.1" [tool.poetry.group.lint.dependencies] From 82cc0aac0a5fb9ccc2624afcff79314c628b50fd Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 10 Oct 2024 02:34:32 +0200 Subject: [PATCH 2/4] less claustrophobic markdown --- .markdownlint.yaml | 2 +- .vscode/settings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 5362ee32..40545682 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -4,7 +4,7 @@ no-hard-tabs: true MD007: indent: 4 MD013: - line_length: 88 + line_length: 130 MD031: list_items: false MD033: diff --git a/.vscode/settings.json b/.vscode/settings.json index cca7065b..906be06d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "[markdown]": { - "editor.rulers": [88] + "editor.rulers": [130] }, "[python]": { "editor.rulers": [130] From 8b3ce05af88b3090f99835a8fa365817b9048481 Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 10 Oct 2024 03:07:42 +0200 Subject: [PATCH 3/4] better development status matrix --- README.md | 91 +++++++++++++++++++++---------------------------------- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index e35fe31c..67ce7a8a 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,9 @@ --- > [!NOTE] -> This project is in the alpha stage, so some annotations are missing, and some might -> be (slightly) incorrect. -> But either way, it's no problem to `scipy-stubs` at the moment: -> Type-checkers will (already) understand `scipy` a lot better *with* `scipy-stubs`, -> than without it. +> This project is in the alpha stage, so you might encounter some incomplete or invalid annotations. +> But even so, `scipy-stubs` could already prove to be quite helpful — +> IDE's and static type-checkers will understand `scipy` a lot better *with* `scipy-stubs` than without it. ## Installation @@ -85,61 +83,42 @@ pip install scipy-stubs ### Type-checkers -For validation and testing, `scipy-stubs` primarily uses -[`basedmypy`](https://github.com/KotlinIsland/basedmypy) (a `mypy` fork) and -[`basedpyright`](https://github.com/DetachHead/basedpyright) (a `pyright` fork). -Because they are in generally stricter than `mypy` and `pyright`, they should be -compatible as well. -If you find that this is not the case, then don't hesitate to open an issue. +For validation and testing, `scipy-stubs` primarily uses [`basedmypy`](https://github.com/KotlinIsland/basedmypy) (a `mypy` fork) +and [`basedpyright`](https://github.com/DetachHead/basedpyright) (a `pyright` fork). +They are in generally stricter than `mypy` and `pyright`, so you can assume compatibility with `mypy` and `pyright` as well. +But if you find that this isn't the case, then don't hesitate to open an issue or submit a pull request. ### Required dependencies -The versioning scheme of `scipy-stubs` includes the compatible `scipy` version. -Later versions might work too, but in case of API-changes, the stubs could be outdated. +The versioning scheme of `scipy-stubs` includes the compatible `scipy` version as `{scipy_version}.{stubs_version}`. +Even though `scipy-stubs` doesn't enforce an upper bound on the `scipy` version, later `scipy` versions aren't guaranteed to be +fully compatible. -Apart from `scipy`'s own dependencies (e.g. `numpy`), the only other -required dependency is [`optype`](https://github.com/jorenham/optype). +Apart from `scipy`'s own dependencies, (e.g. `numpy`), the only other required dependency is +[`optype`](https://github.com/jorenham/optype), which itself only depends on `typing_extensions`. The exact version requirements are specified in the [`pyproject.toml`](pyproject.toml). -## Development Progress - -| Package or module | Stubs status | -|---------------------------------- |---------------- | -| `scipy.__init__` | **4: done** | -| `scipy._lib` | 2: partial | -| `scipy.cluster` | **4: done** | -| `scipy.constants` | **4: done** | -| `scipy.datasets` | **4: done** | -| `scipy.fft` | 3: ready | -| `scipy.fftpack` | 3: ready | -| `scipy.integrate` | **4: done** | -| `scipy.interpolate` | **4: done** | -| `scipy.io` | **4: done** | -| `scipy.linalg` | **4: done** | -| ~`scipy.misc`~ | **4: done** | -| `scipy.ndimage` | 2: partial | -| `scipy.odr` | 3: ready | -| `scipy.optimize` | 3: ready | -| `scipy.signal` | 2: partial | -| `scipy.signal.windows` | 1: skeleton | -| `scipy.sparse` | 2: partial | -| `scipy.sparse.csgraph` | 2: partial | -| `scipy.sparse.linalg` | 2: partial | -| `scipy.spatial` | 2: partial | -| `scipy.spatial.distance` | 2: partial | -| `scipy.special` | **4: done** | -| `scipy.stats` | 2: partial | -| `scipy.stats.contingency` | 3: ready | -| `scipy.stats.distributions` | **4: done** | -| `scipy.stats.mstats` | 1: skeleton | -| `scipy.stats.qmc` | 2: partial | -| `scipy.stats.sampling` | 1: skeleton | -| `scipy.version` | **4: done** | - -Status labels: - -1. skeleton (mostly succesful stubgen) -2. partial (incomplete/broad annotations) -3. ready (passes stubtest) -4. done (complete, valid, tested, and production-ready) +## Development Status + +| Package | `ruff`/`flake8-pyi` | `stubtest` | `based{mypy,pyright}` | completeness score | +| ------------------- | ------------------- | ------------------ | --------------------- | ---------------------- | +| `scipy._lib` | :heavy_check_mark: | :x: | :x: | :waxing_crescent_moon: | +| `scipy.cluster` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | +| `scipy.constants` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | +| `scipy.datasets` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | +| `scipy.fft` | :heavy_check_mark: | :heavy_check_mark: | :x: | :waxing_crescent_moon: | +| `scipy.fftpack` | :heavy_check_mark: | :heavy_check_mark: | :x: | :waxing_crescent_moon: | +| `scipy.integrate` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :waxing_gibbous_moon: | +| `scipy.interpolate` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :first_quarter_moon: | +| `scipy.io` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | +| `scipy.linalg` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :waxing_gibbous_moon: | +| ~`scipy.misc`~ | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | +| `scipy.ndimage` | :heavy_check_mark: | :x: | :x: | :new_moon: | +| `scipy.odr` | :heavy_check_mark: | :heavy_check_mark: | :x: | :waxing_crescent_moon: | +| `scipy.optimize` | :heavy_check_mark: | :heavy_check_mark: | :x: | :first_quarter_moon: | +| `scipy.signal` | :heavy_check_mark: | :x: | :x: | :new_moon: | +| `scipy.sparse` | :heavy_check_mark: | :x: | :x: | :waxing_crescent_moon: | +| `scipy.spatial` | :heavy_check_mark: | :x: | :x: | :waxing_crescent_moon: | +| `scipy.special` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :first_quarter_moon: | +| `scipy.stats` | :heavy_check_mark: | :x: | :x: | :first_quarter_moon: | From ee216bdb9308f6ba30dd82c6d1940f2908e1577c Mon Sep 17 00:00:00 2001 From: jorenham Date: Thu, 10 Oct 2024 03:13:36 +0200 Subject: [PATCH 4/4] centered table columns --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67ce7a8a..6e72ab4a 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,8 @@ The exact version requirements are specified in the [`pyproject.toml`](pyproject ## Development Status -| Package | `ruff`/`flake8-pyi` | `stubtest` | `based{mypy,pyright}` | completeness score | -| ------------------- | ------------------- | ------------------ | --------------------- | ---------------------- | +| Package | `ruff`/`flake8-pyi` | `stubtest` | `based{mypy,pyright}` | completeness | +| :------------------ | :-----------------: | :----------------: | :-------------------: | :--------------------: | | `scipy._lib` | :heavy_check_mark: | :x: | :x: | :waxing_crescent_moon: | | `scipy.cluster` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: | | `scipy.constants` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: |