From fd919437c34be463a945396de5ceb2b90c8e7559 Mon Sep 17 00:00:00 2001 From: David Banas Date: Wed, 12 Jun 2024 20:41:20 -0400 Subject: [PATCH] Release 6.1.4 - Fixed TypeAlias error w/ Python 3.9. --- Makefile | 8 ++--- PyAMI | 2 +- pyproject.toml | 4 +-- src/pybert/common.py | 8 +++-- tox.ini | 72 +++++++++++++------------------------------- 5 files changed, 31 insertions(+), 63 deletions(-) diff --git a/Makefile b/Makefile index 8b00121..78232a6 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # # Copyright (c) 2015 David Banas; all rights reserved World wide. -.PHONY: dflt help check tox format lint flake8 type-check docs build install upload test clean etags conda-build conda-skeleton chaco enable pyibis-ami pyibis-ami-dev pybert pybert-dev etags +.PHONY: dflt help check tox format lint flake8 type-check docs build upload test clean etags conda-build conda-skeleton chaco enable pyibis-ami pyibis-ami-dev pybert pybert-dev etags PROJ_NAME := PipBERT PROJ_FILE := pyproject.toml @@ -28,7 +28,7 @@ ${VER_FILE}: ${PROJ_INFO} ${PYTHON_EXEC} -m ${VER_GETTER} ${PROJ_NAME} $@ tox: - TOX_SKIP_ENV="${TOX_SKIP_ENV}" ${TOX_EXEC} + TOX_SKIP_ENV="${TOX_SKIP_ENV}" ${TOX_EXEC} -m test format: ${TOX_EXEC} run -e format @@ -48,9 +48,6 @@ docs: ${VER_FILE} build: ${TOX_EXEC} run -e build -install: ${VER_FILE} - source $< && ${TOX_EXEC} run -e install - upload: ${VER_FILE} source $< && ${TOX_EXEC} run -e upload @@ -113,7 +110,6 @@ help: @echo "\t\tTo view the resultant API documentation, open 'docs/build/index.html' in a browser." @echo "\tbuild: Run Tox 'build' environment." @echo "\t\tBuilds source tarball and wheel, for installing or uploading to PyPi." - @echo "\tinstall: Run Tox 'install' environment." @echo "\t\tTests installation before uploading to PyPi." @echo "\tupload: Run Tox 'upload' environment." @echo "\t\tUploads source tarball and wheel to PyPi." diff --git a/PyAMI b/PyAMI index d589148..374c8f3 160000 --- a/PyAMI +++ b/PyAMI @@ -1 +1 @@ -Subproject commit d5891484d042a61cb2885fe3ea5458be01adaab7 +Subproject commit 374c8f35afe2e9a008bdcf7c5cd44f72b894b867 diff --git a/pyproject.toml b/pyproject.toml index 21044b7..8fa1dd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "PipBERT" description = "Serial communication link bit error rate tester simulator, written in Python." -version = "6.1.3" +version = "6.1.4" # dynamic = ["version"] authors = [ {name = "David Banas", email = "capn.freako@gmail.com"} , {name = "David Patterson"} @@ -16,7 +16,7 @@ requires-python = ">=3.9,<3.13" license = {text = "BSD"} dependencies = [ "kiwisolver", - "PyIBIS-AMI>=6", + "PyIBIS-AMI>=6.1.1", "pyside6<6.7", "pyyaml>=6", "scikit-rf>=0.29", diff --git a/src/pybert/common.py b/src/pybert/common.py index 22705ed..93b4cf0 100644 --- a/src/pybert/common.py +++ b/src/pybert/common.py @@ -8,14 +8,16 @@ Copyright (c) 2024 David Banas; all rights reserved World wide. """ -from typing import Any, Optional, TypeVar, TypeAlias # pylint: disable=unused-import # noqa: F401 +from typing import Any, Optional, TypeVar # , TypeAlias # pylint: disable=unused-import # noqa: F401 import numpy as np # type: ignore # pylint: disable=unused-import # noqa: F401 import numpy.typing as npt # type: ignore Real = TypeVar('Real', float, float) Comp = TypeVar('Comp', complex, complex) -Rvec: TypeAlias = npt.NDArray[Real] -Cvec: TypeAlias = npt.NDArray[Comp] +# Rvec: TypeAlias = npt.NDArray[Real] +# Cvec: TypeAlias = npt.NDArray[Comp] +Rvec = npt.NDArray[Real] +Cvec = npt.NDArray[Comp] # PI: float = np.pi PI: float = 3.14159265359 diff --git a/tox.ini b/tox.ini index 3bf3dd7..a1d705e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,13 @@ [tox] -envlist = py{39, 310, 311, 312}-{lin,mac,win}, lint, format, flake8, type-check, docs, build, install, upload, dbg +envlist = + py{39, 310, 311, 312}-{lin,mac,win} + lint + format + flake8 + type-check + docs + build + upload skip_missing_interpreters = true requires = tox>=4 @@ -17,50 +25,19 @@ deps = pytest pytest-xdist pytest-cov - # -rrequirements.txt - py311-mac: ../enable/dist/enable-6.2.0.dev0-cp311-cp311-macosx_10_9_universal2.whl - py312-mac: ../enable/dist/enable-6.1.0.dev0-cp312-cp312-macosx_12_0_arm64.whl - py312-mac: ../chaco/dist/chaco-6.0.0-cp312-cp312-macosx_12_0_arm64.whl + py39-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp39-cp39-macosx_12_0_arm64.whl + py310-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp310-cp310-macosx_12_0_arm64.whl + py311-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.2.0.dev0-cp311-cp311-macosx_10_9_universal2.whl + py312-mac: enable @ https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp312-cp312-macosx_12_0_arm64.whl + py312-mac: chaco @ https://github.com/capn-freako/PyBERT/raw/master/deps/chaco-6.0.0-cp312-cp312-macosx_12_0_arm64.whl package = wheel wheel_build_env = .pkg commands = pytest --basetemp={envtmpdir} -vv --cov=pybert \ --cov-report=html --cov-report=term-missing tests -static: # Not working as expected! - skip_install = true -allowlist_externals = - rm - validate-pyproject - wget -conda_deps = - # numpy==1.23.3 # Version number required! Conda ignores `pyproject.toml`. - enable -conda_channels = - dbanas - conda-forge - defaults -conda_install_args = - --force-reinstall - --override-channels -conda_create_args = - --override-channels - -[testenv:dbg] -description = Temporary environment for debugging my Tox configuration. -deps = - ../enable/dist/enable-6.2.0.dev0-cp311-cp311-macosx_10_9_universal2.whl -commands = - mac: echo "I'm running on MacOS." - echo "All done." - -[testenv:test] -deps = - pytest - pytest-xdist -commands = - py.test --basetemp={envtmpdir} {posargs} [testenv:format] +description = Reformat all source code. deps = black isort @@ -74,6 +51,7 @@ commands = black src/ tests/ [testenv:lint] +description = Run linting using `lint`. skip_install = true deps = pylint @@ -81,6 +59,7 @@ commands = pylint --disable=E0401 src/ [testenv:flake8] +description = Run linting using `flake8`. skip_install = true deps = flake8 @@ -88,6 +67,7 @@ commands = flake8 --ignore=E501,E272,E241,E222,E221 src/ [testenv:type-check] +description = Run type checking using `mypy`. skip_install = true setenv = MYPYPATH = {toxinidir} @@ -98,6 +78,7 @@ commands = python -m mypy type_stubs/ src/ [testenv:docs] +description = Build documentation. skip_install = true deps = numpy @@ -112,26 +93,15 @@ commands = sphinx-build -j auto -b html source/ build/ [testenv:build] +description = Build source tarball and wheel for distribution. skip_install = true deps = build commands = python -m build -[testenv:install] -skip_install = true -depends = build # Not working. -deps = - check-wheel-contents - twine -commands = - twine upload --repository=testpypi dist/PipBERT-{env:PROJ_VER}-py3-none-any.whl - pip install https://github.com/capn-freako/PyBERT/raw/master/deps/enable-6.1.0.dev0-cp312-cp312-macosx_12_0_arm64.whl - pip install https://github.com/capn-freako/PyBERT/raw/master/deps/chaco-6.0.0-cp312-cp312-macosx_12_0_arm64.whl - pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ PipBERT - pybert --version - [testenv:upload] +description = Upload build products to PyPI. skip_install = true depends = build deps =