Skip to main content

Job runner for multifaceted projects

Project description

Multi-job

Job runner for multifaceted projects

Status

Source Shields
Project license release
Publishers pypi
Downloads pypi_downloads
Raised issues pulls

Motivation

Configuring scripts to run accross multiple directories should be as easy as writting a yaml file:

jobs:
  lint:
    command: "prettier ."
    targets: "all"

projects:
  app:
    path: "./app"

  server:
    path: "./server"

Moreover it should be easy to configure default arguments per job and project, allow jobs to specify to skip projects let python functions be used for jobs and allow routines of jobs to be defined:

jobs:
  lint:
    command: "prettier . --ignore-path <linter-regex>"
    context:
      linter-regex: "*.ts"
  format:
    function: "./server/management:main"
    skips:
      - "app"

projects:
  app:
    path: "app/src"
    context:
      linter-regex: "*.js"

  server:
    path: "server/src"

routines:
  dev:
    - lint
    - format

Finally automatic cli generation tools shouldn't need separate configuration

$ multi-job src/config.yml

Usage:
    multi-job <config_path> [options] lint [<linter-regex>]
    multi-job <config_path> [options] format
    multi-job <config_path> [options] dev
$ multi-job src/config.yml lint --check

⚡ Multi Job ⚡
Plan:
Job: lint, project: Local
$ multi-job src/config.yml lint --check --verbose

⚡ Multi Job ⚡
Plan:
['prettier', '.', '--ignore-path', '']

Installing

Install from pypi:

pip install multi-job

Running tests

Tests are not included in the package build. Clone the repo to include all the source files.

To invoke tests:

python setup.py test

What is being tested

Multi-job is behaviour driven. Every desired behaviour and every validation rule has a test.

Docs

Docs are not included in the package build. Clone the repo to include all the source files.

Full documentation can be generated locally:

python setup.py docs

To view the generated docs visit ./build/sphinx/html/multi_job/docs/modules.html:

open -a "Google Chrome" ./build/sphinx/html/multi_job/docs/modules.html

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Bumpversion is used to version and tag changes. For example:

bumpversion patch

Releases are made on every major change.

Author

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file. for details

Acknowledgments

None yet!

Project details


Download files

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

Files for multi-job, version 0.10.4
Filename, size File type Python version Upload date Hashes
Filename, size multi_job-0.10.4-py3-none-any.whl (20.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size multi-job-0.10.4.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page