Skip to content

Commit

Permalink
PEP8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bhilbert4 committed Aug 16, 2024
1 parent 0f780bb commit 5232cfb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion jwql/jwql_monitors/monitor_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
THUMBNAILS = SETTINGS['thumbnail_filesystem']
LOGS = SETTINGS['log_dir']


def files_per_filter():
"""Querying MAST (rather than looping through the filesystem), determine how
many files use each filter for each instrument. Note that thiw function takes
Expand All @@ -94,7 +95,7 @@ def files_per_filter():
for fname in FILTERS_PER_INSTRUMENT[instrument]: # note that this does not include pupil wheel-based filters
obs = Observations.query_criteria(filters=fname, instrument_name=JWST_INSTRUMENT_NAMES_MIXEDCASE[instrument])
batch_size = 5
batches = [obs[i:i+batch_size] for i in range(0, len(obs), batch_size)]
batches = [obs[i : i + batch_size] for i in range(0, len(obs), batch_size)]

obs_table = [Observations.get_product_list(batch) for batch in batches]
products = unique(vstack(obs_table), keys='productFilename')
Expand Down
30 changes: 15 additions & 15 deletions jwql/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,32 +512,32 @@ def test_validate_config():
"host": "",
"port": ""
},
"django_databases" : {
"django_databases": {
"default": {
"ENGINE" : "",
"NAME" : "",
"USER" : "",
"PASSWORD" : "",
"HOST" : "",
"PORT" : ""
"ENGINE": "",
"NAME": "",
"USER": "",
"PASSWORD": "",
"HOST": "",
"PORT": ""
},
"monitors": {
"ENGINE" : "",
"NAME" : "",
"USER" : "",
"PASSWORD" : "",
"HOST" : "",
"PORT" : ""
"ENGINE": "",
"NAME": "",
"USER": "",
"PASSWORD": "",
"HOST": "",
"PORT": ""
}
},
"django_debug" : "",
"django_debug": "",
"jwql_dir": "",
"jwql_version": "",
"server_type": "",
"log_dir": "",
"mast_token": "",
"outputs": "",
"working" : "",
"working": "",
"preview_image_filesystem": "",
"filesystem": "",
"setup_file": "",
Expand Down
2 changes: 1 addition & 1 deletion jwql/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def filename_parser(filename):
except AttributeError:
filename_dict = {'recognized_filename': False}
logging.exception((f'\nFile; {filename} was not recognized by filename_parser(). Update parser or '
'constants.py if it should be recognized.\n'))
'constants.py if it should be recognized.\n'))

return filename_dict

Expand Down

0 comments on commit 5232cfb

Please sign in to comment.