diff --git a/docs/source/dbmonitor.rst b/docs/source/dbmonitor.rst deleted file mode 100644 index 9d7024c2a..000000000 --- a/docs/source/dbmonitor.rst +++ /dev/null @@ -1,7 +0,0 @@ -********* -dbmonitor -********* - -.. automodule:: jwql.dbmonitor.dbmonitor - :members: - :undoc-members: diff --git a/docs/source/index.rst b/docs/source/index.rst index 7a39bcf48..2ca24a646 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -19,7 +19,7 @@ API documentation :maxdepth: 1 :caption: Contents: - dbmonitor.rst + monitor_mast.rst permissions.rst preview_image.rst utils.rst diff --git a/docs/source/monitor_mast.rst b/docs/source/monitor_mast.rst new file mode 100644 index 000000000..5a263b0e4 --- /dev/null +++ b/docs/source/monitor_mast.rst @@ -0,0 +1,7 @@ +********* +monitor_mast +********* + +.. automodule:: jwql.monitor_mast.monitor_mast + :members: + :undoc-members: diff --git a/docs/source/tests.rst b/docs/source/tests.rst index 60bc69472..02d12f2a0 100644 --- a/docs/source/tests.rst +++ b/docs/source/tests.rst @@ -2,7 +2,7 @@ tests ***** -.. automodule:: jwql.tests.test_dbmonitor +.. automodule:: jwql.tests.test_monitor_mast :members: .. automodule:: jwql.tests.test_permissions diff --git a/jwql/__init__.py b/jwql/__init__.py index 6d9900a73..8ae149028 100644 --- a/jwql/__init__.py +++ b/jwql/__init__.py @@ -1 +1 @@ -from . import dbmonitor \ No newline at end of file +from . import monitor_mast \ No newline at end of file diff --git a/jwql/dbmonitor/__init__.py b/jwql/monitor_mast/__init__.py similarity index 100% rename from jwql/dbmonitor/__init__.py rename to jwql/monitor_mast/__init__.py diff --git a/jwql/dbmonitor/dbmonitor.py b/jwql/monitor_mast/monitor_mast.py similarity index 98% rename from jwql/dbmonitor/dbmonitor.py rename to jwql/monitor_mast/monitor_mast.py index fd680e1d1..d74c7ec58 100644 --- a/jwql/dbmonitor/dbmonitor.py +++ b/jwql/monitor_mast/monitor_mast.py @@ -12,8 +12,8 @@ To get an inventory of all JWST files do: :: - from jwql.dbmonitor import dbmonitor - inventory, keywords = dbmonitor.jwst_inventory() + from jwql.monitor_mast import monitor_mast + inventory, keywords = monitor_mast.jwst_inventory() """ import os diff --git a/jwql/tests/test_dbmonitor.py b/jwql/tests/test_monitor_mast.py similarity index 79% rename from jwql/tests/test_dbmonitor.py rename to jwql/tests/test_monitor_mast.py index 0f8ba352b..edb5664fa 100755 --- a/jwql/tests/test_dbmonitor.py +++ b/jwql/tests/test_monitor_mast.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -"""Tests for the ``dbmonitor`` module. +"""Tests for the ``monitor_mast`` module. Authors ------- @@ -14,10 +14,10 @@ suppress verbose output to stdout): :: - pytest -s test_dbmonitor.py + pytest -s test_monitor_mast.py """ -from ..dbmonitor import dbmonitor as db +from ..monitor_mast import monitor_mast as mm from ..utils.utils import JWST_INSTRUMENTS @@ -26,7 +26,7 @@ def test_caom_instrument_keywords(): instruments""" kw = [] for ins in JWST_INSTRUMENTS: - kw.append(db.instrument_keywords(ins, caom=True)['keyword'].tolist()) + kw.append(mm.instrument_keywords(ins, caom=True)['keyword'].tolist()) assert kw[0] == kw[1] == kw[2] == kw[3] == kw[4] @@ -36,7 +36,7 @@ def test_filtered_instrument_keywords(): different for all instruments""" kw = [] for ins in JWST_INSTRUMENTS: - kw.append(db.instrument_keywords(ins, caom=False)['keyword'].tolist()) + kw.append(mm.instrument_keywords(ins, caom=False)['keyword'].tolist()) assert kw[0] != kw[1] != kw[2] != kw[3] != kw[4] @@ -44,7 +44,7 @@ def test_filtered_instrument_keywords(): def test_instrument_inventory_filtering(): """Test to see that the instrument inventory can be filtered""" filt = 'GR150R' - data = db.instrument_inventory('niriss', + data = mm.instrument_inventory('niriss', add_filters={'filter': filt}, return_data=True) @@ -57,7 +57,7 @@ def test_instrument_dataproduct_filtering(): """Test to see that the instrument inventory can be filtered by data product""" dp = 'spectrum' - data = db.instrument_inventory('nirspec', dataproduct=dp, caom=True, + data = mm.instrument_inventory('nirspec', dataproduct=dp, caom=True, return_data=True) dps = [row['dataproduct_type'] for row in data['data']]