Skip to content

Commit

Permalink
Merge pull request #105 from hover2pi/dbmonitor_rename
Browse files Browse the repository at this point in the history
Dbmonitor rename
  • Loading branch information
bourque authored Jul 10, 2018
2 parents 3f8e4a3 + 6cb157d commit 5f075f8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
7 changes: 0 additions & 7 deletions docs/source/dbmonitor.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ API documentation
:maxdepth: 1
:caption: Contents:

dbmonitor.rst
monitor_mast.rst
permissions.rst
preview_image.rst
utils.rst
Expand Down
7 changes: 7 additions & 0 deletions docs/source/monitor_mast.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*********
monitor_mast
*********

.. automodule:: jwql.monitor_mast.monitor_mast
:members:
:undoc-members:
2 changes: 1 addition & 1 deletion docs/source/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
tests
*****

.. automodule:: jwql.tests.test_dbmonitor
.. automodule:: jwql.tests.test_monitor_mast
:members:

.. automodule:: jwql.tests.test_permissions
Expand Down
2 changes: 1 addition & 1 deletion jwql/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import dbmonitor
from . import monitor_mast
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions jwql/tests/test_dbmonitor.py → jwql/tests/test_monitor_mast.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python

"""Tests for the ``dbmonitor`` module.
"""Tests for the ``monitor_mast`` module.
Authors
-------
Expand All @@ -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


Expand All @@ -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]

Expand All @@ -36,15 +36,15 @@ 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]


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)

Expand All @@ -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']]
Expand Down

0 comments on commit 5f075f8

Please sign in to comment.