Skip to content

Commit

Permalink
clean up the read module after adding cloud-read capabilities (#502)
Browse files Browse the repository at this point in the history
- update tests to match new parse_source function
Co-authored-by: Rachel Wegener <[email protected]>
  • Loading branch information
JessicaS11 authored Feb 8, 2024
1 parent 826e936 commit b5e9291
Show file tree
Hide file tree
Showing 7 changed files with 184 additions and 313 deletions.
2 changes: 1 addition & 1 deletion doc/source/user_guide/documentation/classes_dev_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions doc/source/user_guide/documentation/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ granules
:undoc-members:
:show-inheritance:

is2cat
------

.. automodule:: icepyx.core.is2cat
:members:
:undoc-members:
:show-inheritance:

is2ref
------

Expand Down
1 change: 0 additions & 1 deletion doc/source/user_guide/documentation/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Attributes
Query.cycles
Query.dates
Query.end_time
Query.file_vars
Query.granules
Query.order_vars
Query.product
Expand Down
12 changes: 8 additions & 4 deletions icepyx/core/is2ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,10 @@ def extract_product(filepath, auth=None):
# ATL14 saves the short_name as an array ['ATL14']
product = product[0]
product = _validate_product(product)
except KeyError:
raise "Unable to parse the product name from file metadata"
except KeyError as e:
raise Exception(
"Unable to parse the product name from file metadata"
).with_traceback(e.__traceback__)

# Close the file reader
f.close()
Expand Down Expand Up @@ -421,8 +423,10 @@ def extract_version(filepath, auth=None):
if isinstance(version, bytes):
version = version.decode()

except KeyError:
raise "Unable to parse the version from file metadata"
except KeyError as e:
raise Exception(
"Unable to parse the version from file metadata"
).with_traceback(e.__traceback__)

# Close the file reader
f.close()
Expand Down
Loading

0 comments on commit b5e9291

Please sign in to comment.