Skip to content

Commit

Permalink
Replace pybind11-stubgen by mypy.stubgen
Browse files Browse the repository at this point in the history
pybind11-stubgen in deprecated
sizmailov/pybind11-stubgen#31

mypy.stubgen doesn't support numpy 2
python/mypy#17396
python/mypy#17538
  • Loading branch information
vlgmod committed Aug 29, 2024
1 parent 3c5aaee commit f4054a9
Show file tree
Hide file tree
Showing 5 changed files with 1,904 additions and 3,747 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ build:ubuntu-python:
- pip install -r requirements-gitlab.txt
- pip install . --config-settings="--global-option=CMAKE_TOOLCHAIN_FILE=$VCPKG_LOCAL_GIT/scripts/buildsystems/vcpkg.cmake" --config-settings="--global-option=cmake_build_type=Release" --config-settings="--global-option=vcpkg_triplet=x64-linux-release" --no-clean -v
- python -m unittest discover test/python
- pybind11-stubgen pyurx --output-dir=python
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Run pybind11-stubgen before commit."; echo "$(git status --porcelain)"; git diff; exit 1; fi
- stubgen -p pyurx -o python
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Run `stubgen -p pyurx -o python` before commit."; echo "$(git status --porcelain)"; git diff; exit 1; fi

build:windows-matlab-static:
stage: build
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
"cmake",
"cmake-build-extension",
"importlib-metadata",
"numpy",
"numpy<2",
"toml",
"parameterized"
]
Expand All @@ -16,7 +16,7 @@ name = "pyurx"
version = "0.6.26.3"
dependencies = [
"cmake-build-extension",
"numpy",
"numpy<2",
"parameterized",
"setuptools>69.0.0,<73",
"toml",
Expand Down
92 changes: 1 addition & 91 deletions python/pyurx/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,91 +1 @@
from __future__ import annotations
import cmake_build_extension as cmake_build_extension
from pyurx.bindings import GroupDataReader
from pyurx.bindings import UrxAcquisition
from pyurx.bindings import UrxAcquisition as Acquisition
from pyurx.bindings import UrxDataType as DataType
from pyurx.bindings import UrxDataType
from pyurx.bindings import UrxDataset as Dataset
from pyurx.bindings import UrxDataset
from pyurx.bindings import UrxDoubleNan
from pyurx.bindings import UrxDoubleNan as DoubleNan
from pyurx.bindings import UrxElement as Element
from pyurx.bindings import UrxElement
from pyurx.bindings import UrxElementGeometry
from pyurx.bindings import UrxElementGeometry as ElementGeometry
from pyurx.bindings import UrxEvent as Event
from pyurx.bindings import UrxEvent
from pyurx.bindings import UrxExcitation as Excitation
from pyurx.bindings import UrxExcitation
from pyurx.bindings import UrxGroup as Group
from pyurx.bindings import UrxGroup
from pyurx.bindings import UrxGroupData
from pyurx.bindings import UrxGroupData as GroupData
from pyurx.bindings import UrxImpulseResponse as ImpulseResponse
from pyurx.bindings import UrxImpulseResponse
from pyurx.bindings import UrxProbe
from pyurx.bindings import UrxProbe as Probe
from pyurx.bindings import UrxProbeType
from pyurx.bindings import UrxProbeType as ProbeType
from pyurx.bindings import UrxReceiveSetup as ReceiveSetup
from pyurx.bindings import UrxReceiveSetup
from pyurx.bindings import UrxSamplingType as SamplingType
from pyurx.bindings import UrxSamplingType
from pyurx.bindings import UrxTransform as Transform
from pyurx.bindings import UrxTransform
from pyurx.bindings import UrxTransmitSetup
from pyurx.bindings import UrxTransmitSetup as TransmitSetup
from pyurx.bindings import UrxVector2D
from pyurx.bindings import UrxVector2D as Vector2D
from pyurx.bindings import UrxVector3D
from pyurx.bindings import UrxVector3D as Vector3D
from pyurx.bindings import UrxVersion
from pyurx.bindings import UrxVersion as Version
from pyurx.bindings import UrxWave as Wave
from pyurx.bindings import UrxWave
from pyurx.bindings import UrxWaveType
from pyurx.bindings import UrxWaveType as WaveType
from pyurx.bindings import VecElement
from pyurx.bindings import VecElementGeometryPtr
from pyurx.bindings import VecEvent
from pyurx.bindings import VecExcitationPtr
from pyurx.bindings import VecFloat32
from pyurx.bindings import VecFloat64
from pyurx.bindings import VecGroupData
from pyurx.bindings import VecGroupPtr
from pyurx.bindings import VecImpulseResponsePtr
from pyurx.bindings import VecInt16
from pyurx.bindings import VecInt32
from pyurx.bindings import VecInt64
from pyurx.bindings import VecInt8
from pyurx.bindings import VecProbePtr
from pyurx.bindings import VecString
from pyurx.bindings import VecUInt16
from pyurx.bindings import VecUInt32
from pyurx.bindings import VecUInt64
from pyurx.bindings import VecUInt8
from pyurx.bindings import VecVecFloat32
from pyurx.bindings import VecVecFloat64
from pyurx.bindings import VecVecInt16
from pyurx.bindings import VecVecInt32
from pyurx.bindings import VecVecInt64
from pyurx.bindings import VecVecInt8
from pyurx.bindings import VecVecString
from pyurx.bindings import VecVecUInt16
from pyurx.bindings import VecVecUInt32
from pyurx.bindings import VecVecUInt64
from pyurx.bindings import VecVecUInt8
from pyurx.bindings import VecVector2D
from pyurx.bindings import VecVector3D
from pyurx.bindings import isIso3166
from pyurx.bindings import isIso8601
from pyurx.bindings import loadFromFile
from pyurx.bindings import pyGetFormat
from pyurx.bindings import saveToFile
from pyurx.bindings import sizeofDataType
from pyurx.bindings import sizeofSample
from . import bindings
__all__ = ['Acquisition', 'DataType', 'Dataset', 'DoubleNan', 'Element', 'ElementGeometry', 'Event', 'Excitation', 'Group', 'GroupData', 'GroupDataReader', 'ImpulseResponse', 'Probe', 'ProbeType', 'ReceiveSetup', 'SamplingType', 'Transform', 'TransmitSetup', 'URX_VERSION_MAJOR', 'URX_VERSION_MINOR', 'URX_VERSION_PATCH', 'UrxAcquisition', 'UrxDataType', 'UrxDataset', 'UrxDoubleNan', 'UrxElement', 'UrxElementGeometry', 'UrxEvent', 'UrxExcitation', 'UrxGroup', 'UrxGroupData', 'UrxImpulseResponse', 'UrxProbe', 'UrxProbeType', 'UrxReceiveSetup', 'UrxSamplingType', 'UrxTransform', 'UrxTransmitSetup', 'UrxVector2D', 'UrxVector3D', 'UrxVersion', 'UrxWave', 'UrxWaveType', 'VecElement', 'VecElementGeometryPtr', 'VecEvent', 'VecExcitationPtr', 'VecFloat32', 'VecFloat64', 'VecGroupData', 'VecGroupPtr', 'VecImpulseResponsePtr', 'VecInt16', 'VecInt32', 'VecInt64', 'VecInt8', 'VecProbePtr', 'VecString', 'VecUInt16', 'VecUInt32', 'VecUInt64', 'VecUInt8', 'VecVecFloat32', 'VecVecFloat64', 'VecVecInt16', 'VecVecInt32', 'VecVecInt64', 'VecVecInt8', 'VecVecString', 'VecVecUInt16', 'VecVecUInt32', 'VecVecUInt64', 'VecVecUInt8', 'VecVector2D', 'VecVector3D', 'Vector2D', 'Vector3D', 'Version', 'Wave', 'WaveType', 'bindings', 'cmake_build_extension', 'isIso3166', 'isIso8601', 'loadFromFile', 'pyGetFormat', 'saveToFile', 'sizeofDataType', 'sizeofSample']
URX_VERSION_MAJOR: int = 1
URX_VERSION_MINOR: int = 0
URX_VERSION_PATCH: int = 0
from .bindings import *
Loading

0 comments on commit f4054a9

Please sign in to comment.