Skip to main content

Smart Tests CLI

Project description

This is a CLI to interact with CloudBees Smart Tests.

Usage

See https://help.launchableinc.com/resources/cli-reference/ and https://help.launchableinc.com/sending-data-to-launchable/using-the-launchable-cli/getting-started/.

Development

Preparation

We recommend uv for dependency management:

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv sync --dev

In order to automatically format files with autopep8, this repository contains a configuration for pre-commit. Install the hook with uv run pre-commit install.

Load development environment

# Activate virtual environment
source .venv/bin/activate
# or use uv run for individual commands
uv run <command>

From this shell, run pip install -e . to create launchable wrapper script from the workspace. This is useful to test the CLI with real/local server.

Run tests cli

# Using poethepoet (recommended)
uv run poe test

# Direct command
uv run python -m unittest

Run tests exe_deploy.jar

bazel test ...

Available Development Tasks

This project uses poethepoet for task management. Available tasks:

# Show all available tasks
uv run poe --help

# Run tests
uv run poe test

# Run tests with XML output
uv run poe test-xml

# Run linting
uv run poe lint

# Run type checking
uv run poe type

# Format code
uv run poe format

# Build package
uv run poe build

# Install package locally
uv run poe install

Add dependency

# Add runtime dependency
uv add some-package

# Add development dependency
uv add --dev some-dev-package

Adding new command

smart_tests/args4p defines a small command line argument parsing framework for this CLI. See its README.md for the capabilities.

smart_tests/__main__.py defines the top level commands. Follow the code from there to see where sub-commands are registered.

Updating Python Version

When updating the Python version requirement, update the following files:

  1. .python-version - Used by pyenv, uv, and local development
  2. pyproject.toml - Update requires-python = ">=X.Y"
  3. setup.cfg - Update python_requires = >=X.Y
  4. .github/workflows/python-package.yml - Update python-version: ["X.Y"]
  5. .github/workflows/python-publish.yml - Update uv python install X.Y
  6. README.md - Update prerequisite section
  7. CLAUDE.md - Update development notes

How to release

Create new release on Github, then Github Actions automatically uploads the module to PyPI.

How to update bundled documentation

The product documentation lives in smart_tests/docs/ and is bundled into the distributed package. To pull in the latest from the docsite repository:

uv run poe update-docs

Users can extract the bundled docs to the current directory with:

smart-tests get docs

How to update smart_tests/jar/exe_deploy.jar

./build-java.sh

Installing CLI

You can install the smart-tests command from either source or pypi.

Prerequisite

  • >= Python 3.13
  • >= Java 8

Install from source

$ pwd
~/cli

$ python setup.py install

Install from pypi

$ pip3 install --user --upgrade smart-tests~=1.0

Versioning

This module follows Semantic versioning such as X.Y.Z.

  • Major (X)
    • Drastic update breaking backward compatibility
  • Minor (Y)
    • Add new plugins, options with backward compatibility
  • Patch (Z)-
    • Fix bugs or minor behaviors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart_tests_cli-2.6.0.tar.gz (31.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_tests_cli-2.6.0-py3-none-any.whl (31.6 MB view details)

Uploaded Python 3

File details

Details for the file smart_tests_cli-2.6.0.tar.gz.

File metadata

  • Download URL: smart_tests_cli-2.6.0.tar.gz
  • Upload date:
  • Size: 31.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for smart_tests_cli-2.6.0.tar.gz
Algorithm Hash digest
SHA256 08cec130dca5ae0ea1b89a228fe1b9a9aee7dd4472dfcb6dea53c0b66c9ea42b
MD5 f1880116b0101d99d77cf1081e28fb39
BLAKE2b-256 f55a3e4c8720536284a7e0bb093fa0039e8c3e0827e4d7b8fdc5545cdf4232d4

See more details on using hashes here.

File details

Details for the file smart_tests_cli-2.6.0-py3-none-any.whl.

File metadata

  • Download URL: smart_tests_cli-2.6.0-py3-none-any.whl
  • Upload date:
  • Size: 31.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for smart_tests_cli-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb459e81f02a8acfa51a29212fe0ac30c3c556b0e318ebddd1555b043106d1e
MD5 d56ba6289ad4aa70b156a813f3f6c59d
BLAKE2b-256 dfa74d299da7547f3dbf8815b9c912f4adf5bf41fb96cc27cbea60a478034eb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page