Command-Line Tool#
Quick Reference#
mast_contributor_tools#
Command-line interface for mast_contributor_tools package.
To see more options for each command, you can use --help after each command.
For instance, mct check_filenames --help
Usage
mast_contributor_tools [OPTIONS] COMMAND [ARGS]...
Commands
- check_filename
Check a single file name against MAST HLSP naming standards
- check_filenames
Check files in a directory against MAST HLSP naming standards
Complete Reference#
mast_contributor_tools#
Command-line interface for mast_contributor_tools package.
To see more options for each command, you can use --help after each command.
For instance, mct check_filenames --help
Usage
mast_contributor_tools [OPTIONS] COMMAND [ARGS]...
check_filename#
Command for checking a single file name against MAST standards.
- Required Arguments:
FILENAMES is the name of at least one file to test. It does not need to be a real file. Additional files can be provided as additional arguments.
Example Usage:
To test a single filename (does not have to be a real file):
mct check_filename hlsp_my-hlsp_readme.txt
You can also test multiple filenames at once by providing them as additional arguments, for example:
mct check_filename hlsp_my-hlsp_hst_wfc3_multi_galaxy1_v1_spec.fits hlsp_my-hlsp_hst_wfc3_multi_galaxy2_v1_spec.fits
Usage
mast_contributor_tools check_filename [OPTIONS] [FILENAMES]...
Options
- -v, --verbose#
Enable verbose output
Arguments
- FILENAMES#
Optional argument(s)
check_filenames#
Command for checking file names in a directory against MAST standards.
- Required Arguments:
HLSP_NAME is the name of the HLSP collection
Example Usage:
To check all files in the current working directory, run the command:
mct check_filenames <my-hlsp>
where ‘<my-hlsp>’ is the name of your HLSP.
This command is also equivalent to:
mct check_filenames my-hlsp -dir=’.’ -p=’.’ –dbFile=’results_my-hlsp.db’
To check all files in a specified directory matching a certain file pattern:
mct check_filenames my-hlsp -dir=’subdir’ -p=’*.fits’
This example will only check files ending with “.fits” in the directory “subdir”
Usage
mast_contributor_tools check_filenames [OPTIONS] HLSP_NAME
Options
- -dir, --directory <directory>#
Path of HLSP directory tree; tests all files in that directory
- -file, --from_file <from_file>#
Path to a text file containing a list of filenames to check, instead of scanning a directory
- -p, --pattern <pattern>#
File pattern to limit testing, for example ‘hlsp_*_spec.fits’
- -e, --exclude <exclude>#
File pattern to exclude from testing, for example ‘*.png’
- -n, --max_n <max_n>#
Maximum number of files to check, for testing purposes.
- -db, --dbFile <dbfile>#
Results database filename (defaults to: results_<hlsp_name>.db)
- -v, --verbose#
Enable verbose output
Arguments
- HLSP_NAME#
Required argument