Repository: desihub/desitransfer

Issue:
Trigger pipeline on only a desi file.
Currently the pipeline is activated when three files are present.  Change this so that only a `desi-{exposure}.fits.fz` file needs to be present.  This requires only changing a configuration file, not any actual code.

Discussion:

Patch:
diff --git a/doc/changes.rst b/doc/changes.rst
index 1872af6..c3bd530 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -5,7 +5,9 @@ Change Log
 0.3.1 (unreleased)
 ------------------
 
-* No changes yet.
+* Only a ``desi`` file is needed to trigger the pipeline (PR `#5`_).
+
+.. _`#5`: https://github.com/desihub/desitransfer/pull/5
 
 0.3.0 (2019-09-04)
 ------------------
diff --git a/py/desitransfer/data/desi_transfer_daemon.ini b/py/desitransfer/data/desi_transfer_daemon.ini
index ec62e7d..8b46a1b 100644
--- a/py/desitransfer/data/desi_transfer_daemon.ini
+++ b/py/desitransfer/data/desi_transfer_daemon.ini
@@ -11,7 +11,8 @@ destination = ${DESI_SPECTRO_DATA}
 # Directory where HPSS backups will be stored.
 hpss = desi/spectro/data
 # A valid exposure--that the pipeline should be run on--should contain these files.
-expected_files = desi-{exposure}.fits.fz,fibermap-{exposure}.fits,guider-{exposure}.fits.fz
+# expected_files = desi-{exposure}.fits.fz,fibermap-{exposure}.fits,guider-{exposure}.fits.fz
+expected_files = desi-{exposure}.fits.fz
 # Checksum files have this format.
 checksum_file = checksum-{night}-{exposure}.sha256sum
 


Test patch:
diff --git a/py/desitransfer/test/test_daemon.py b/py/desitransfer/test/test_daemon.py
index 4dfb499..33e64d8 100644
--- a/py/desitransfer/test/test_daemon.py
+++ b/py/desitransfer/test/test_daemon.py
@@ -70,8 +70,9 @@ class TestDaemon(unittest.TestCase):
                          os.path.join(os.environ['HOME'], 'bin', 'wrap_desi_night.sh'))
         self.assertEqual(d.conf['pipeline'].getdict('commands'),
                          {'science': 'redshifts'})
-        self.assertEqual(c.getlist('expected_files'),
-                         ['desi-{exposure}.fits.fz', 'fibermap-{exposure}.fits', 'guider-{exposure}.fits.fz'])
+        self.assertEqual(c.getlist('expected_files'), ['desi-{exposure}.fits.fz'])
+        # self.assertEqual(c.getlist('expected_files'),
+        #                  ['desi-{exposure}.fits.fz', 'fibermap-{exposure}.fits', 'guider-{exposure}.fits.fz'])
 
     @patch.object(TransferDaemon, '_configure_log')
     def test_TransferDaemon_alternate_init(self, mock_cl):
@@ -98,8 +99,9 @@ class TestDaemon(unittest.TestCase):
                          os.path.join(os.environ['HOME'], 'bin', 'wrap_desi_night.sh'))
         self.assertEqual(d.conf['pipeline'].getdict('commands'),
                          {'science': 'redshifts'})
-        self.assertEqual(c.getlist('expected_files'),
-                         ['desi-{exposure}.fits.fz', 'fibermap-{exposure}.fits', 'guider-{exposure}.fits.fz'])
+        self.assertEqual(c.getlist('expected_files'), ['desi-{exposure}.fits.fz'])
+        # self.assertEqual(c.getlist('expected_files'),
+        #                  ['desi-{exposure}.fits.fz', 'fibermap-{exposure}.fits', 'guider-{exposure}.fits.fz'])
 
     @patch('desitransfer.daemon.log')
     @patch.object(TransferDaemon, '_configure_log')