Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: pysat 3.2.0 RC compliance #52

Merged
merged 11 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
test_config: ["latest"]
include:
- python-version: "3.9"
numpy_ver: "1.21"
numpy_ver: "1.22"
os: ubuntu-latest
test_config: "NEP29"
- python-version: "3.6.8"
Expand All @@ -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 }}

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,46 @@ 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: |
mkdir pysatData
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [
"netCDF4",
"numpy",
"pandas",
"pysat >= 3.0.4",
"pysat >= 3.0.4, <3.2.0",
"requests",
"xarray"
]
Expand All @@ -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]
Expand Down
9 changes: 7 additions & 2 deletions pysatCDAAC/instruments/cosmic_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'])
Expand Down
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pytest-cov
pytest-ordering
sphinx
sphinx-autoapi
sphinx_rtd_theme
sphinx_rtd_theme<2.0.0
Loading