Orion CLI Commands
The Orion CLI is a command line interface to the Orion Platform.
It is installed as part of the Orion Platform Python package.
The CLI is invoked by the command ocli.
Top-Level Options
The Orion CLI has several top-level options, or flags, that modify the behavior of commands.
Timeout
The --timeout flag can be used to set the request timeout in seconds:
if the server takes longer to respond to a request than the specified number of
seconds, the client disconnects. The default value is 10, but that may be too
short in some cases, such as:
Slow or inconsistent internet connections.
Sharing a package with many cubes to many users.
Uploading large files.
Note
All requests to the Orion API have a maximum timeout of 60 seconds.
JSON
The --json flag can be used to make the Orion CLI return JSON
rather than plain text, making it easier to parse the results.
ocli --json <command>
Profile
The --profile flag specifies which profile configuration to use while
making requests to the Orion API. The default is the default profile.
ocli --profile=testing <command>
OCLI config directory and file permissions are forced to be read/write for the owner.
Max Retries
The --max-retries flag specifies the number of times the client
will retry a connection if it fails or gets a 404 error. This is set to 2
by default. The retries back off, so the time
increases exponentially (to a certain point) with the number of retries.
Shard uploads and downloads are unaffected by --max-retries.
ocli --max-retries=5 <command>
Configuring Profiles and Projects
Configure an Orion Profile
ocli config profile
Configure an Orion Profile
A profile is made up of an Orion domain, username, token and project. Tokens can be created by logging into Orion with a web browser, going to the user profile, and clicking Create Token under My Tokens.
If a project is not provided, the profile will use the account’s default project.
Usage
ocli config profile [OPTIONS]
Options
- --url <url>
Required Url of Orion Stack, ex: orion.eyesopen.com
- --username <username>
Required Username to use to login into Orion with
- --password <password>
Deprecated. Ignored if provided.
- --token <token>
Orion token to use for authentication. If not provided, will be prompted interactively.
- --project <project>
Project identifier to use for configuration
Change the Default Project of an Orion Profile
ocli config project
Configure your profile’s current project. Configure either profile’s default project or input desired project. To see available projects, run ocli projects list.
Usage
ocli config project [OPTIONS]
Delete an Orion Profile
ocli config delete
Delete an Orion Profile
Usage
ocli config delete [OPTIONS] PROFILE_NAME
Arguments
- PROFILE_NAME
Required argument
Retrieve Information about the Current Profile
ocli config info
Retrieve information about the current profile
Usage
ocli config info [OPTIONS]
List the Configured Profiles
ocli config list
List the configured profiles
Usage
ocli config list [OPTIONS]
Refresh Your Orion Profile Token
ocli config token
Refresh your Orion Profile Token (Deprecated).
Usage
ocli config token [OPTIONS]
Options
- --print-token
Deprecated. Print token rather than writing it to your configuration
Storage in Folders
Folder commands interact with Orion’s virtual filesystem.
Note that folder commands are at the TOP LEVEL, that is, ocli ls <path> instead of ocli folders ls <path>.
Folders contain files, datasets, ShardCollections, and other folders. They can take the following forms:
/project/<project-id>/user/<username>/<path>Project folders, which are private to a user with the given username.
/project/<project-id>/team/<path>Project shared folders. All project members have access to these folders and their contents.
/project/<project-id>/workspace/<workspace-id>/<path>Project shared workspace folders. Project members are given permission by sharing the workspace with them.
/organization/<path>Organization shared folders.
List Contents of a Folder or Details of an Item
ocli ls
List contents of Orion folder(s) by path, or details of an Item
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Items can be specified by file://<file_id> or dataset://<dataset_id>
Usage
ocli ls [OPTIONS] [FILTERS_AND_PATHS]...
Options
- --recurse <recurse>
List folder contents recursively
Arguments
- FILTERS_AND_PATHS
Optional argument(s)
Create a Folder
ocli mkdir
Create an Orion Folder
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Usage
ocli mkdir [OPTIONS] [PATHS]...
Arguments
- PATHS
Optional argument(s)
Copy to/from Orion
ocli cp
Copy an item to/from Orion
dest must be a path, and items can only be copied from Orion to local or local to Orion.
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Usage
ocli cp [OPTIONS] SOURCE DEST
Options
- --recurse <recurse>
Copy folder contents recursively
- --dry-run <dry_run>
Run as a dry-run
Arguments
- SOURCE
Required argument
- DEST
Required argument
Peek Inside a File or Dataset in Orion
ocli head
Peek inside of an Orion dataset or file by path or Item
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Items can be specified by file://<file_id> or dataset://<dataset_id>
Usage
ocli head [OPTIONS] [PATHS]...
Options
- -n, --number <number>
Number of entries
Arguments
- PATHS
Optional argument(s)
Move a Folder or an Item
ocli mv
Move item to a folder
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Usage
ocli mv [OPTIONS] SOURCE DEST
Options
- --dry-run <dry_run>
Run as a dry-run
Arguments
- SOURCE
Required argument
- DEST
Required argument
Remove a Folder or Item
ocli rm
Delete an Orion folder or item by path
Folder paths have the following forms:
/project/<project-id>/user/<username>/<path>
/project/<project-id>/workspace/<workspace-id>/<path>
/project/<project-id>/team/<path>
/organization/<path>
Items can be specified by file://<file_id> or dataset://<dataset_id>
Usage
ocli rm [OPTIONS] [PATHS]...
Options
- --dry-run <dry_run>
Run as a dry-run
Arguments
- PATHS
Optional argument(s)
Workspaces
The CLI provides a number of commands to interact with workspaces: shared areas for Orion files, datasets, and collections organized into folders.
ocli workspaces
Orion workspace commands.
Usage
ocli workspaces [OPTIONS] COMMAND [ARGS]...
create
Create a new workspace
- Examples:
ocli workspaces create default_project_shared_space ocli workspaces create ‘another shared space’ –project 10
Usage
ocli workspaces create [OPTIONS] WORKSPACE_NAME
Options
- --project <project>
Unless specified, the workspace is created in your current default project.
Arguments
- WORKSPACE_NAME
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli workspaces help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about an Orion workspace.
Usage
ocli workspaces info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List Orion workspaces.
- Examples:
ocli workspaces list –project 10 ocli workspaces list –limit 5 slug=’my shared workspace’
Usage
ocli workspaces list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --project <project>
Filter by project identifier.
Arguments
- FILTERS
Optional argument(s)
list-users
List users of a workspace.
- Examples:
ocli workspaces list-users 123
Usage
ocli workspaces list-users [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
Datasets
The CLI provides several ways to interact with datasets.
ocli datasets
Orion dataset commands
Usage
ocli datasets [OPTIONS] COMMAND [ARGS]...
delete
Delete a specific dataset
Usage
ocli datasets delete [OPTIONS] IDENTIFIER
Options
- --immediate
Arguments
- IDENTIFIER
Required argument
download
Download an Orion dataset to the local file system
Will download to any OEchem writable format
Usage
ocli datasets download [OPTIONS] IDENTIFIER FILE
Options
- --fieldlist <fieldlist>
Arguments
- IDENTIFIER
Required argument
- FILE
Required argument
finalize
Finalize a specific dataset
Usage
ocli datasets finalize [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli datasets help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about a specific dataset
Usage
ocli datasets info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List datasets that you have access to.
Usage
ocli datasets list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --name <name>
Filter by name
- --project <project>
Filter by project identifier
Arguments
- FILTERS
Optional argument(s)
tag
Tag a dataset
Usage
ocli datasets tag [OPTIONS] IDENTIFIER [TAGS]...
Options
- --project <project>
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
untag
Untag a dataset
Usage
ocli datasets untag [OPTIONS] IDENTIFIER [TAGS]...
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
upload
Upload a local dataset to Orion
Will automatically convert any OEChem readable format into a dataset
Usage
ocli datasets upload [OPTIONS] FILE
Options
- --project <project>
Arguments
- FILE
Required argument
File Commands
These commands are used to manage files.
ocli files
Orion file commands
Usage
ocli files [OPTIONS] COMMAND [ARGS]...
delete
Delete an Orion file by id
Usage
ocli files delete [OPTIONS] IDENTIFIER
Options
- --immediate
Arguments
- IDENTIFIER
Required argument
download
Download a file from Orion to the local file system
Usage
ocli files download [OPTIONS] IDENTIFIER FILE
Arguments
- IDENTIFIER
Required argument
- FILE
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli files help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about a specific file
Usage
ocli files info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List information about the Files you have access to
Usage
ocli files list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --name <name>
Filter by name
- --project <project>
Filter by project identifier
Arguments
- FILTERS
Optional argument(s)
tag
Tag a specific file
Usage
ocli files tag [OPTIONS] IDENTIFIER [TAGS]...
Options
- --project <project>
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
untag
Untag a file
Usage
ocli files untag [OPTIONS] IDENTIFIER [TAGS]...
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
upload
Upload a file from the local file system to Orion
Note: Slow or inconsistent internet connections may require a longer –timeout to reliably upload large files
Ex: ocli –timeout 90 files upload FILE_TO_UPLOAD
Usage
ocli files upload [OPTIONS] FILE
Options
- --project <project>
- --name <name>
Arguments
- FILE
Required argument
Collections
These are commands for managing collections.
ocli collections
Orion collection commands
Usage
ocli collections [OPTIONS] COMMAND [ARGS]...
close
Close a collection specified by IDENTIFIER
A closed (i.e. ready) collection cannot have shards added to it.
Usage
ocli collections close [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
delete
Delete Orion collections by IDENTIFIER
Usage
ocli collections delete [OPTIONS] IDENTIFIER
Options
- --immediate
Arguments
- IDENTIFIER
Required argument
delete-shards
Delete parts of an Orion collection specified by collection IDENTIFIER and list of SHARD_IDENTIFIERS.
If no SHARD_IDENTIFIERS are specified, then no operations will be performed. Use ‘ocli collections delete’ to delete a collection.
Usage
ocli collections delete-shards [OPTIONS] IDENTIFIER [SHARD_IDENTIFIERS]...
Arguments
- IDENTIFIER
Required argument
- SHARD_IDENTIFIERS
Optional argument(s)
download
Download an Orion collection specified by IDENTIFIER to the DEST dir on the local file system
Each shard will be downloaded into DEST.
Usage
ocli collections download [OPTIONS] IDENTIFIER DEST
Options
- --overwrite
Overwrite files
- --download-attempts <download_attempts>
The number of attempts to try downloading a shard
Arguments
- IDENTIFIER
Required argument
- DEST
Required argument
download-shards
Download parts of an Orion collection specified by IDENTIFIER to the DEST dir on the local file system
Each shard in SHARD_IDENTIFIERS will be downloaded into DEST.
Usage
ocli collections download-shards [OPTIONS] IDENTIFIER [SHARD_IDENTIFIERS]...
DEST
Options
- --overwrite
Overwrite files
- --download-attempts <download_attempts>
The number of attempts to try downloading a shard
Arguments
- IDENTIFIER
Required argument
- SHARD_IDENTIFIERS
Optional argument(s)
- DEST
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli collections help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about a specific collection
Usage
ocli collections info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
info-shard
Retrieve information about a specific collection’s shards
Usage
ocli collections info-shard [OPTIONS] IDENTIFIER SHARD_IDENTIFIER
Arguments
- IDENTIFIER
Required argument
- SHARD_IDENTIFIER
Required argument
list
List information about the collections you have access to.
Usage
ocli collections list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
list-shards
Retrieve information about a specific collection’s shards
Usage
ocli collections list-shards [OPTIONS] IDENTIFIER [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --name <name>
Filter shards by name
Arguments
- IDENTIFIER
Required argument
- FILTERS
Optional argument(s)
open
Open a collection specified by IDENTIFIER
A open collection can have shards added to it.
Usage
ocli collections open [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
tag
Tag a specific collection
Usage
ocli collections tag [OPTIONS] IDENTIFIER [TAGS]...
Options
- --project <project>
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
untag
Untag a specific collection
Usage
ocli collections untag [OPTIONS] IDENTIFIER [TAGS]...
Arguments
- IDENTIFIER
Required argument
- TAGS
Optional argument(s)
upload
Upload one or more FILES as new shards in a collection specified by IDENTIFIER to Orion
If IDENTIFIER is an integer id, then FILES are added to an existing collection. Otherwise, a new collection named IDENTIFIER is created.
Usage
ocli collections upload [OPTIONS] IDENTIFIER [FILES]...
Options
- --project <project>
- --v1
- --upload-attempts <upload_attempts>
The number of attempts to try uploading a file as a shard
- --verbose
Arguments
- IDENTIFIER
Required argument
- FILES
Optional argument(s)
Secrets Commands
ocli secrets
Orion secrets are a way of storing values in an encrypted state that can be retrieved for later use.
Usage
ocli secrets [OPTIONS] COMMAND [ARGS]...
create
Create an Orion secret.
Usage
ocli secrets create [OPTIONS] NAME
Options
- --value <value>
Required Secret value to store within a secret.
- --description <description>
Arguments
- NAME
Required argument
delete
Delete an Orion secret
Usage
ocli secrets delete [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli secrets help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve an Orion secret.
This returns the value that you stored on the secret in the form you set it initially.
Usage
ocli secrets info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List Orion secrets.
Usage
ocli secrets list [OPTIONS] [FILTERS]...
Options
- --name <name>
Filter by name
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
Projects
These are commands for managing projects.
ocli projects
Orion project commands
Usage
ocli projects [OPTIONS] COMMAND [ARGS]...
create
Create a new Orion project
Usage
ocli projects create [OPTIONS] PROJECT_NAME
Arguments
- PROJECT_NAME
Required argument
delete
Delete an Orion project
Usage
ocli projects delete [OPTIONS] IDENTIFIER
Options
- --immediate
Arguments
- IDENTIFIER
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli projects help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about an Orion project
Usage
ocli projects info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
leave
Leave an Orion project
Usage
ocli projects leave [OPTIONS] IDENTIFIER
Options
- --new-owner <new_owner>
ID of user to receive all owned resources in the project
Arguments
- IDENTIFIER
Required argument
list
List Orion projects
Usage
ocli projects list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
Floe Commands (Packages)
The following commands are a set of resources in Orion that relate to the Floe package, which includes packages, WorkFloes, and jobs.
Initializing a Package
The ocli packages init command:
Sets up a skeleton of an Orion package containing cubes and floes.
Provides a simple example of a cube and a floe.
Supports the testing setup using PyTest including working tests for the example cube and floe.
Provides a
setup.pyfile with commands to run tests or build the package.Provides version configuration via storing the version only in the module’s
__init__.pyfile.
When creating a package with ocli packages init --service, the generated
services boilerplate includes a demo Flask application and a services.json
definition.
ocli packages init
Create a Floe package scaffold.
This command can be used to create the structure necessary for a Floe package, but is distinct from the set of package commands which can be used to manage package images.
Usage
ocli packages init [OPTIONS]
Options
- --full-name <full_name>
Required Author of the Floe package
- --email <email>
Required Email of the Floe package author
- --project-name <project_name>
Required Name of the project
- --project-slug <project_slug>
Required Short name for the project
- --module-name <module_name>
Required Name of the module
- --description <description>
Required Description of the project
- --version <version>
Required Package version
- --service
Include a service directory and boilerplate code
Retrieving the Information about a Floe Package
ocli packages info
Retrieve information about a specific package
Usage
ocli packages info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
Retrieving the Environment Build Log for a Floe Package
ocli packages environment <resource_id>
Retrieving the Inspection Information for a Floe Package
ocli packages inspection <resource_id>
Deleting a Floe Package
ocli packages delete <resource_id>
Listing Floe Packages
ocli packages list [--limit=<integer>] [--offset=<integer>] \
[states=<state>,... (ready, deprecated, queued, error)] \
[name=<name>] [UUID=<uuid>] [owner=<integer>] \
[<key>=<value>,...]
ex:
ocli packages list
ocli packages list states=error
ocli packages list --limit=20 states=ready,queued
Upload a Floe Package
ocli packages upload <file_or_url>
Get Information on Sharing Status of a Specific Floe Package
ocli packages list-shares <resource_id>
WorkFloes
These commands allow access to WorkFloe objects in Orion, also known as floes. WorkFloes are collections of cubes that define the flow of data.
Retrieving the Information about a WorkFloe
ocli workfloes info <resource_id>
Deleting a Workfloe
ocli workfloes delete <resource_id>
Listing Workfloes
ocli workfloes list [--package=<integer>] [--name=<string>] \
[--limit=<integer>] [--offset=<integer>] \
[states=<state>,... (ready, deprecated, hidden, invalid)] \
[systags=<tag>,...] [tags=<tag>,...] [owner=<integer>] \
[classification=<string> [classification_depth=<integer>]
[order_by=(recently_used | name)]
[<key>=<value>,...]
ex:
ocli workfloes list
ocli workfloes list tags=tag1,tag2
ocli workfloes list --name=collection_to_ --limit=10 order_by=recently_used
ocli workfloes list --package=10 states=ready,deprecated
Listing Classifications
ocli workfloes list-classifications [--name=<string>] [--path=<string>] \
[--depth=<integer>] [--limit=<integer>] [--offset=<integer>] \
[<key>=<value>,...]
ex:
ocli workfloes list-classifications
ocli workfloes list-classifications --path=Example/Test
ocli workfloes list-classifications --name=exam --depth=1 --limit=10
Get Information on Sharing Status of a Specific WorkFloe
ocli workfloes list-shares <resource_id>
Jobs
These are commands for interacting with jobs in Orion. Jobs are an instantiation of a Workfloe that performs the computation defined by the Workfloe.
Retrieving the Information about a Job
ocli jobs info <resource_id>
Retrieve the Logs of a Job
ocli jobs logs <resource_id>
ocli jobs cancel <resource_id>
Deleting a Job
ocli jobs delete <resource_id>
Displaying Size of Logs
This retrieves the size of the logs of an Orion job.
ocli jobs log_size [OPTIONS] JOB_ID
Arguments
- JOB_ID
Required argument identifying the job.
Deleting Job Logs
This deletes the logs of an Orion job.
ocli jobs delete_logs [OPTIONS] JOB_ID
Arguments
- JOB_ID
Required argument.
Listing Existing Jobs
ocli jobs list [--limit=<integer>] [--offset=<integer>] \
[name=<name>] [project=<integer>] [workfloe=<integer>] \
[job_type=(system | user)] [owner=<integer>] \
[states=<state>,... (queued, running, complete)] \
[tags=<tag>,...] [<key>=<value>,...]
ex:
ocli jobs list
ocli jobs list workfloe=20
ocli jobs list tags=tag1,tag2 states=complete
ocli jobs list job_type=user name=aspirin_ states=queued,running
Tag
This tags a specific job.
ocli jobs tag [OPTIONS] IDENTIFIER [TAGS]...
Options
–project <project>
Arguments
- IDENTIFIER
Required argument identifying the job.
- TAGS
Optional string argument(s) to be used as tags.
The –project` option applies the tags using the project ID.
For example:
ocli jobs tag --project 25412 203761 candidates
Tagged WorkFloeJob 203761 with ('candidates',)
Project tags are displayed in pink in the user interface. Job tags are yellow.
Figure 1. Project tags (pink) and job tags (yellow).
Both kinds of tag can be used in searches in the user interface.
Figure 2. Searching with a project tag.
Starting a Job
ocli jobs start <workfloe_id> <job_name> [--wait] \
[--param-file <path>] [FLOE_PARAMETERS]
ex:
ocli jobs start 6836 job_name0 --in 601 --out run_output.oedb
Note
Adding -- --help to the ocli jobs start command will print the
parameters that are expected by the workfloe.
Using a Parameter File
The --param-file argument allows you to provide job parameters from a JSON
file. This is especially useful for complex floes with multi-level parameters
that are difficult to express as command-line arguments.
ocli jobs start <workfloe_id> <job_name> --param-file params.json
The JSON file should contain a dictionary with any of the following keys:
parameters— promoted, cube, and floe parameter overrides.system_parameters— system-level settings such as project or priority.notify— whether to send a notification email when the job completes.
Any command-line arguments provided alongside --param-file override
values from the file.
# Start using file parameters, but override the project
ocli jobs start 42 "My Job" --param-file params.json --project 99
See also
Use ocli jobs export-params to generate a parameter file from an
existing job.
Exporting Job Parameters
Export the parameters of a previously run job to a JSON file. The exported file
can be used with --param-file on ocli jobs start to rerun a job with
the same (or modified) parameters.
ocli jobs export-params <job_id> [--output <path>]
ex:
ocli jobs export-params 12345
ocli jobs export-params 12345 --output my_params.json
If --output is not specified, the file is written to
job_<job_id>_params.json in the current directory.
The exported JSON contains:
{
"workfloe": 814,
"name": "Original Job Name",
"parameters": {
"promoted": {},
"cube": {},
"floe": {}
},
"system_parameters": {
"project": 99
},
"notify": false
}
Watching a Job
ocli jobs watch <workfloe_id> <job_name> [CUBES] [OPTIONS]
Collect Debug Information
ocli jobs debug-export <job_id>
Retrieving Summary of Jobs Within an Organization
ocli jobs summary-export [--package-uuids=<str>] [--workfloe-uuid=<str>] \
[--job_ids=<str>] [--start-date=<str>] [--end-date=<str>] \
[--output-path=<str>] [--download=(--download | --no-download)] \
[--notify=(--notify | --no-notify)]
Examples:
ocli jobs summary-export
ocli jobs summary-export --notify --download
ocli jobs summary-export --start-date 2023-01-01 --end-date "2023-01-01 18:00:00"
ocli jobs summary-export --output-path "/project/<project-id>/users/<user-id>/folder-name/"
ocli jobs summary-export --package-uuids "uuid_A, uuid_B" --workfloe-uuids "uuid_C" --job-ids "6, 19, 47"
This functionality is available only to Stack Admins, Org Admins, and MT Org Admins.
Cost Export
Generating Storage Use Report
The report generated by the following commands contains estimates based on the amount of storage used. They do not reflect the exact billed cost.
The results do not take into account the AWS tiered storage system.
Generating the report does not move anything from a lower cost tier into a higher cost tier.
ocli cost export --report-type=storage_use [USER IDS]
ex:
ocli cost export --report-type=storage_use 10 11 20
Generating Spend Summary Report
This report provides per-user totals for storage, jobs, and services. Costs for user-created Molecule Search databases are included in the services total. Totals are pulled from the ledger entries and aggregated over the previous 7 days (168 hours), current calendar month, and previous calendar month. If no user IDs are provided, data for the current user will be reported (non-admin) or for all organization users (admin).
ocli cost export --report-type=spend_summary [USER IDS]
ex:
ocli cost export --report-type=spend_summary 10 11 20
The resulting CSV has column headers providing content labels, but the schema is not versioned. For programmatic usage, the orionclient LedgerEntry is recommended. All amounts are in dollars.
ocli cost export
Triggers cost report in Orion, optionally downloads the file.
notify: Send an email upon completion.
output-path: The output path to store the cost report in.
report-type: The report type.
redact-project-names: Redact project names from reports.
users: A list of user ids for user data to include in the cost report.
Examples:
ocli cost export –notify=true –report-type=spend_summary 10
ocli cost export –report-type=spend_summary 10 11 20
ocli cost export –report-type=storage_use 10 11 20
Usage
ocli cost export [OPTIONS] [USERS]...
Options
- --notify <notify>
Notify upon completion via email
- --output-path <output_path>
Project path
- --report-type <report_type>
Required Report type
- Options:
storage_use | spend_summary
- --redact-project-names <redact_project_names>
Redact project names
- --download, --no-download
Wait for export to complete and download the result
Arguments
- USERS
Optional argument(s)
Figure 3. Sample cost export table.
Molecule Search Database Commands
These commands are used to manage molecule search databases.
ocli molsearch db
Orion molecule search database commands.
Usage
ocli molsearch db [OPTIONS] COMMAND [ARGS]...
create
Submit a job to create a molecule search database.
Usage
ocli molsearch db create [OPTIONS]
Options
- --collection <collection>
Collection with molecule search database.
- --cpu <cpu>
Number of CPUs.
- --memory-mb <memory_mb>
Memory (in MB).
- --disk-space <disk_space>
Disk (in GB).
- --gpu <gpu>
Number of GPUs.
- --instance-type <instance_type>
Instance type.
- --pools <pools>
Pools to run the job in.
- --search-type <search_type>
Search type ‘2D’ or ‘3D’
- Options:
2D | 3D
- --server-is-remote
Is the server being manually managed?
- --server-address <server_address>
Address of the remote server.
- --auth-secret <auth_secret>
Authorization secret of the remote server.
- --verify-ssl-cert
Should the remote server verify its SSL certificate?
- --display-name <display_name>
User provided display name for the database
- --section <section>
Value of database section - OE provided or Customer Managed
- --is-proxy
Flag to use proxy or not
delete
Delete a molecule search database.
Usage
ocli molsearch db delete [OPTIONS] DATABASE
Arguments
- DATABASE
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli molsearch db help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Information about a specific molecule search database.
Usage
ocli molsearch db info [OPTIONS] DATABASE
Arguments
- DATABASE
Required argument
list
List all molecule search databases.
Usage
ocli molsearch db list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
load
Load a molecule search database.
Usage
ocli molsearch db load [OPTIONS] DATABASE
Arguments
- DATABASE
Required argument
logs
Retrieve the logs of a molecule search database
Usage
ocli molsearch db logs [OPTIONS] IDENTIFIER
Options
- --from <from_dt>
start date for the logs
- --until <until>
end date for the logs
Arguments
- IDENTIFIER
Required argument
unload
Unload a molecule search database.
Usage
ocli molsearch db unload [OPTIONS] DATABASE
Arguments
- DATABASE
Required argument
update
Update a molecule search database.
Usage
ocli molsearch db update [OPTIONS] DATABASE
Options
- --section <section>
Value of database section - OE provided or Customer Managed
- --display-name <display_name>
User provided display name for the database
Arguments
- DATABASE
Required argument
Molecule Search Query Commands
These commands are used to manage Molecule Search queries.
ocli molsearch query
Orion molecule search query commands.
Usage
ocli molsearch query [OPTIONS] COMMAND [ARGS]...
cancel
Cancel a substructure molecule search query.
Usage
ocli molsearch query cancel [OPTIONS] QUERY
Arguments
- QUERY
Required argument
create
Create a molecule search query.
Usage
ocli molsearch query create [OPTIONS] COMMAND [ARGS]...
exact
2D exact search using a SMILES string. If a file is provided, it will be converted into smiles.
Usage
ocli molsearch query create exact [OPTIONS] DATABASE QUERY
Options
- --search-type <search_type>
How to search.
- Options:
ISM | ABS | ISOMORPH | UNCOLOR
- --name <name>
- --max-hits <max_hits>
- --wait
- --project <project>
Arguments
- DATABASE
Required argument
- QUERY
Required argument
fastrocs
3D similarity search using a fastrocs query
Usage
ocli molsearch query create fastrocs [OPTIONS] DATABASE QUERY_MOL_FILE_PATH
Options
- --name <name>
- --max-hits <max_hits>
- --shape-only
- --sim-type <sim_type>
- Options:
tanimoto | tversky
- --tversky-alpha <tversky_alpha>
- --orientation <orientation>
WARNING: ‘inertialAtHeavyAtoms’, ‘inertialAtColorAtoms’, and ‘subrocs’ orientations are extremely memory intensive and can cause the database to exceed available memory. Use with caution.
- Options:
inertial | random
- --random-starts <random_starts>
- --wait
- --project <project>
Arguments
- DATABASE
Required argument
- QUERY_MOL_FILE_PATH
Required argument
graphsim
2D similarity search using a GraphSim query. If a file is provided, it will be converted into smiles.
Usage
ocli molsearch query create graphsim [OPTIONS] DATABASE QUERY
Options
- --fpname <fpname>
Fingerprint to use.
- --cutoff <cutoff>
Cutoff.
- --measure <measure>
Similarity measure to use.
- Options:
Tanimoto | Tversky | Dice | Cosine
- --name <name>
- --max-hits <max_hits>
- --wait
- --project <project>
Arguments
- DATABASE
Required argument
- QUERY
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli molsearch query create help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
substructure
2D substructure search using an OEChem substructure query.
Usage
ocli molsearch query create substructure [OPTIONS] DATABASE INPUT_QUERY
Options
- --subsearch_query_type <subsearch_query_type>
- Options:
MDL | SMARTS
- --aliphatic-constraint
only applicable for MDL queries
- --topology-constraint
only applicable for MDL queries
- --stereo-constraint
only applicable for MDL queries
- --isotope-constraint
only applicable for MDL queries
- --name <name>
- --max-hits <max_hits>
- --wait
- --cancel-after <cancel_after>
- --project <project>
Arguments
- DATABASE
Required argument
- INPUT_QUERY
Required argument
title
Search a 2D database using a space separated list of titles.
Usage
ocli molsearch query create title [OPTIONS] DATABASE [TITLE]...
Options
- --name <name>
- --project <project>
Arguments
- DATABASE
Required argument
- TITLE
Optional argument(s)
delete
Delete a molecule search query.
Usage
ocli molsearch query delete [OPTIONS] QUERY
Arguments
- QUERY
Required argument
download
Download molecule search results and query to separate local files.
Downloaded query file will be named <result_file_name>-query.<ext>
Usage
ocli molsearch query download [OPTIONS] QUERY FILE
Options
- --ids <ids>
Comma-separated list of result IDs to export.
- --exclude
Exclude ids from results.
Arguments
- QUERY
Required argument
- FILE
Required argument
export
Export search results to a dataset.
The optional --path will place the export output in
a non-default location, as with:
--path /project/<project-id>/user/<username>/<custom_path>/
if unset, this value defaults to: /project/<project-id>/user/<username>/
The optional --project will place the export output in
a non-default project, as with:
--project <project-id>
A list of currently-available projects can be found with:
ocli projects list
Usage
ocli molsearch query export [OPTIONS] QUERY
Options
- --path <path>
Orion path where exported dataset is placed
- --project <project>
- --name <name>
Name of output dataset.
- --format <format>
Output format.
- --background
Export in async mode?
- --ids <ids>
Comma-separated list of result IDs to export.
Arguments
- QUERY
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli molsearch query help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Information about a specific molecule search query.
Usage
ocli molsearch query info [OPTIONS] QUERY
Arguments
- QUERY
Required argument
list
List all molecule search queries.
Usage
ocli molsearch query list [OPTIONS]
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --query-type <query_type>
Type of query to list
- --project <project>
- --programmatic <programmatic>
Filter queries created by ocli (True), UI (False), or all queries (None)
list-results
List results for a single molecule search query.
Usage
ocli molsearch query list-results [OPTIONS] QUERY
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- QUERY
Required argument
smiles
Get SMILES string for the molecule with the given title.
Usage
ocli molsearch query smiles [OPTIONS] TITLE
Arguments
- TITLE
Required argument
update
Update a molecule search query.
Usage
ocli molsearch query update [OPTIONS] QUERY
Options
- --name <name>
Query name.
- --saved <saved>
Save query.
Arguments
- QUERY
Required argument
Token Commands
These commands are used to manage tokens.
ocli tokens
Orion token commands
A token is used to authenticate a client when communicating with Orion
Usage
ocli tokens [OPTIONS] COMMAND [ARGS]...
create
Create an Orion token
Usage
ocli tokens create [OPTIONS] DESCRIPTION
Arguments
- DESCRIPTION
Required argument
delete
Delete an Orion token
Usage
ocli tokens delete [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli tokens help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve an Orion token
A token is used to authenticate orionclient when communicating with Orion
Usage
ocli tokens info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List Orion tokens
This command will not display the value associated with the tokens
Usage
ocli tokens list [OPTIONS]
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
update
Update an Orion Token
Allows for modification of an Orion Token
Usage
ocli tokens update [OPTIONS] IDENTIFIER
Options
- -d, --description <description>
Arguments
- IDENTIFIER
Required argument
User Commands
These commands are used to manage users.
ocli users
Orion user commands
Provides information about Orion users within the same organization.
Usage
ocli users [OPTIONS] COMMAND [ARGS]...
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli users help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve information about an Orion user
Usage
ocli users info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List Orion users
Usage
ocli users list [OPTIONS] [FILTERS]...
Options
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
- --show-inactive
Include inactive users in output
Arguments
- FILTERS
Optional argument(s)
Scaling Group Commands
These commands are used to manage scaling groups.
ocli scaling-groups
Orion scaling group commands
Usage
ocli scaling-groups [OPTIONS] COMMAND [ARGS]...
list
List Orion Scaling Groups
Usage
ocli scaling-groups list [OPTIONS]
update
Update the allowed size, reserve, and various states of a scaling group.
The –gpu-only flag can be used to modify scaling group behavior. For AWS resources, this flag is set to TRUE by default and should not be changed, so that CPU jobs do not run on costly GPU instances. You can modify this to FALSE for CDNS groups to allow a mixture of CPU and GPU work.
Usage
ocli scaling-groups update [OPTIONS] GROUP
Options
- --max-size <max_size>
- --min-size <min_size>
- --min-reserve <min_reserve>
- --affinity <affinity>
- --state <state>
- --gpu-only <gpu_only>
Arguments
- GROUP
Required argument
Service Commands
Orion Services is a registry of internal and external services integrated within the larger Orion system.
Service Specifications
These commands create and manipulate service specifications.
ocli services spec
Specification of Orion Service.
Orion services is a registry of internal or external services integrated with the larger Orion system.
Usage
ocli services spec [OPTIONS] COMMAND [ARGS]...
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli services spec help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve an Orion service specification
Usage
ocli services spec info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List available specifications of Orion services
Usage
ocli services spec list [OPTIONS] [FILTERS]...
Options
- --name <name>
Filter by name
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
Service Tasks
These commands create and manipulate service tasks from service specifications.
ocli services task
Management of Orion Services.
Orion services is a registry of internal or external services integrated with the larger Orion system.
Usage
ocli services task [OPTIONS] COMMAND [ARGS]...
create
Create an Orion service
Usage
ocli services task create [OPTIONS]
Options
- --name <name>
- --description <description>
- --specification <specification>
- --external <external>
- --url <url>
delete
Delete an Orion service
Usage
ocli services task delete [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
help
Long format of help CMD, or the first level commands if CMD is not specified.
Usage
ocli services task help [OPTIONS] [CMD]...
Arguments
- CMD
Optional argument(s)
info
Retrieve an Orion service
Usage
ocli services task info [OPTIONS] IDENTIFIER
Arguments
- IDENTIFIER
Required argument
list
List Orion services
Usage
ocli services task list [OPTIONS] [FILTERS]...
Options
- --name <name>
Filter by name
- --offset <offset>
Offset from the start of the list
- --limit <limit>
Number of objects to list
Arguments
- FILTERS
Optional argument(s)
logs
Retrieve the logs of a service task
Usage
ocli services task logs [OPTIONS] IDENTIFIER
Options
- --from <from_dt>
start date for the logs
- --until <until>
end date for the logs
Arguments
- IDENTIFIER
Required argument
update
Update an Orion service
Usage
ocli services task update [OPTIONS] IDENTIFIER
Options
- --name <name>
- --description <description>
- --state <state>
Arguments
- IDENTIFIER
Required argument