ts-cli
Tetrascience CLI
Table of Contents
Show
Intro
ts-cli allows you to interface with the Tetrascience Data Platform from the comfort of your shell
Example
Create and publish a new task script:
ts-cli config save ~/Downloads/ts-cfg.json
ts-cli init task-script
ts-cli publish
Install
pip install tetrascience-cli
Usage
Create an artifact
Create an IDS, Protocol, Task Script, Tetraflow, or Data App artifact
ts-cli init <kind>
To set up the artifact's configuration interactively, use the --interactive or -i flag.
ts-cli init --interactive
Publish an artifact
Including IDS, Protocol, Task Script, or Data App artifacts from their source code
ts-cli publish
The artifact's type, namespace, slug and version are automatically read from its manifest.json
file if it exists.
To set up the artifact's configuration interactively, use the --interative or -i flag. Examples:
ts-cli publish --interactive
API Configuration
An API configuration is required.
This can be the API configuration JSON file (cfg.json) found on the Tetra Data Platform.
{
"api_url": "https://api.tetrascience.com/v1",
"auth_token": "your-token",
"org": "your-org",
"ignore_ssl": false
}
This configuration can be referred to explicitly in the command line. Example:
ts-cli publish --config cfg.json
Or saved to a specific profile.
ts-cli config save cfg.json --profile dev
ts-cli publish --profile dev
To apply the API configuration to all your projects automatically, save your configuration file globally
ts-cli config save cfg.json --global
ts-cli publish
IDS Validation
When uploading IDS artifact, validation will be performed using ts-ids-validator package.
Validation failures for IDS will be printed to the console.
Extras
Protocol Validation
The ts-cli can additionally run protocol v3 validation.
Requirements
npmat the time of installation to populate dependencies. NeithernpmnorNode.jswill be used at runtime
Installation
pip install tetrascience-cli[protocol-validation]
Documentation
Click here for --help and a development guide
Changelog
Show
v3.0.0
- Properly catch invalid JSON/YAML/TOML on disk
- Migrate templates to cookiecutter
- Removed
--preserve-templatesflag ininitcommand - Strip prerelease suffix from artifact contents
- Bump the protocol validation extra dependency
- Now allows prerelease strings in v3 protocols
v2.1.0
- Add support for publishing
ai-workflowartifacts
v2.0.0
--includeand--excludeflags take glob patterns instead of relative file pathspublishcommand will now read from manifest.json forincludeandexcludepatterns- Coerce version number string inputs instead of rejecting them when possible
- Data-app templates now use version numbers in more places
- pyproject.toml and package.json files in data-apps now will be updated with the current version number when publishing
- Artifact updating configuration may now look at a package.json file for a version number
- Add JWT token manager to React Data App template
- Add Docs folder to React Data App template
- Performance fixes in
publishcommand
v1.7.1
- Add
connectorback to the supported types inpublishandunpublish - Various fixes in
ts-cli config * - Add
--configoption tots-cli config getto allow reading values out of a config file - Allow prerelease version strings in interactive configurations
v1.7.0
- Add support for React Data App template
- Support protocol validation when using interactive mode to publish
- Remove limits on publishing data-apps and connectors
v1.6.1
- Add validation for artifact version in interactive mode
v1.6.0
- Add support for new
schemaartifact type
v1.5.2
- Increase artifact size for connectors and data apps to 2 GB
- Add verbose flag to the publish command
- Add URL normalization for API configuration
- Update base image for Streamlit Data Apps
v1.5.1
- Fix encoding issues when publishing data apps
v1.5.0
- Add support for publishing Streamlit Data Apps from a template
v1.4.2
- update tetraflow template to reflect the latest syntax updates
- adjust files and dirs permissions to ensure lambda user can access all task files
- fix ts-cli init protocol for 3.5 deployments
v1.4.1
- update to the latest protocol compiler version
v1.4.0
- typecheck protocols during publish validation using the protocol virtual machine compiler
v1.3.4
- exclude betas and RCs from latest version check
v1.3.3
- update vulnerable dependencies
- update documentation
v1.3.2
- fix output of monitored build when no args provided (build from the artifact directory)
v1.3.1
- output {namespace, slug, version} when monitored build (via CodeBuild) completes
v1.3.0
- Rename the
deletecommand tounpublish - Display the number of other artifacts that depend on artifact that is to be unpublished
- Example:
warning: This protocol artifact is used by at least 1 pipeline
- Example:
v1.2.0
- Allow publishing of connectors artifacts
v1.1.0
- Adjust publish to support Codebuild build_id in response for all artifact types
v1.0.5
- Fix incorrect messages to console when using
ts-cli init --interactive
v1.0.4
- Add a
deletecommand - Remove extra
<unset>strings in task script configurations
v1.0.3
- Rename the
nodeTypefield tocategoryin the tetraflow template - Fix a crash on
ts-cli config {save,set} - Fix broken IDS schemas generated from non-existent manifest.json
v1.0.2
- Adds the dry-run flag to the
publishcli
v1.0.1
- Fix a crash on startup
v1.0.0
- Initial release
- Includes the
init,publishandconfigcommands
Metadata
Release files for tetrascience-cli 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tetrascience_cli-3.0.0.tar.gz | 30.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tetrascience_cli-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.4 kB
Release files / tetrascience_cli-3.0.0.tar.gz
| Download URL | tetrascience_cli-3.0.0.tar.gz |
|---|---|
| Size | 30.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50433a055b2ca1ab9b9ba5f71237198cef10c6a83bcc94ac43e3bdb4418d0543
|
|
BLAKE2b-256 checksum How to use checksums |
a68ed1b1b2c56d4798122e5e64a16f6c25ab5e6c8b1effdbe6cdd804f8aa8629
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Release files / tetrascience_cli-3.0.0-py3-none-any.whl
| Download URL | tetrascience_cli-3.0.0-py3-none-any.whl |
|---|---|
| Size | 40.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54caf5b0bf5b1547205985d2da023b14ad46a08c1d07cdde6c6aba5c082a0396
|
|
BLAKE2b-256 checksum How to use checksums |
cb0ebbbafe80e622eb585b56a834d7aac3d32626c2c0105a9399005897c5a4cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|