From c55112f30482089edfac31b7e124e65ad2a302a1 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Sun, 28 Jan 2024 00:54:51 -0500 Subject: [PATCH] ci: also test py 3.12 --- .flake8 | 2 -- .gitattributes | 20 --------------- .github/workflows/ci.yml | 10 ++++---- .github/workflows/publish-python-package.yml | 2 +- pyproject.toml | 2 +- src/georinex/__init__.py | 26 ++++++++++++++++++++ src/georinex/tests/test_conv.py | 1 + src/georinex/tests/test_lzw.py | 1 + src/georinex/tests/test_time.py | 1 + 9 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 .gitattributes diff --git a/.flake8 b/.flake8 index dce77a3..18881da 100644 --- a/.flake8 +++ b/.flake8 @@ -2,5 +2,3 @@ max-line-length = 132 ignore = E203,W503 exclude = .git,__pycache__,.eggs/,doc/,docs/,build/,dist/,.archive/ -per-file-ignores = - __init__.py:F401 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index aafaecf..0000000 --- a/.gitattributes +++ /dev/null @@ -1,20 +0,0 @@ -.gitattributes text eol=lf -.gitignore text eol=lf -Makefile text eol=lf -*.yml text eol=lf -LICENSE text eol=lf -*.ipynb text eol=lf -*.txt text eol=lf -*.py text eol=lf -*.sh text eol=lf -*.c text eol=lf -*.cpp text eol=lf -*.f text eol=lf -*.for text eol=lf -*.f90 text eol=lf -*.md text eol=lf -*.rst text eol=lf -*.csv text eol=lf -*.m text eol=lf -*.grc text eol=lf -*.pas text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7761a34..a06af98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,20 +15,20 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest] experimental: [true] include: - os: windows-latest - python-version: "3.11" + python-version: "3.12" experimental: false - os: macos-latest - python-version: "3.11" + python-version: "3.12" experimental: false steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -42,7 +42,7 @@ jobs: - name: type annotation check timeout-minutes: 10 if: runner.os == 'Linux' - run: mypy + run: mypy --install-types --non-interactive - run: pytest timeout-minutes: 7 diff --git a/.github/workflows/publish-python-package.yml b/.github/workflows/publish-python-package.yml index 04e4f7f..21dda3e 100644 --- a/.github/workflows/publish-python-package.yml +++ b/.github/workflows/publish-python-package.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' diff --git a/pyproject.toml b/pyproject.toml index 9ace551..fbcd71d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ version = {attr = "georinex.__version__"} [project.optional-dependencies] tests = ["pytest", "pytest-timeout"] -lint = ["flake8", "flake8-bugbear", "flake8-builtins", "flake8-blind-except", "mypy", "types-python-dateutil"] +lint = ["flake8", "flake8-bugbear", "flake8-builtins", "flake8-blind-except", "mypy"] plot = ["matplotlib", "seaborn", "pymap3d", "cartopy"] io = ["psutil"] diff --git a/src/georinex/__init__.py b/src/georinex/__init__.py index f5710f4..a84edf9 100644 --- a/src/georinex/__init__.py +++ b/src/georinex/__init__.py @@ -9,3 +9,29 @@ from .keplerian import keplerian2ecef __version__ = "1.16.2" + +__all__ = [ + "load", + "rinexnav", + "rinexobs", + "batch_convert", + "gettime", + "rinexheader", + "globber", + "to_datetime", + "rinexinfo", + "rinexobs2", + "obsheader2", + "obstime2", + "rinexobs3", + "obsheader3", + "obstime3", + "rinexnav2", + "navheader2", + "navtime2", + "rinexnav3", + "navheader3", + "navtime3", + "load_sp3", + "keplerian2ecef", +] diff --git a/src/georinex/tests/test_conv.py b/src/georinex/tests/test_conv.py index 7c5f0ba..1969d54 100755 --- a/src/georinex/tests/test_conv.py +++ b/src/georinex/tests/test_conv.py @@ -2,6 +2,7 @@ Self-test file, registration case for OBS RINEX reader """ + import pytest import xarray from datetime import datetime diff --git a/src/georinex/tests/test_lzw.py b/src/georinex/tests/test_lzw.py index f30012c..ac110bb 100644 --- a/src/georinex/tests/test_lzw.py +++ b/src/georinex/tests/test_lzw.py @@ -1,6 +1,7 @@ """ test for LZW .Z file """ + from pathlib import Path import pytest diff --git a/src/georinex/tests/test_time.py b/src/georinex/tests/test_time.py index 4ce86df..56a49bd 100644 --- a/src/georinex/tests/test_time.py +++ b/src/georinex/tests/test_time.py @@ -1,6 +1,7 @@ """ test all files types with time limits """ + import pytest from pathlib import Path from datetime import datetime