Skip to content

Commit

Permalink
Merge pull request #193 from pysat/main
Browse files Browse the repository at this point in the history
Pull v0.0.5 release changes back into develop
  • Loading branch information
jklenzing committed Jun 29, 2023
2 parents 5d0804e + e62b8c6 commit 459f20a
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"] # Keep this version at the highest supported Python version
python-version: ["3.11"] # Keep this version at the highest supported Python version

name: Documentation tests
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"] # Keep this version at the highest supported Python version
python-version: ["3.11"] # Keep this version at the highest supported Python version

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"] # Keep this version at the highest supported Python version
python-version: ["3.11"] # Keep this version at the highest supported Python version

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
10 changes: 5 additions & 5 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"name": "Smith, Jonathon",
"orcid": "0000-0002-8191-4765"
},
{
"affilitation":"University of Colorado at Boulder",
"name": "Navarro, Luis",
"orcid": "0000-0002-6362-6575"
},
{
"affiliation": "Predictive Science",
"name": "Pembroke, Asher"
},
{
"name": "Spence, Carey",
"orcid": "0000-0001-8340-5625"
},
{
"affilitation":"University of Colorado at Boulder",
"name": "Navarro, Luis",
"orcid": "0000-0002-6362-6575"
}
]
}
19 changes: 7 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.0.5] - 2023-XX-XX
## [0.0.5] - 2023-06-27
* New Instruments
* ACE EPAM
* ACE MAG
Expand All @@ -14,25 +14,19 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* IGS GPS (TEC and ROTI)
* SES-14 GOLD -- tdisk, tlimb and o2den data products added
* TIMED GUVI
* Add TIMED GUVI platform to support L1C intensity datasets.
* Type of sensor source handled by inst_id with options of
spectrograph, imaging
* Resolution of dataset handled by tag with
low, high
* Added CDAWeb methods that can use cdasws to get the remote file list
* Bug Fixes
* Pandas datasets made with cdflib now have header level meta
* Updated CDAWeb routines to allow for data stored by year/day-of-year
* Updated GOLD nmax to sort scans by time.
* Added 1 usec to GOLD nmax channel B times to ensure uniqueness
* Added 1 usec to GOLD nmax channel B times to ensure timestamp uniqueness
* Fixed multi-file loads for cdf xarray datasets.
* Adds a 0.1 sec delay between file downloads to avoid excessive calls
to servers.
* Documentation
* Added TIMED-GUVI platform
* Added missing sub-module imports
* Added discussion of ICON constellation to docstrings, including caveats
* Enhancements
* Added CDAWeb methods that can use `cdasws` to get the remote file list
* Updated platform methods to follow a consistent style and work with the
general `init` function
* Added unit tests for the different platform method attributes
Expand All @@ -44,14 +38,14 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Improved usage of cdflib for users in xarray instruments
* Added a generalized `clean` routine to replace fill vals with NaNs
* Deprecations
* Deprecated jpl_gps instrtument module, moved roti instrument to igs_gps
* Deprecated jpl_gps instrument module, moved roti instrument to igs_gps
* Maintenance
* Updated download functions to take data_path as an arg, not a kwarg
* Removed duplicate tests if pysatCDF not isntalled
* Removed duplicate tests if pysatCDF not installed
* Removed pysatCDF tests on GitHub Actions workflows (see #167)
* Updated actions and templates based on pysatEcosystem docs
* Remove pandas cap on NEP29 tests
* Updated dosctring style for consistency
* Updated docstring style for consistency
* Removed version cap for xarray
* Added manual workflow to check that latest RC is installable through test pip
* Update meta label type for instruments
Expand All @@ -65,6 +59,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Updated syntax compliance with cdflib 1.0+
* Updated use of `decode_times` kwarg when loading xarray data to maintain current behaviour


## [0.0.4] - 2022-11-07
* Update instrument tests with new test class
* Support xarray datasets through cdflib
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pip install .

Note: pre-1.0.0 version
-----------------------
pysatNASA is currently in an initial development phase and requires pysat 3.0.4.
pysatNASA is currently in an initial development phase and requires pysat 3.1.0.
Feedback and contributions are appreciated.

# Using with pysat
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "pip >= 10"]
requires = ["setuptools >= 38.6", "pip >= 10"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
8 changes: 4 additions & 4 deletions pysatNASA/instruments/de2_fpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
'de2'
name
'fpi'
inst_id
None Supported
tag
None Supported
inst_id
None Supported
Warnings
Expand Down Expand Up @@ -67,12 +67,12 @@
platform = 'de2'
name = 'fpi'
tags = {'': '8 s cadence Fabry-Perot Interferometer data'}
inst_ids = {'': ['']}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand Down
8 changes: 4 additions & 4 deletions pysatNASA/instruments/de2_lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
'de2'
name
'lang'
inst_id
None Supported
tag
None Supported
inst_id
None Supported
Warnings
Expand Down Expand Up @@ -65,12 +65,12 @@
platform = 'de2'
name = 'lang'
tags = {'': '500 ms cadence Langmuir Probe data'}
inst_ids = {'': ['']}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand Down
8 changes: 4 additions & 4 deletions pysatNASA/instruments/de2_nacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
'de2'
name
'nacs'
inst_id
None Supported
tag
None Supported
inst_id
None Supported
Warnings
Expand Down Expand Up @@ -90,12 +90,12 @@
platform = 'de2'
name = 'nacs'
tags = {'': '1 s cadence Neutral Atmosphere Composition Spectrometer data'}
inst_ids = {'': ['']}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand Down
10 changes: 5 additions & 5 deletions pysatNASA/instruments/de2_rpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
'de2'
name
'rpa'
inst_id
None Supported
tag
None Supported
inst_id
None Supported
Warnings
Expand Down Expand Up @@ -72,12 +72,12 @@
platform = 'de2'
name = 'rpa'
tags = {'': '2 sec cadence RPA data'}
inst_ids = {'': [tag for tag in tags]}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand All @@ -99,7 +99,7 @@
dataproduct = {'': 'ion2s'}
fname = 'de2_{dp:s}_rpa_{datestr:s}.cdf'
supported_tags = {'': {tag: fname.format(dp=dataproduct[tag], datestr=datestr)
for tag in tags}}
for tag in tags.keys()}}
list_files = functools.partial(mm_gen.list_files,
supported_tags=supported_tags)

Expand Down
10 changes: 5 additions & 5 deletions pysatNASA/instruments/de2_vefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
'de2'
name
'vefi'
inst_id
None Supported
tag
'dca' or 'ac'
inst_id
None Supported
Warnings
Expand All @@ -56,12 +56,12 @@
tags = {'': '62 ms combination of Electric Field and Magnetometer',
'dca': '500 ms cadence DC Averaged Electric Field data',
'ac': '500 ms cadence AC Electric Field data'}
inst_ids = {'': [tag for tag in tags]}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}


# ----------------------------------------------------------------------------
Expand All @@ -85,7 +85,7 @@
'dca': 'dca500ms_vefi'}
fname = 'de2_{fid:s}_{datestr:s}.cdf'
supported_tags = {'': {tag: fname.format(fid=fid[tag], datestr=datestr)
for tag in tags}}
for tag in tags.keys()}}
list_files = functools.partial(mm_gen.list_files,
supported_tags=supported_tags)

Expand Down
8 changes: 4 additions & 4 deletions pysatNASA/instruments/de2_wats.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
'de2'
name
'wats'
inst_id
None Supported
tag
None Supported
inst_id
None Supported
Warnings
Expand Down Expand Up @@ -87,12 +87,12 @@
platform = 'de2'
name = 'wats'
tags = {'': '2 s cadence Wind and Temperature Spectrometer data'}
inst_ids = {'': ['']}
inst_ids = {'': [tag for tag in tags.keys()]}

# ----------------------------------------------------------------------------
# Instrument test attributes

_test_dates = {'': {'': dt.datetime(1983, 1, 1)}}
_test_dates = {'': {tag: dt.datetime(1983, 1, 1) for tag in tags.keys()}}

# ----------------------------------------------------------------------------
# Instrument methods
Expand Down
2 changes: 2 additions & 0 deletions pysatNASA/instruments/icon_euv.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
'euv'
tag
None supported
inst_id
None Supported
Warnings
--------
Expand Down
2 changes: 2 additions & 0 deletions pysatNASA/instruments/icon_fuv.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
'fuv'
tag
None supported
inst_id
None Supported
Warnings
--------
Expand Down
4 changes: 3 additions & 1 deletion pysatNASA/instruments/ses14_gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
'tlimb'
'tdisk'
'o2den'
inst_id
None Supported
Warnings
--------
Expand Down Expand Up @@ -131,7 +133,7 @@ def download(date_array, tag='', inst_id='', data_path=None):
# Set the list_remote_files routine
def list_remote_files(tag='', inst_id='', start=None, stop=None,
series_out=True):
"""Return a list of every file for chosen remote data.
"""List every file for remote GOLD data.
This routine is intended to be used by pysat instrument modules supporting
a particular NASA CDAWeb dataset.
Expand Down
13 changes: 8 additions & 5 deletions pysatNASA/tests/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@

import warnings

import pysat
import pytest

# Make sure to import your instrument library here
import pysatNASA

# Import the test classes from pysat
import pysat
from pysat.tests.classes import cls_instrument_library as clslib
from pysat.utils import testing

# Make sure to import your instrument library here
import pysatNASA


try:
import pysatCDF # noqa: F401
# If this successfully imports, tests need to be run with both pysatCDF
Expand Down Expand Up @@ -106,7 +107,8 @@ def test_meta_header(self, inst_dict):
Parameters
----------
inst_dict : dict
Dictionary containing info to instnatiate a specific instrument.
Dictionary containing info to instantiate a specific instrument.
"""
test_inst, date = clslib.initialize_test_inst_and_date(inst_dict)
try:
Expand All @@ -117,6 +119,7 @@ def test_meta_header(self, inst_dict):
test_inst.strict_time_flag = False
with warnings.catch_warnings(record=True) as war:
test_inst.load(date=date, use_header=True, use_cdflib=True)

assert len(war) >= 1
categories = [war[j].category for j in range(0, len(war))]
assert UserWarning in categories
Expand Down

0 comments on commit 459f20a

Please sign in to comment.