Command Line Usage
The library provides the ska-telmodel command line utility that
can be used to perform basic data retrieval and validation
tasks. Usage information:
$ ska-telmodel --help
usage: ska-telmodel [-h] [-v] [-U] [-S SOURCES] [-l]
{ls,cat,cp,validate,pin,upload} ...
SKA telescope model command line utility. The environment variable
SKA_TELMODEL_SOURCES can also be used for sources.
positional arguments:
{ls,cat,cp,validate,pin,upload}
ls List telescope model keys with a particular prefix.
cat Retrieves and prints the telescope model data
identified by the given key to stdout.
cp Retrieves specified telescope model data, and copies
it to the given path.
validate Validates given keys (or files) against applicable
schemas from the telescope model library
pin Generates a "pinned" telescope model data source list,
where all URIs replaced such that they will uniquely
identify the contents of the telescope model data
repository.
upload Upload a file/directory into a telmodel repo.
options:
-h, --help show this help message and exit
-v, --verbose Verbose mode
-U, --update Update source list
-S SOURCES, --sources SOURCES
Set telescope model data sources of truth
(','-separated list of URIs)
-l, --local Equivalent to "--sources=file://."
And for sub command specific help:
ls
$ ska-telmodel ls --help
usage: ska-telmodel ls [-h] [prefix]
positional arguments:
prefix The prefix to use
options:
-h, --help show this help message and exit
cat
$ ska-telmodel cat --help
usage: ska-telmodel cat [-h] key
positional arguments:
key The keys to output
options:
-h, --help show this help message and exit
cp
$ ska-telmodel cp --help
usage: ska-telmodel cp [-h] [-R] key [path]
positional arguments:
key From what directory/file to copy from
path Where to copy to
options:
-h, --help show this help message and exit
-R, --recursive Copy / validate keys or files recursively
validate
$ ska-telmodel validate --help
usage: ska-telmodel validate [-h] [-t] [-R] key
positional arguments:
key From what directory/file to copy from
options:
-h, --help show this help message and exit
-t, --strict Strict validation mode
-R, --recursive Copy / validate keys or files recursively
pin
$ ska-telmodel pin --help
usage: ska-telmodel pin [-h]
options:
-h, --help show this help message and exit
upload
$ ska-telmodel upload --help
usage: ska-telmodel upload [-h] [-r REPO] [--force-car-upload]
data_file [path]
positional arguments:
data_file Data file to upload
path Specify the path in the tmdata where we should upload to.
options:
-h, --help show this help message and exit
-r REPO, --repo REPO Specify gitlab repository to be updated.
--force-car-upload Force this file to upload as a large file
See Data Sources for explanations about telescope model data sources.