Skip to main content

Command line automation tool in pure Python

Project description

Detox jar

Detox jar

Python 3.x PyPI Downloads


Command line automation tool in pure Python


How to use

  • Describe jobs as tables/dictionaries in a config file called 'detox' (choose between .toml, .yaml or .json format).
    (Put the config inside the root directory of your project)
# detox.toml
[test]
description = "test project"
dependencies = ["pytest", "pytest-cov"]
commands = "pytest -vv --disable-warnings -s --cache-clear"
# detox.yaml
test:
  description: test project
  dependencies:
    - pytest
    - pytest-cov
  commands:
    - pytest -vv --disable-warnings -s --cache-clear
  • description and dependencies could be optional but not commands
# detox.toml
[no-deps]
commands = "echo 'Hello world'"

(in json)

"no-deps": {
  "commands": "echo 'Hello world'"
}
  • dependencies and commands could be strings or (in case of more than one) a list of strings
# detox.toml
commands = ["ruff check --fix", "ruff format --line-length=100 ."]
# detox.yaml
commands:
  - ruff check --fix
  - ruff format --line-length=100 .
  • You could provide a [run] table inside the config file with a 'suite' - list of selected jobs to run
[run]
suite = ["lint", "format", "test"]
"run": {
  "suite": [
    "lint",
    "format",
    "test",
    "no-deps"
  ]
}

  • Run the tool in the terminal with a simple 'detox' command
$ detox
(logs omitted...)
$ All jobs succeeded! ['lint', 'format', 'test']
Detoxing took: 14.088007061000098
  • In case of failing jobs you get general stats
(logs omitted...)
$ Unsuccessful detoxing took: 13.532951637999759
Failed jobs: ['format']
Successful jobs: ['lint', 'test']

or

$ Unsuccessful detoxing took: 8.48367640699962
Failed jobs: ['format']
Successful jobs: ['lint']
Skipped jobs: ['test']

  • You could run specific jobs in the command line
$ detox -j lint

or a list of jobs

$ detox -j lint format

NB: If there is a 'run' table in the config file the jobs specified in the command line take precedence

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

detox_jar-1.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

detox_jar-1.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file detox_jar-1.1.0.tar.gz.

File metadata

  • Download URL: detox_jar-1.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for detox_jar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9682fcb96b620f1ac16eddeabc2c3b9403348d9720c5ded7aaf66a8e53007211
MD5 702a58ee545bb22013150c1d27006dbf
BLAKE2b-256 06e6c9c4a82531e8b9908319f78125b441c6ee3187c613d1b82880f531c905a6

See more details on using hashes here.

File details

Details for the file detox_jar-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: detox_jar-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for detox_jar-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0df16b23d4efa2cb593705960ecefa8d645f633291bcf257d11ad3f131fd9ca3
MD5 bffbe9e964fbba68f80c21898566f411
BLAKE2b-256 058658c52d8ad67f98a645a95f617fff26b0fb5899cb97dbb260c4529d8d36a6

See more details on using hashes here.

Supported by

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