Skip to content

Commit

Permalink
Release 6.1.4
Browse files Browse the repository at this point in the history
- Fixed TypeAlias error w/ Python 3.9.
  • Loading branch information
capn-freako committed Jun 13, 2024
1 parent b616a86 commit fd91943
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 63 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion PyAMI
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]"}
, {name = "David Patterson"}
Expand All @@ -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",
Expand Down
8 changes: 5 additions & 3 deletions src/pybert/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
72 changes: 21 additions & 51 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -74,20 +51,23 @@ commands =
black src/ tests/

[testenv:lint]
description = Run linting using `lint`.
skip_install = true
deps =
pylint
commands =
pylint --disable=E0401 src/

[testenv:flake8]
description = Run linting using `flake8`.
skip_install = true
deps =
flake8
commands =
flake8 --ignore=E501,E272,E241,E222,E221 src/

[testenv:type-check]
description = Run type checking using `mypy`.
skip_install = true
setenv =
MYPYPATH = {toxinidir}
Expand All @@ -98,6 +78,7 @@ commands =
python -m mypy type_stubs/ src/

[testenv:docs]
description = Build documentation.
skip_install = true
deps =
numpy
Expand All @@ -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 =
Expand Down

0 comments on commit fd91943

Please sign in to comment.