Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Angeline Burrell <aburrell@users.noreply.github.com>
  • Loading branch information
jklenzing and aburrell committed Jun 20, 2023
1 parent 1dbdb55 commit 91db423
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pysatNASA/instruments/de2_rpa.py
Original file line number Diff line number Diff line change
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
6 changes: 3 additions & 3 deletions pysatNASA/instruments/de2_vefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pysatNASA/instruments/ses14_gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,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
4 changes: 3 additions & 1 deletion pysatNASA/tests/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,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 @@ -118,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 91db423

Please sign in to comment.