diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 4622897..2e091fa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,12 +16,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index bdaab28..cf47d11 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -33,7 +33,7 @@ jobs: - name: Build package run: python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + uses: pypa/gh-action-pypi-publish@v1.8.11 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index dc347ef..fb3f3d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lofarantpos" -version = "0.7.0" +version = "0.7.1" description = "Access, query, and manipulate LOFAR antenna positions" authors = [ {name = "Tammo Jan Dijkema", email = "dijkema@astron.nl"}, @@ -31,3 +31,7 @@ requires=[ [project.urls] Homepage = "https://github.com/lofar-astron/lofar-antenna-positions" + +[tool.pytest.ini_options] +doctest_optionflags = "ELLIPSIS" +addopts = "--doctest-modules --doctest-continue-on-failure --ignore=scripts --ignore=docs" diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 0000000..b6bd575 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,20 @@ +import doctest +import pytest +import re + + +class NumpyOutputChecker(doctest.OutputChecker): + def check_output(self, want, got, optionflags): + # Remove the np.float64 wrapper from both want and got + want = re.sub(r'np\.float64\(([\d.-]*)\)', r'\1', want) + got = re.sub(r'np\.float64\(([\d.-]*)\)', r'\1', got) + + # numpy.set_printoptions started producing output in some version + if got.strip().startswith("