Skip to content

Commit

Permalink
remove some unused command-line arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Aug 21, 2019
1 parent 892ed9d commit 7a478d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
10 changes: 5 additions & 5 deletions py/desitransfer/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def _options(*args):
prsr = ArgumentParser(prog=os.path.basename(sys.argv[0]), description=desc)
# prsr.add_argument('-b', '--backup', metavar='H', type=int, default=20,
# help='UTC time in hours to trigger HPSS backups (default %(default)s:00 UTC).')
prsr.add_argument('-d', '--debug', action='store_true',
help='Set log level to DEBUG.')
prsr.add_argument('-D', '--daemon', action='store_true',
# prsr.add_argument('-d', '--debug', action='store_true',
# help='Set log level to DEBUG.')
prsr.add_argument('-d', '--daemon', action='store_true',
help='Run in daemon mode. If not specificed, the script will run once and exit.')
prsr.add_argument('-e', '--rsh', metavar='COMMAND', dest='ssh', default='/bin/ssh',
help="Use COMMAND for remote shell access (default '%(default)s').")
Expand All @@ -67,8 +67,8 @@ def _options(*args):
# help="Only transfer files, don't start the DESI pipeline.")
prsr.add_argument('-s', '--sleep', metavar='H', type=int, default=24,
help='In daemon mode, sleep H hours before checking for new data (default %(default)s hours).')
prsr.add_argument('-S', '--shadow', action='store_true',
help='Observe the actions of another data transfer script but do not make any changes.')
# prsr.add_argument('-S', '--shadow', action='store_true',
# help='Observe the actions of another data transfer script but do not make any changes.')
if len(args) > 0:
options = prsr.parse_args(args)
else: # pragma: no cover
Expand Down
7 changes: 4 additions & 3 deletions py/desitransfer/test/test_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ def test_config(self):
def test_options(self):
"""Test command-line arguments.
"""
options = _options('--debug')
options = _options('--daemon', '--kill',
os.path.expanduser('~/stop_daily_transfer'))
self.assertEqual(options.sleep, 24)
self.assertTrue(options.debug)
self.assertTrue(options.daemon)
self.assertEqual(options.kill,
os.path.join(os.environ['HOME'],
'stop_desi_transfer'))
'stop_daily_transfer'))


def test_suite():
Expand Down
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,18 @@
# 'api': ds.DesiAPI,
'sdist': DistutilsSdist}
setup_keywords['test_suite']='{name}.test.{name}_test_suite'.format(**setup_keywords)
setup_keywords['classifiers'] = ['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Scientific/Engineering :: Astronomy']
#
# Autogenerate command-line scripts.
#
# setup_keywords['entry_points'] = {'console_scripts':['desi_transfer_daemon = desitransfer.daemon:main',
# setup_keywords['entry_points'] = {'console_scripts':['desi_daily_transfer = desitransfer.daily:main',
# 'desi_transfer_daemon = desitransfer.daemon:main',
# 'desi_transfer_status = desitransfer.status:main']}
#
# Add internal data directories.
Expand Down

0 comments on commit 7a478d4

Please sign in to comment.