Skip to main content

a tool to chain tools into toolchains

Project description

chaintool is a GPLv3-licensed tool to manage certain kinds of “toolchain” usecases that require executing a sequence of commandlines.

This is not a replacement for a build system, but rather an alternative to creating one-off scripts for usecases that fit the following characteristics:

  • A fixed sequence of command invocations. The sequence may terminate on error, but otherwise the commandlines to invoke are not affected by the output of previous commands.

  • The commands accept a large variety of command-line arguments, and many of those are being used. Some of these arguments will very rarely be changed. Some of these might occasionally be changed but should have sensible defaults. Some will be changed frequently, perhaps even from run to run.

  • For correct usage, certain arguments across different commands must be supplied with the same value, or with related values (e.g. options that reference the same file basename but with different extensions).

chaintool provides a way to define and manage that sequence of commandlines, and generate a “shortcut” script that will run it. The arguments you care about surfacing will be available as command-line options for this shortcut, and will flow down to generate the correct arguments for the relevant commands in the sequence.

Obviously, you could instead just manually author a script that contains the command invocations. But using chaintool helps you generate a variation on a sequence, or run an existing sequence with different arguments, in a quick and more error-free way. You don’t have to dig through any of the arguments you don’t currently care about, you don’t run the risk of forgetting to edit some commandline as you change occurrences of a common value, you won’t break anything with a copy-and-paste error or accidental deletion, and you won’t have to remember the specific syntax for options that you need to flip between excluding/including.

If you’re using the bash shell, another major benefit from chaintool is that the shortcuts you create will have full autocompletion support, for the options that you have defined and chosen to surface.

chaintool also helps export definitions for these command sequences that are fairly portable. If there are paths or argument values that are specific to a particular OS, or to a particular user’s environment, those values can be left as required parameters that an importer must fill in before running the sequence.

Documentation

XXX Eventually need a link here to the relevant readthedocs page.

Changelog

  • 0.1.1 (2021-04-22)

    • Some metadata fixes.

  • 0.1.0 (2021-04-22)

    • Initial build and upload to PyPI.

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

chaintool-0.2.0.tar.gz (62.4 kB view details)

Uploaded Source

Built Distribution

chaintool-0.2.0-py3-none-any.whl (74.6 kB view details)

Uploaded Python 3

File details

Details for the file chaintool-0.2.0.tar.gz.

File metadata

  • Download URL: chaintool-0.2.0.tar.gz
  • Upload date:
  • Size: 62.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for chaintool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 caa8e930e463a230c8f7512176377e898ea463311dc09426252ee939f666b1e6
MD5 f60dc62ddea8c38a3bfc2a2664a722b2
BLAKE2b-256 ec8f1ddf9d6e94957793b42fd5edd1e73a1a38e1064822db664d74da68165bbf

See more details on using hashes here.

File details

Details for the file chaintool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: chaintool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 74.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for chaintool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f3f815f148d305dfa4be1b06323463d266fdc65d53f86c282bb7d6921554912
MD5 f1936368bd24e046331502b78ca27794
BLAKE2b-256 c6c45d440c9d650d8c1f35a714c00d7171d10b17edf28084c9de5ae74999342b

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