Skip to main content

Command file for scientific workflows.

Reason this release was yanked:

Manual upload

Project description

Commandfile

PyPI version Build status Coverage Status License

Purpose and scope

Commandfile defines a file format to pass arguments and runtime metadata to executables. Its intended use case is to simplify and harmonize the calling convention of scientific modules in the LISA Scientific Ground Segment.

Usage

This project provides a drop-in replacement for the ArgumentParser provided by argparse.

# example.py
from commandfile.argparse import CommandfileArgumentParser as ArgumentParser

parser = ArgumentParser()
parser.add_argument("--some-value", type=int, required=True)
args = parser.parse_args()
print(args.some_value)

When using this parser, your program can either be executed by passing arguments on the command-line, or by providing a single --commandfile argument compliant with the file format specification. When developing locally, both approaches can be combined, the command-line arguments overriding the arguments specified in the commandfile.

$ cat example-cmdfile.yaml
header:
  version: 1.21.4
parameters:
  - key: some-value
    value: '42'
inputs: []
outputs: []
$ example.py --commandfile example-cmdfile.yaml
42
$ example.py --commandfile example-cmdfile.yaml --some-value 24
24

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

commandfile-0.1.0.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

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

commandfile-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file commandfile-0.1.0.tar.gz.

File metadata

  • Download URL: commandfile-0.1.0.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for commandfile-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48fa9680b95a233311568e202b255cb4dc23592d3c9a5c62b5c6857168f4ed42
MD5 dbef354050e7b2df74cfd723a70a355a
BLAKE2b-256 9ffd35ecf7683e4399333149e07a6f27b17d3bf765dc56b37760f6716431283c

See more details on using hashes here.

File details

Details for the file commandfile-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for commandfile-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9a37f5a9a251d11d2e71f6fab2479e08a0080878d11a42dc547870aa9919838
MD5 3d43fff1b977adcf98427c27c71b9009
BLAKE2b-256 a01f1b549b741c9f4266f5e9932cd76bf8f7872f563fc8f778ee27598241ed45

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