From c3a45786fb14561faafb98e349ad4807ee71b250 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Sun, 8 Dec 2024 19:44:58 +0000 Subject: [PATCH 01/20] add scipy-typed output --- recipe/meta.yaml | 54 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d306f8c..6c0ffe0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,6 @@ {% set name = "scipy-stubs" %} {% set version = "1.14.1.5" %} +{% set scipy_version = version.split('.')[:3] | join('.') } {% set python_min = "3.10" %} package: @@ -15,23 +16,42 @@ build: script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation number: 0 -requirements: - host: - - python {{ python_min }} - - hatchling - - pip - run: - - python >={{ python_min }},<4.0.0 - - optype >=0.7.3 - run_constrained: - - scipy >=1.10 - -test: - commands: - - pip check - requires: - - python {{ python_min }} - - pip +outputs: + - name: scipy-stubs + requirements: + host: + - python {{ python_min }} + - hatchling + - pip + run: + - python >={{ python_min }},<4.0.0 + - optype >=0.7.3 + run_constrained: + - scipy >=1.10 + test: + commands: + - pip check + requires: + - python {{ python_min }} + - pip + + - name: scipy-typed + requirements: + host: + - python + run: + - python + - scipy =={{ scipy_version }} + test: + requires: + - basedmypy + imports: + - scipy + source_files: + - pyproject.toml + - .mypyignore + commands: + - stubtest --mypy-config-file=pyproject.toml --allowlist=.mypyignore --ignore-unused-allowlist scipy about: home: https://github.com/jorenham/scipy-stubs/ From f8debdfdd7f3b2893bb3ea7a7fcf46b061172baf Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Sun, 8 Dec 2024 19:48:21 +0000 Subject: [PATCH 02/20] fix typo --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6c0ffe0..b07b15b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set name = "scipy-stubs" %} {% set version = "1.14.1.5" %} -{% set scipy_version = version.split('.')[:3] | join('.') } +{% set scipy_version = version.split('.')[:3] | join('.') %} {% set python_min = "3.10" %} package: From 348452f84c3c3611d2c48aac6d6aa0bc9603f14a Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Sun, 8 Dec 2024 22:52:26 +0000 Subject: [PATCH 03/20] address review comments --- recipe/meta.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b07b15b..48e0907 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,23 +1,22 @@ -{% set name = "scipy-stubs" %} {% set version = "1.14.1.5" %} -{% set scipy_version = version.split('.')[:3] | join('.') %} +{% set scipy_version = version.rsplit('.', 1)[0] %} {% set python_min = "3.10" %} package: - name: {{ name|lower }} + name: scipy-stubs-split version: {{ version }} -source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/scipy_stubs-{{ version }}.tar.gz - sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 - build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation number: 0 outputs: - name: scipy-stubs + source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/scipy_stubs-{{ version }}.tar.gz + sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 + build: + noarch: python + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation requirements: host: - python {{ python_min }} @@ -36,12 +35,15 @@ outputs: - pip - name: scipy-typed + build: + noarch: python requirements: host: - python run: - python - scipy =={{ scipy_version }} + - {{ pin_subpackage('scipy-stubs', exact=True) }} test: requires: - basedmypy @@ -71,3 +73,4 @@ extra: recipe-maintainers: - lucascolley - jorenham + feedstock-name: scipy-stubs From 1291b5c5a24af01729d347b2ac037b5cadd37da1 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 00:26:22 +0000 Subject: [PATCH 04/20] wip --- recipe/meta.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 48e0907..5fa5402 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -6,14 +6,19 @@ package: name: scipy-stubs-split version: {{ version }} +source: + url: https://pypi.org/packages/source/s/scipy-stubs/scipy_stubs-{{ version }}.tar.gz + sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 + build: number: 0 +requirements: + build: + - python + outputs: - name: scipy-stubs - source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/scipy_stubs-{{ version }}.tar.gz - sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 build: noarch: python script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation From b4cdf8a1d6dd063c7b8535edf7932ec2b0f576d2 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 00:46:43 +0000 Subject: [PATCH 05/20] patch in mypyignore --- recipe/meta.yaml | 2 + recipe/mypyignore.patch | 229 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 recipe/mypyignore.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5fa5402..b7d7617 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -9,6 +9,8 @@ package: source: url: https://pypi.org/packages/source/s/scipy-stubs/scipy_stubs-{{ version }}.tar.gz sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 + patches: + - mypyignore.patch build: number: 0 diff --git a/recipe/mypyignore.patch b/recipe/mypyignore.patch new file mode 100644 index 0000000..6612060 --- /dev/null +++ b/recipe/mypyignore.patch @@ -0,0 +1,229 @@ +diff --git a/.mypyignore b/.mypyignore +new file mode 100644 +index 0000000..baafce2 +--- /dev/null ++++ b/.mypyignore +@@ -0,0 +1,223 @@ ++# typecheck-only helper types ++scipy\.(\w+\.)?_typing ++ ++# git submodules ++scipy\._lib\.(array_api_compat|cobyqa).* ++ ++# private bundled pypocketfft library ++scipy\.fft\._pocketfft\..* ++ ++# internal scipy testing code ++scipy\.conftest ++scipy\.((_|\w)+\.)+(__test__|test|tests(\..+)?) ++ ++# accidental implicit exports of internal scipy machinery ++scipy\._lib\.decorator\.(DEF|ArgSpec|FunctionMaker|__init__|append|dispatch_on|get_init|getargspec|init|n_args) ++scipy\.special\._precompute\..* ++scipy\.special\.libsf_error_state ++scipy\.stats\._rcont.rcont ++ ++# omitted methods that always return `NotImplemented` or always raise ++scipy\.sparse\._(\w+)\._(\w+)\.__(iadd|idiv|imul|isub|itruediv|len|rdiv|rtruediv)__ ++ ++# workarounds for mypy bugs ++scipy\._lib\._array_api\.(Array|ArrayLike) # these exist, but in `if TYPE_CHECKING: ...` ++scipy\._lib\._ccallback\.PyCFuncPtr # this exists, but under `if TYPE_CHECKING: ...` ++scipy\.signal\._short_time_fft\.(FFT_MODE_TYPE|PAD_TYPE) # `Literal[...] != def (*, **)` ++scipy\.(_lib|integrate|stats)\.((_|\w)+\.)+__replace__ # `NamedTuple` on `python >= 3.13` ++ ++# stubtest doesn't understand `if sys.version_info >= _: ...` blocks ++scipy\.fftpack\.helper\.fftfreq ++scipy\.sparse\.(\w+)\.warn ++ ++# mypy fails recognize type-check-only ufunc subtypes as ufuncs ++# https://github.com/KotlinIsland/basedmypy/issues/816 ++scipy\.special\._basic\.digamma ++scipy\.special\._ufuncs\..* ++scipy\.special\._support_alternative_backends\..* ++scipy\.stats\._qmvnt\.(phi|phinv) ++ ++# https://github.com/KotlinIsland/basedmypy/issues/815 ++scipy.special.agm ++scipy.special.bdtr ++scipy.special.bdtrc ++scipy.special.bdtri ++scipy.special.bdtrik ++scipy.special.bdtrin ++scipy.special.bei ++scipy.special.beip ++scipy.special.ber ++scipy.special.berp ++scipy.special.besselpoly ++scipy.special.beta ++scipy.special.betainc ++scipy.special.betaincc ++scipy.special.betainccinv ++scipy.special.betaincinv ++scipy.special.betaln ++scipy.special.binom ++scipy.special.boxcox ++scipy.special.boxcox1p ++scipy.special.btdtria ++scipy.special.btdtrib ++scipy.special.cbrt ++scipy.special.chdtr ++scipy.special.chdtrc ++scipy.special.chdtri ++scipy.special.chdtriv ++scipy.special.chndtr ++scipy.special.chndtridf ++scipy.special.chndtrinc ++scipy.special.chndtrix ++scipy.special.cosdg ++scipy.special.cosm1 ++scipy.special.cotdg ++scipy.special.dawsn ++scipy.special.digamma ++scipy.special.ellipe ++scipy.special.ellipeinc ++scipy.special.ellipk ++scipy.special.ellipkinc ++scipy.special.ellipkm1 ++scipy.special.elliprc ++scipy.special.entr ++scipy.special.erf ++scipy.special.erfc ++scipy.special.erfcinv ++scipy.special.erfcx ++scipy.special.erfi ++scipy.special.erfinv ++scipy.special.eval_chebyc ++scipy.special.eval_chebys ++scipy.special.eval_chebyt ++scipy.special.eval_chebyu ++scipy.special.eval_hermite ++scipy.special.eval_hermitenorm ++scipy.special.eval_laguerre ++scipy.special.eval_legendre ++scipy.special.eval_sh_chebyt ++scipy.special.eval_sh_chebyu ++scipy.special.eval_sh_legendre ++scipy.special.exp1 ++scipy.special.exp10 ++scipy.special.exp2 ++scipy.special.expi ++scipy.special.expit ++scipy.special.expm1 ++scipy.special.expn ++scipy.special.exprel ++scipy.special.fdtr ++scipy.special.fdtrc ++scipy.special.fdtri ++scipy.special.fdtridfd ++scipy.special.gamma ++scipy.special.gammainc ++scipy.special.gammaincc ++scipy.special.gammainccinv ++scipy.special.gammaincinv ++scipy.special.gammaln ++scipy.special.gammasgn ++scipy.special.gdtr ++scipy.special.gdtrc ++scipy.special.gdtria ++scipy.special.gdtrib ++scipy.special.gdtrix ++scipy.special.huber ++scipy.special.hyp0f1 ++scipy.special.hyperu ++scipy.special.i0 ++scipy.special.i0e ++scipy.special.i1 ++scipy.special.i1e ++scipy.special.inv_boxcox ++scipy.special.inv_boxcox1p ++scipy.special.it2struve0 ++scipy.special.itmodstruve0 ++scipy.special.itstruve0 ++scipy.special.iv ++scipy.special.ive ++scipy.special.j0 ++scipy.special.j1 ++scipy.special.jn ++scipy.special.jv ++scipy.special.jve ++scipy.special.k0 ++scipy.special.k0e ++scipy.special.k1 ++scipy.special.k1e ++scipy.special.kei ++scipy.special.keip ++scipy.special.ker ++scipy.special.kerp ++scipy.special.kl_div ++scipy.special.kn ++scipy.special.kolmogi ++scipy.special.kolmogorov ++scipy.special.kv ++scipy.special.kve ++scipy.special.log1p ++scipy.special.log_expit ++scipy.special.log_ndtr ++scipy.special.log_wright_bessel ++scipy.special.loggamma ++scipy.special.logit ++scipy.special.lpmv ++scipy.special.mathieu_a ++scipy.special.mathieu_b ++scipy.special.modstruve ++scipy.special.nbdtr ++scipy.special.nbdtrc ++scipy.special.nbdtri ++scipy.special.nbdtrik ++scipy.special.nbdtrin ++scipy.special.ncfdtr ++scipy.special.ncfdtri ++scipy.special.ncfdtridfd ++scipy.special.ncfdtridfn ++scipy.special.ncfdtrinc ++scipy.special.nctdtr ++scipy.special.nctdtridf ++scipy.special.nctdtrinc ++scipy.special.nctdtrit ++scipy.special.ndtr ++scipy.special.ndtri ++scipy.special.ndtri_exp ++scipy.special.nrdtrimn ++scipy.special.nrdtrisd ++scipy.special.obl_cv ++scipy.special.owens_t ++scipy.special.pdtr ++scipy.special.pdtrc ++scipy.special.pdtri ++scipy.special.pdtrik ++scipy.special.poch ++scipy.special.powm1 ++scipy.special.pro_cv ++scipy.special.pseudo_huber ++scipy.special.psi ++scipy.special.radian ++scipy.special.rel_entr ++scipy.special.rgamma ++scipy.special.round ++scipy.special.sindg ++scipy.special.smirnov ++scipy.special.smirnovi ++scipy.special.spence ++scipy.special.stdtr ++scipy.special.stdtridf ++scipy.special.stdtrit ++scipy.special.struve ++scipy.special.tandg ++scipy.special.tklmbda ++scipy.special.voigt_profile ++scipy.special.wofz ++scipy.special.wright_bessel ++scipy.special.wrightomega ++scipy.special.xlog1py ++scipy.special.xlogy ++scipy.special.y0 ++scipy.special.y1 ++scipy.special.yn ++scipy.special.yv ++scipy.special.yve ++scipy.special.zetac From 6065d081c881f6a05bea7138778e1308eb6727f7 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 01:10:46 +0000 Subject: [PATCH 06/20] add build script? --- recipe/build-output.sh | 3 +++ recipe/meta.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 recipe/build-output.sh diff --git a/recipe/build-output.sh b/recipe/build-output.sh new file mode 100644 index 0000000..da34873 --- /dev/null +++ b/recipe/build-output.sh @@ -0,0 +1,3 @@ +#!/bin/bash +pip install . -vv --no-deps --no-build-isolation +cp .mypyignore $SP_DIR diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b7d7617..d7387e2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -23,7 +23,7 @@ outputs: - name: scipy-stubs build: noarch: python - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + script: build-output.sh requirements: host: - python {{ python_min }} From 1e4933cacb901ada381f703e8b94f57698fc9149 Mon Sep 17 00:00:00 2001 From: h-vetinari Date: Mon, 9 Dec 2024 07:52:02 +0100 Subject: [PATCH 07/20] move `script:` one level up --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d7387e2..c50a322 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -21,9 +21,9 @@ requirements: outputs: - name: scipy-stubs + script: build-output.sh build: noarch: python - script: build-output.sh requirements: host: - python {{ python_min }} From 9c03f21f955bcf4274767ab1309c623007576ec6 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 15:32:52 +0000 Subject: [PATCH 08/20] use git_url for now --- recipe/meta.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c50a322..0e98627 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,13 +7,12 @@ package: version: {{ version }} source: - url: https://pypi.org/packages/source/s/scipy-stubs/scipy_stubs-{{ version }}.tar.gz - sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 - patches: - - mypyignore.patch +# url: https://pypi.org/packages/source/s/scipy-stubs/scipy_stubs-{{ version }}.tar.gz +# sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 + git_url: https://github.com/jorenham/scipy-stubs.git build: - number: 0 + number: 1 requirements: build: From bc59986151adaf91cf89038d4d7d7e1c5dea6901 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:48:17 +0000 Subject: [PATCH 09/20] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.44.9, and conda-forge-pinning 2024.12.09.13.38.16 --- .azure-pipelines/azure-pipelines-linux.yml | 16 ++++++- .../linux_64_python3.10.____cpython.yaml | 16 +++++++ .../linux_64_python3.11.____cpython.yaml | 16 +++++++ .../linux_64_python3.12.____cpython.yaml | 16 +++++++ ...ml => linux_64_python3.9.____cpython.yaml} | 6 +++ README.md | 47 +++++++++++++++++-- 6 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 .ci_support/linux_64_python3.10.____cpython.yaml create mode 100644 .ci_support/linux_64_python3.11.____cpython.yaml create mode 100644 .ci_support/linux_64_python3.12.____cpython.yaml rename .ci_support/{linux_64_.yaml => linux_64_python3.9.____cpython.yaml} (65%) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 1741648..9625264 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,8 +8,20 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_: - CONFIG: linux_64_ + linux_64_python3.10.____cpython: + CONFIG: linux_64_python3.10.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + linux_64_python3.11.____cpython: + CONFIG: linux_64_python3.11.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + linux_64_python3.12.____cpython: + CONFIG: linux_64_python3.12.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 + linux_64_python3.9.____cpython: + CONFIG: linux_64_python3.9.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 timeoutInMinutes: 360 diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml new file mode 100644 index 0000000..6e553bc --- /dev/null +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -0,0 +1,16 @@ +cdt_name: +- conda +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma9 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.10.* *_cpython +python_min: +- '3.9' diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml new file mode 100644 index 0000000..ff2e1f4 --- /dev/null +++ b/.ci_support/linux_64_python3.11.____cpython.yaml @@ -0,0 +1,16 @@ +cdt_name: +- conda +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma9 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.11.* *_cpython +python_min: +- '3.9' diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml new file mode 100644 index 0000000..493b486 --- /dev/null +++ b/.ci_support/linux_64_python3.12.____cpython.yaml @@ -0,0 +1,16 @@ +cdt_name: +- conda +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma9 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.12.* *_cpython +python_min: +- '3.9' diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml similarity index 65% rename from .ci_support/linux_64_.yaml rename to .ci_support/linux_64_python3.9.____cpython.yaml index 9964e05..eeeeeaf 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -6,5 +6,11 @@ channel_targets: - conda-forge main docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.9.* *_cpython python_min: - '3.9' diff --git a/README.md b/README.md index b04494d..0112edd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,46 @@ About scipy-stubs-feedstock Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/scipy-stubs-feedstock/blob/main/LICENSE.txt) + +About scipy-stubs +----------------- + +Home: https://github.com/jorenham/scipy-stubs/ + +Package license: BSD-3-Clause + +Summary: Precise type hints for all of SciPy. + +Development: https://github.com/jorenham/scipy-stubs/ + +Documentation: https://github.com/jorenham/scipy-stubs?tab=readme-ov-file#scipy-stubs + +Stubs package providing type annotations and static type checking support for SciPy, +enabling improved type inference and static analysis for scientific computing and +numerical programming in modern Python. + + +About scipy-stubs +----------------- + +Home: https://github.com/jorenham/scipy-stubs/ + +Package license: BSD-3-Clause + +Summary: Precise type hints for all of SciPy. + +Development: https://github.com/jorenham/scipy-stubs/ + +Documentation: https://github.com/jorenham/scipy-stubs?tab=readme-ov-file#scipy-stubs + +Stubs package providing type annotations and static type checking support for SciPy, +enabling improved type inference and static analysis for scientific computing and +numerical programming in modern Python. + + +About scipy-typed +----------------- + Home: https://github.com/jorenham/scipy-stubs/ Package license: BSD-3-Clause @@ -37,6 +77,7 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-scipy--stubs-green.svg)](https://anaconda.org/conda-forge/scipy-stubs) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/scipy-stubs.svg)](https://anaconda.org/conda-forge/scipy-stubs) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/scipy-stubs.svg)](https://anaconda.org/conda-forge/scipy-stubs) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/scipy-stubs.svg)](https://anaconda.org/conda-forge/scipy-stubs) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-scipy--typed-green.svg)](https://anaconda.org/conda-forge/scipy-typed) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/scipy-typed.svg)](https://anaconda.org/conda-forge/scipy-typed) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/scipy-typed.svg)](https://anaconda.org/conda-forge/scipy-typed) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/scipy-typed.svg)](https://anaconda.org/conda-forge/scipy-typed) | Installing scipy-stubs ====================== @@ -48,16 +89,16 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `scipy-stubs` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `scipy-stubs, scipy-typed` can be installed with `conda`: ``` -conda install scipy-stubs +conda install scipy-stubs scipy-typed ``` or with `mamba`: ``` -mamba install scipy-stubs +mamba install scipy-stubs scipy-typed ``` It is possible to list all of the versions of `scipy-stubs` available on your platform with `conda`: From 834d7a58245097af3bd60756aff3b0eaf6e11d4d Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 15:57:30 +0000 Subject: [PATCH 10/20] remove global build reqs --- recipe/meta.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0e98627..52b2215 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,10 +14,6 @@ source: build: number: 1 -requirements: - build: - - python - outputs: - name: scipy-stubs script: build-output.sh From b129300210e40d35e5c91f99ac88325af79cd4cc Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 16:00:48 +0000 Subject: [PATCH 11/20] use url --- recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 52b2215..181dcd1 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,9 +7,8 @@ package: version: {{ version }} source: -# url: https://pypi.org/packages/source/s/scipy-stubs/scipy_stubs-{{ version }}.tar.gz -# sha256: 66c160c6b72b1406edc7827879ef25ea81dc3d95ab7e4af3a2de836f27c26ce6 - git_url: https://github.com/jorenham/scipy-stubs.git + url: https://github.com/jorenham/scipy-stubs/archive/refs/tags/v{{ version }}.tar.gz + sha256: 5aa72086417dd56fd1835f4fda9635f3d953b46bcfbce71899b4b130469f2797 build: number: 1 From 434bd758024e8598a1f5753f411ed356ecaead92 Mon Sep 17 00:00:00 2001 From: h-vetinari Date: Mon, 9 Dec 2024 17:55:28 +0100 Subject: [PATCH 12/20] Update expected sha256 --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 181dcd1..d641954 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,7 +8,7 @@ package: source: url: https://github.com/jorenham/scipy-stubs/archive/refs/tags/v{{ version }}.tar.gz - sha256: 5aa72086417dd56fd1835f4fda9635f3d953b46bcfbce71899b4b130469f2797 + sha256: 99c6b552fc68be479381bc8e9980f286f31ce919ce1d0653c422872556f8e363 build: number: 1 From 41f6a992f89f2376a49f3961bbdfbf2ce0f9078f Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:03:53 +0000 Subject: [PATCH 13/20] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.44.9, and conda-forge-pinning 2024.12.09.15.44.59 --- .azure-pipelines/azure-pipelines-linux.yml | 16 ++-------------- ...ython3.10.____cpython.yaml => linux_64_.yaml} | 3 +++ .ci_support/linux_64_python3.11.____cpython.yaml | 16 ---------------- .ci_support/linux_64_python3.12.____cpython.yaml | 16 ---------------- .ci_support/linux_64_python3.9.____cpython.yaml | 16 ---------------- 5 files changed, 5 insertions(+), 62 deletions(-) rename .ci_support/{linux_64_python3.10.____cpython.yaml => linux_64_.yaml} (81%) delete mode 100644 .ci_support/linux_64_python3.11.____cpython.yaml delete mode 100644 .ci_support/linux_64_python3.12.____cpython.yaml delete mode 100644 .ci_support/linux_64_python3.9.____cpython.yaml diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 9625264..1741648 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,20 +8,8 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_python3.10.____cpython: - CONFIG: linux_64_python3.10.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.12.____cpython: - CONFIG: linux_64_python3.12.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_64_python3.9.____cpython: - CONFIG: linux_64_python3.9.____cpython + linux_64_: + CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 timeoutInMinutes: 360 diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_.yaml similarity index 81% rename from .ci_support/linux_64_python3.10.____cpython.yaml rename to .ci_support/linux_64_.yaml index 6e553bc..0298f5e 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_.yaml @@ -12,5 +12,8 @@ pin_run_as_build: max_pin: x.x python: - 3.10.* *_cpython +- 3.11.* *_cpython +- 3.12.* *_cpython +- 3.9.* *_cpython python_min: - '3.9' diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_python3.11.____cpython.yaml deleted file mode 100644 index ff2e1f4..0000000 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ /dev/null @@ -1,16 +0,0 @@ -cdt_name: -- conda -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.11.* *_cpython -python_min: -- '3.9' diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_python3.12.____cpython.yaml deleted file mode 100644 index 493b486..0000000 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ /dev/null @@ -1,16 +0,0 @@ -cdt_name: -- conda -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.12.* *_cpython -python_min: -- '3.9' diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml deleted file mode 100644 index eeeeeaf..0000000 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ /dev/null @@ -1,16 +0,0 @@ -cdt_name: -- conda -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.9.* *_cpython -python_min: -- '3.9' From 9700da933f7a02e6c6f4d6d62634beec12634cef Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 9 Dec 2024 17:08:41 +0000 Subject: [PATCH 14/20] address review comments --- recipe/build-output.sh | 3 - recipe/meta.yaml | 2 +- recipe/mypyignore.patch | 229 ---------------------------------------- 3 files changed, 1 insertion(+), 233 deletions(-) delete mode 100644 recipe/build-output.sh delete mode 100644 recipe/mypyignore.patch diff --git a/recipe/build-output.sh b/recipe/build-output.sh deleted file mode 100644 index da34873..0000000 --- a/recipe/build-output.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -pip install . -vv --no-deps --no-build-isolation -cp .mypyignore $SP_DIR diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d641954..f106c19 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,7 +15,7 @@ build: outputs: - name: scipy-stubs - script: build-output.sh + script: pip install . -vv --no-deps --no-build-isolation build: noarch: python requirements: diff --git a/recipe/mypyignore.patch b/recipe/mypyignore.patch deleted file mode 100644 index 6612060..0000000 --- a/recipe/mypyignore.patch +++ /dev/null @@ -1,229 +0,0 @@ -diff --git a/.mypyignore b/.mypyignore -new file mode 100644 -index 0000000..baafce2 ---- /dev/null -+++ b/.mypyignore -@@ -0,0 +1,223 @@ -+# typecheck-only helper types -+scipy\.(\w+\.)?_typing -+ -+# git submodules -+scipy\._lib\.(array_api_compat|cobyqa).* -+ -+# private bundled pypocketfft library -+scipy\.fft\._pocketfft\..* -+ -+# internal scipy testing code -+scipy\.conftest -+scipy\.((_|\w)+\.)+(__test__|test|tests(\..+)?) -+ -+# accidental implicit exports of internal scipy machinery -+scipy\._lib\.decorator\.(DEF|ArgSpec|FunctionMaker|__init__|append|dispatch_on|get_init|getargspec|init|n_args) -+scipy\.special\._precompute\..* -+scipy\.special\.libsf_error_state -+scipy\.stats\._rcont.rcont -+ -+# omitted methods that always return `NotImplemented` or always raise -+scipy\.sparse\._(\w+)\._(\w+)\.__(iadd|idiv|imul|isub|itruediv|len|rdiv|rtruediv)__ -+ -+# workarounds for mypy bugs -+scipy\._lib\._array_api\.(Array|ArrayLike) # these exist, but in `if TYPE_CHECKING: ...` -+scipy\._lib\._ccallback\.PyCFuncPtr # this exists, but under `if TYPE_CHECKING: ...` -+scipy\.signal\._short_time_fft\.(FFT_MODE_TYPE|PAD_TYPE) # `Literal[...] != def (*, **)` -+scipy\.(_lib|integrate|stats)\.((_|\w)+\.)+__replace__ # `NamedTuple` on `python >= 3.13` -+ -+# stubtest doesn't understand `if sys.version_info >= _: ...` blocks -+scipy\.fftpack\.helper\.fftfreq -+scipy\.sparse\.(\w+)\.warn -+ -+# mypy fails recognize type-check-only ufunc subtypes as ufuncs -+# https://github.com/KotlinIsland/basedmypy/issues/816 -+scipy\.special\._basic\.digamma -+scipy\.special\._ufuncs\..* -+scipy\.special\._support_alternative_backends\..* -+scipy\.stats\._qmvnt\.(phi|phinv) -+ -+# https://github.com/KotlinIsland/basedmypy/issues/815 -+scipy.special.agm -+scipy.special.bdtr -+scipy.special.bdtrc -+scipy.special.bdtri -+scipy.special.bdtrik -+scipy.special.bdtrin -+scipy.special.bei -+scipy.special.beip -+scipy.special.ber -+scipy.special.berp -+scipy.special.besselpoly -+scipy.special.beta -+scipy.special.betainc -+scipy.special.betaincc -+scipy.special.betainccinv -+scipy.special.betaincinv -+scipy.special.betaln -+scipy.special.binom -+scipy.special.boxcox -+scipy.special.boxcox1p -+scipy.special.btdtria -+scipy.special.btdtrib -+scipy.special.cbrt -+scipy.special.chdtr -+scipy.special.chdtrc -+scipy.special.chdtri -+scipy.special.chdtriv -+scipy.special.chndtr -+scipy.special.chndtridf -+scipy.special.chndtrinc -+scipy.special.chndtrix -+scipy.special.cosdg -+scipy.special.cosm1 -+scipy.special.cotdg -+scipy.special.dawsn -+scipy.special.digamma -+scipy.special.ellipe -+scipy.special.ellipeinc -+scipy.special.ellipk -+scipy.special.ellipkinc -+scipy.special.ellipkm1 -+scipy.special.elliprc -+scipy.special.entr -+scipy.special.erf -+scipy.special.erfc -+scipy.special.erfcinv -+scipy.special.erfcx -+scipy.special.erfi -+scipy.special.erfinv -+scipy.special.eval_chebyc -+scipy.special.eval_chebys -+scipy.special.eval_chebyt -+scipy.special.eval_chebyu -+scipy.special.eval_hermite -+scipy.special.eval_hermitenorm -+scipy.special.eval_laguerre -+scipy.special.eval_legendre -+scipy.special.eval_sh_chebyt -+scipy.special.eval_sh_chebyu -+scipy.special.eval_sh_legendre -+scipy.special.exp1 -+scipy.special.exp10 -+scipy.special.exp2 -+scipy.special.expi -+scipy.special.expit -+scipy.special.expm1 -+scipy.special.expn -+scipy.special.exprel -+scipy.special.fdtr -+scipy.special.fdtrc -+scipy.special.fdtri -+scipy.special.fdtridfd -+scipy.special.gamma -+scipy.special.gammainc -+scipy.special.gammaincc -+scipy.special.gammainccinv -+scipy.special.gammaincinv -+scipy.special.gammaln -+scipy.special.gammasgn -+scipy.special.gdtr -+scipy.special.gdtrc -+scipy.special.gdtria -+scipy.special.gdtrib -+scipy.special.gdtrix -+scipy.special.huber -+scipy.special.hyp0f1 -+scipy.special.hyperu -+scipy.special.i0 -+scipy.special.i0e -+scipy.special.i1 -+scipy.special.i1e -+scipy.special.inv_boxcox -+scipy.special.inv_boxcox1p -+scipy.special.it2struve0 -+scipy.special.itmodstruve0 -+scipy.special.itstruve0 -+scipy.special.iv -+scipy.special.ive -+scipy.special.j0 -+scipy.special.j1 -+scipy.special.jn -+scipy.special.jv -+scipy.special.jve -+scipy.special.k0 -+scipy.special.k0e -+scipy.special.k1 -+scipy.special.k1e -+scipy.special.kei -+scipy.special.keip -+scipy.special.ker -+scipy.special.kerp -+scipy.special.kl_div -+scipy.special.kn -+scipy.special.kolmogi -+scipy.special.kolmogorov -+scipy.special.kv -+scipy.special.kve -+scipy.special.log1p -+scipy.special.log_expit -+scipy.special.log_ndtr -+scipy.special.log_wright_bessel -+scipy.special.loggamma -+scipy.special.logit -+scipy.special.lpmv -+scipy.special.mathieu_a -+scipy.special.mathieu_b -+scipy.special.modstruve -+scipy.special.nbdtr -+scipy.special.nbdtrc -+scipy.special.nbdtri -+scipy.special.nbdtrik -+scipy.special.nbdtrin -+scipy.special.ncfdtr -+scipy.special.ncfdtri -+scipy.special.ncfdtridfd -+scipy.special.ncfdtridfn -+scipy.special.ncfdtrinc -+scipy.special.nctdtr -+scipy.special.nctdtridf -+scipy.special.nctdtrinc -+scipy.special.nctdtrit -+scipy.special.ndtr -+scipy.special.ndtri -+scipy.special.ndtri_exp -+scipy.special.nrdtrimn -+scipy.special.nrdtrisd -+scipy.special.obl_cv -+scipy.special.owens_t -+scipy.special.pdtr -+scipy.special.pdtrc -+scipy.special.pdtri -+scipy.special.pdtrik -+scipy.special.poch -+scipy.special.powm1 -+scipy.special.pro_cv -+scipy.special.pseudo_huber -+scipy.special.psi -+scipy.special.radian -+scipy.special.rel_entr -+scipy.special.rgamma -+scipy.special.round -+scipy.special.sindg -+scipy.special.smirnov -+scipy.special.smirnovi -+scipy.special.spence -+scipy.special.stdtr -+scipy.special.stdtridf -+scipy.special.stdtrit -+scipy.special.struve -+scipy.special.tandg -+scipy.special.tklmbda -+scipy.special.voigt_profile -+scipy.special.wofz -+scipy.special.wright_bessel -+scipy.special.wrightomega -+scipy.special.xlog1py -+scipy.special.xlogy -+scipy.special.y0 -+scipy.special.y1 -+scipy.special.yn -+scipy.special.yv -+scipy.special.yve -+scipy.special.zetac From 1312db59fd2a5849a862c87dfb9f1b63fd0567a6 Mon Sep 17 00:00:00 2001 From: h-vetinari Date: Mon, 9 Dec 2024 18:22:32 +0100 Subject: [PATCH 15/20] move `script:` under `build:` again (now that it's an invocation, not a filename) --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f106c19..a1b1ee9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -15,9 +15,9 @@ build: outputs: - name: scipy-stubs - script: pip install . -vv --no-deps --no-build-isolation build: noarch: python + script: pip install . -vv --no-deps --no-build-isolation requirements: host: - python {{ python_min }} From f2d1bca0171e3fbdbbb338bea93d58f5ce76f721 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Sun, 15 Dec 2024 23:55:00 +0000 Subject: [PATCH 16/20] add `.mypyignore-extra` --- recipe/.mypyignore-extra | 0 recipe/meta.yaml | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 recipe/.mypyignore-extra diff --git a/recipe/.mypyignore-extra b/recipe/.mypyignore-extra new file mode 100644 index 0000000..e69de29 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d2125f2..0dabe02 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -50,11 +50,13 @@ outputs: - basedmypy imports: - scipy + files: + - .mypyignore-extra source_files: - pyproject.toml - .mypyignore commands: - - stubtest --mypy-config-file=pyproject.toml --allowlist=.mypyignore --ignore-unused-allowlist scipy + - stubtest --mypy-config-file=pyproject.toml --allowlist=.mypyignore --allowlist=.mypyignore-extra --ignore-unused-allowlist scipy about: home: https://github.com/jorenham/scipy-stubs/ From 0f60173aa1e5e035bdafa8fd7014df572cd5a476 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Sun, 15 Dec 2024 23:57:44 +0000 Subject: [PATCH 17/20] not an empty file... --- recipe/.mypyignore-extra | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/.mypyignore-extra b/recipe/.mypyignore-extra index e69de29..534ebb3 100644 --- a/recipe/.mypyignore-extra +++ b/recipe/.mypyignore-extra @@ -0,0 +1 @@ +scipy\._lib\.test_conda_forge_packaging From 3767302957324c05fb52f03521ad64a5274ebeec Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 16 Dec 2024 12:10:01 +0000 Subject: [PATCH 18/20] cfep-25 --- recipe/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0dabe02..34d961f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -40,9 +40,9 @@ outputs: noarch: python requirements: host: - - python + - python {{ python_min }} run: - - python + - python >={{ python_min }},<4.0.0 - scipy =={{ scipy_version }} - {{ pin_subpackage('scipy-stubs', exact=True) }} test: From 929567141f9613f92261bca95a65d1a8889c359f Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:12:19 +0000 Subject: [PATCH 19/20] MNT: Re-rendered with conda-build 24.11.2, conda-smithy 3.45.0, and conda-forge-pinning 2024.12.15.16.05.58 --- .ci_support/linux_64_.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 0298f5e..9964e05 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -6,14 +6,5 @@ channel_targets: - conda-forge main docker_image: - quay.io/condaforge/linux-anvil-x86_64:alma9 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.10.* *_cpython -- 3.11.* *_cpython -- 3.12.* *_cpython -- 3.9.* *_cpython python_min: - '3.9' From 14a891ac1252955fa17d154fe18752732fb87c47 Mon Sep 17 00:00:00 2001 From: Lucas Colley Date: Mon, 16 Dec 2024 12:49:22 +0000 Subject: [PATCH 20/20] add python test requirement --- recipe/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 34d961f..59e7fb2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -47,6 +47,7 @@ outputs: - {{ pin_subpackage('scipy-stubs', exact=True) }} test: requires: + - python {{ python_min }} - basedmypy imports: - scipy