Skip to content

Commit

Permalink
Merge pull request #112 from pysat/maint/cdflib
Browse files Browse the repository at this point in the history
MAINT: update cdflib standards for 0.4+
  • Loading branch information
jklenzing committed Apr 28, 2022
2 parents b10fe13 + c69be9c commit 5656c93
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Updated NEP29 compliance in Github Actions
* Limit versions of hacking for improved pip compliance
* Update instrument template standards
* Removed cap on cdflib


## [0.0.2] - 2021-06-07
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Python 3.7+ and pysat 3.0.0+.
================ =================
Common modules Community modules
================ =================
beautifulsoup4 cdflib
lxml pysat
beautifulsoup4 cdflib>=0.4.4
lxml pysat>=3.0.0
netCDF4
numpy
pandas
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/cnofs_plp.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def clean(self):

for key in self.data.columns:
if key != 'Epoch':
fill = self.meta[key, self.meta.labels.fill_val][0]
fill = self.meta[key, self.meta.labels.fill_val]
idx, = np.where(self[key] == fill)
self[idx, key] = np.nan
return
Expand Down
6 changes: 0 additions & 6 deletions pysatNASA/instruments/omni_hro.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,6 @@ def load(fnames, tag=None, inst_id=None, file_cadence=pds.DateOffset(months=1),
data, meta = cdw.load(fnames, tag=tag, inst_id=inst_id,
file_cadence=file_cadence, flatten_twod=flatten_twod)

# Update the metadata, as float values may be stored as arrays
for dval in meta.keys():
for label in meta[dval].keys():
if hasattr(meta[dval][label], 'shape'):
meta[dval] = {label: meta[dval][label][0]}

return data, meta


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ netCDF4
requests
beautifulsoup4
lxml
cdflib<0.3.20
cdflib>=0.4.4
numpy
pandas
pysat>=3.0.0
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ install_requires =
requests
beautifulsoup4
lxml
cdflib<0.3.20
cdflib
numpy
pandas
xarray
pysat>=3.0.0
pysat

[coverage:report]
omit =
Expand Down

0 comments on commit 5656c93

Please sign in to comment.