trap-manage.py

trap-manage.py is the command-line tool for initialising and running the TraP pipeline. Different tasks are handled via the use of ‘subcommands’ as detailed below.

When the TraP is correctly installed on the system you can issue the trap-manage.py command. Documentation of subcommands is also available on the command line. You can use the --help flag (also per subcommand) to explore all possible options.


A tool for managing TKP projects.

Use ‘initproject’ to create a project directory. Other Subcommands should be run from within a project directory.

NB: To overwrite the database settings in pipeline.cfg you can use these environment variables to configure the connection:

  • TKP_DBENGINE
  • TKP_DBNAME
  • TKP_DBUSER
  • TKP_DBPASSWORD
  • TKP_DBHOST
  • TKP_DBPORT

(This is useful for setting up test databases, etc.)

usage: trap-manage.py [-h] {initproject,initjob,run,initdb,celery} ...
Sub-commands:
initproject

Initialize a pipeline project directory, complete with config files which you can use to configure your pipeline.

usage: trap-manage.py initproject [-h] [-t TARGET] name
Positional arguments:
name project folder name
Options:
-t, --target location of new TKP project
initjob

Create a job folder, complete with job-specific config files which you will need to modify.

usage: trap-manage.py initjob [-h] name
Positional arguments:
name Name of new job
run

Run a job by specifying the name of the job folder.

usage: trap-manage.py run [-h] [-m MONITOR_COORDS] [-l MONITOR_LIST] name
Positional arguments:
name Name of job to run
Options:
-m, --monitor-coords
 a list of RA,DEC coordinates to monitor in JSON format, example: [[5, 6], [7, 8]]
-l, --monitor-list
 Specify a file containing a list of RA,DEC
initdb

Initialize a database with the TKP schema.

usage: trap-manage.py initdb [-h] [-y] [-d]
Options:
-y=False, --yes=False
 don’t ask for confirmation
-d=False, --destroy=False
 remove all tables before population(only works with Postgres backend)
celery

Shortcut for access to celery sub commands

usage: trap-manage.py celery [-h] ...
Positional arguments:
rest A celery subcommand