Skip to content

Commit

Permalink
Merge pull request #178 from pysat/maint/165_pysat31
Browse files Browse the repository at this point in the history
MAINT: pysat 3.1.0 limitation, clean up GOLD code, cdflib version cap
  • Loading branch information
jklenzing committed Jun 2, 2023
2 parents 1353cf9 + c26f1e8 commit 68c4f33
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Added .readthedocs.yml to configure settings there.
* Use pyproject.toml to manage installation and metadata
* Set use_cdflib=True for supported xarray instruments
* Set pysat 3.1.0 minimum

## [0.0.4] - 2022-11-07
* Update instrument tests with new test class
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Python 3.6+.
| Common modules | Community modules | Optional Modules |
| ---------------- | ----------------- |------------------|
| beautifulsoup4 | cdflib | pysatCDF |
| lxml | pysat>=3.0.4 | |
| lxml | pysat>=3.1.0 | |
| netCDF4 | | |
| numpy | | |
| pandas | | |
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Prerequisites

pysatNASA uses common Python modules, as well as modules developed by
and for the Space Physics community. This module officially supports
Python 3.8+ and pysat 3.0.4+.
Python 3.8+ and pysat 3.1.0+.

================== =================
Common modules Community modules
================== =================
beautifulsoup4 cdflib>=0.4.4
lxml pysat>=3.0.4
lxml pysat>=3.1.0
netCDF4
numpy
pandas
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ keywords = [
dependencies = [
"beautifulsoup4",
"cdasws",
"cdflib >= 0.4.4",
"cdflib >= 0.4.4, <1.0",
"lxml",
"netCDF4",
"numpy",
"pandas",
"pysat >= 3.0.4",
"pysat >= 3.1",
"requests",
"xarray"
]
Expand Down
21 changes: 5 additions & 16 deletions pysatNASA/instruments/ses14_gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import functools
import numpy as np

import pysat
from pysat.instruments.methods import general as ps_gen
from pysat.utils.io import load_netcdf

Expand Down Expand Up @@ -244,21 +243,11 @@ def load(fnames, tag='', inst_id=''):
elif tag == 'o2den':
epoch_name = 'nevents'

# TODO(#165): remove try/except notation once pysat 3.1.0 is released
try:
data, meta = load_netcdf(fnames, pandas_format=pandas_format,
epoch_name=epoch_name, labels=labels,
meta_translation=meta_translation,
combine_by_coords=False,
drop_meta_labels='FILLVAL')
except TypeError:
pysat.logger.warn(' '.join(("Loading multiple days of data may error.",
"Upgrade to pysat 3.1.0 or higher to",
"resolve this issue.")))
data, meta = load_netcdf(fnames, pandas_format=pandas_format,
epoch_name=epoch_name, labels=labels,
meta_translation=meta_translation,
drop_meta_labels='FILLVAL')
data, meta = load_netcdf(fnames, pandas_format=pandas_format,
epoch_name=epoch_name, labels=labels,
meta_translation=meta_translation,
combine_by_coords=False,
drop_meta_labels='FILLVAL')

if tag in ['nmax', 'tdisk', 'tlimb']:
# Add time coordinate from scan_start_time
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
beautifulsoup4
cdasws
cdflib>=0.4.4
cdflib>=0.4.4,<1.0
lxml
netCDF4
numpy
pandas
pysat>=3.0.4
pysat>=3.1.0
requests
xarray

0 comments on commit 68c4f33

Please sign in to comment.