diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a966471..249af8a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,9 +16,9 @@ jobs: name: steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99cfc2e..def9679 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: test_config: ["latest"] include: - python-version: "3.9" - numpy_ver: "1.21" + numpy_ver: "1.23" os: ubuntu-latest test_config: "NEP29" - python-version: "3.6.8" @@ -28,9 +28,9 @@ jobs: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -69,4 +69,17 @@ jobs: - name: Publish results to coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_PARALLEL: true run: coveralls --rcfile=pyproject.toml --service=github + + finish: + name: Finish Coverage Analysis + needs: build + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pip install --upgrade coveralls + coveralls --service=github --finish diff --git a/.github/workflows/pip_rc_install.yml b/.github/workflows/pip_rc_install.yml index a72fff6..ff09596 100644 --- a/.github/workflows/pip_rc_install.yml +++ b/.github/workflows/pip_rc_install.yml @@ -17,9 +17,9 @@ jobs: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pysat_rc.yml b/.github/workflows/pysat_rc.yml index 00e16a0..f8d9015 100644 --- a/.github/workflows/pysat_rc.yml +++ b/.github/workflows/pysat_rc.yml @@ -10,25 +10,23 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10"] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.11"] name: Python ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pysat RC run: pip install --no-deps --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysat - - name: Install standard dependencies - run: | - pip install -r requirements.txt - pip install -r test_requirements.txt + - name: Install standard dependencies and package + run: pip install .[test] - name: Set up pysat run: | @@ -36,9 +34,22 @@ jobs: python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'" - name: Test with pytest - run: pytest + run: pytest -v - name: Publish results to coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_PARALLEL: true run: coveralls --rcfile=pyproject.toml --service=github + + finish: + name: Finish Coverage Analysis + needs: build + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pip install --upgrade coveralls + coveralls --service=github --finish diff --git a/CHANGELOG.md b/CHANGELOG.md index 192e083..8bb8e8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.0.5] - 202X-XX-XX +* Maintenance + * Update GitHub Actions standards + ## [0.0.4] - 2023-08-11 * Bug fixes * Update metadata transfer for COSMIC GPS diff --git a/README.md b/README.md index 759558c..5a1c029 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ pysatCDAAC uses common Python modules, as well as modules developed by and for the Space Physics community. This module officially supports Python 3.7+. -| Common modules | Community modules | -| -------------- | ----------------- | -| netCDF4 | pysat>=3.0.4 | -| numpy | | -| pandas | | -| requests | | -| xarray | | +| Common modules | Community modules | +| -------------- | ------------------- | +| netCDF4 | pysat>=3.0.4,<3.2.0 | +| numpy | | +| pandas | | +| requests | | +| xarray | | # Installation diff --git a/docs/installation.rst b/docs/installation.rst index 9384557..0aa7021 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -16,15 +16,15 @@ pysatCDAAC uses common Python modules, as well as modules developed by and for the Space Physics community. This module officially supports Python 3.6+ and pysat 3.0.4+. - ================== ================= + ================== ==================== Common modules Community modules - ================== ================= - netCDF4 pysat>=3.0.4 + ================== ==================== + netCDF4 pysat>=3.0.4,<3.2.0 numpy pandas requests xarray - ================== ================= + ================== ==================== Installation Options diff --git a/pyproject.toml b/pyproject.toml index 446dbd2..45e7f45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ "netCDF4", "numpy", "pandas", - "pysat >= 3.0.4", + "pysat >= 3.0.4, <3.2.0", "requests", "xarray" ] @@ -61,7 +61,7 @@ doc = [ "numpydoc", "sphinx < 7.0", "sphinx-autoapi", - "sphinx_rtd_theme >= 1.2.2" + "sphinx_rtd_theme >= 1.2.2, <2.0.0" ] [project.urls] diff --git a/pysatCDAAC/instruments/cosmic_gps.py b/pysatCDAAC/instruments/cosmic_gps.py index f72f5b8..6c940c6 100644 --- a/pysatCDAAC/instruments/cosmic_gps.py +++ b/pysatCDAAC/instruments/cosmic_gps.py @@ -108,7 +108,10 @@ # ---------------------------------------------------------------------------- # Instrument test attributes -_test_dates = {'': {}.fromkeys(list(tags.keys()), dt.datetime(2014, 5, 1))} +_test_dates = {'': {tag: dt.datetime(2014, 5, 1) for tag in inst_ids['']}} + +# TODO(#51): Remove when compliant with multi-day load tests +_new_tests = {'': {tag: False for tag in inst_ids['']}} # ---------------------------------------------------------------------------- # Instrument methods @@ -266,7 +269,9 @@ def list_files(tag=None, inst_id=None, data_path=None, format_str=None): stored = futils.parse_fixed_width_filenames(files, format_str) # Process info - if len(stored['year']) > 0: + # Check on length for backward compat with pysat 3.1.0 + # TODO(#51): Can be removed after 3.2.0 release and minimum version is set. + if stored['year'] is not None and len(stored['year']) > 0: year = np.array(stored['year']) day = np.array(stored['day']) hour = np.array(stored['hour']) diff --git a/test_requirements.txt b/test_requirements.txt index 97d94a7..e9de40c 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -10,4 +10,4 @@ pytest-cov pytest-ordering sphinx sphinx-autoapi -sphinx_rtd_theme +sphinx_rtd_theme<2.0.0