diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 3be3142..458c0e7 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -1,36 +1,26 @@ -name: Run Unit Tests +tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + name: Check Python ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Only needed if using setuptools-scm -on: - push: - branches: - - main - pull_request: - branches: - - main + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true -jobs: - test: - runs-on: ubuntu-latest + - name: Install package + run: python -m pip install -e .[test] - strategy: - matrix: - python-version: [3.9, 3.10, 3.11, 3.12] # Modify these versions as needed - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install ooipy - run: | - python -m pip install --upgrade pip - python -m pip install -e . - pip install pytest # Install pytest if not included in requirements - - - name: Run tests - run: | - pytest tests/ + - name: Test package + run: python -m pytest diff --git a/.gitignore b/.gitignore index 2b75fd5..1b3f15d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ ooi_auth.txt .eggs _ooipy_version.py *.nc +src/ooipy/version.py # Environments .env diff --git a/pyproject.toml b/pyproject.toml index 9970d6b..59bf3ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,6 +34,11 @@ dependencies = [ "aiohttp", ] +[project.optional-dependencies] +test = [ + "pytest >= 6.0", +] + [project.urls] Documentation = "https://ooipy.readthedocs.io" Issues = "https://github.com/Ocean-Data-Lab/ooipy/issues" diff --git a/src/ooipy/version.py b/src/ooipy/version.py deleted file mode 100644 index b3ccce4..0000000 --- a/src/ooipy/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# file generated by setuptools_scm -# don't change, don't track in version control -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import Tuple, Union - VERSION_TUPLE = Tuple[Union[int, str], ...] -else: - VERSION_TUPLE = object - -version: str -__version__: str -__version_tuple__: VERSION_TUPLE -version_tuple: VERSION_TUPLE - -__version__ = version = '1.2.1.dev43+gff1c5f8.d20241030' -__version_tuple__ = version_tuple = (1, 2, 1, 'dev43', 'gff1c5f8.d20241030')