Skip to main content

Simplify the usage of containers

Project description

Get Started

Makim (or makim) is based on make and focus on improve the way to define tasks and dependencies. Instead of using the Makefile format, it uses yaml format.

The idea of this project is to offer a way to define tasks and dependencies with some control options, like conditionals if.

It allows a very easy way to define texts for documentation and extra parameters for each task.

Features

  • Help text as first-class in the .makim.yaml specification. It can be used by tasks and arguments.
  • Tasks have an option for arguments.
  • Tasks have an option for dependencies.
  • Dependencies can call a task with specific arguments.
  • Dependencies can have a conditional control flow (if).
  • Allow the creation of groups, so the tasks can be organized by topics.
  • Tasks and groups have an option for user defined variables and/or environment variables.
  • Access arguments, variables or environment variables via template (using Jinja2).
  • Option for using dot environment files using env-file key.

How to use it

First you need to place the config file .makim.yaml in the root of your project. This is an example of a configuration file:

version: 1.0.0
groups:
  default:
    env-file: .env
    tasks:
      clean:
        help: Use this task to clean up temporary files
        args:
          all:
            type: bool
            action: store_true
            help: Remove all files that are tracked by git
        run: |
          echo "remove file X"
      build:
        help: Build the program
        args:
          clean:
            type: bool
            action: store_true
            help: if not set, the clean dependency will not be triggered.
        dependencies:
          - task: clean
            if: {% raw %}${{ args.clean == true }}{% endraw %}
        run: |
          echo "build file x"
          echo "build file y"
          echo "build file z"

Some examples of how to use it:

  • run the build task: makim build

  • run the clean task: makim clean

  • run the build task with the clean flag: makim build --clean

The help menu for the .makim.yaml file would looks like this:

$ makim --help
usage: MakIm [--help] [--version] [--config-file MAKIM_FILE] [task]

MakIm is a tool that helps you to organize and simplify your helper commands.

positional arguments:
  task
    Specify the task command to be performed. Options are:

    default:
    --------
      default.clean => Use this task to clean up temporary files
        ARGS:
          --all: (bool) Remove all files that are tracked by git
      default.build => Build the program
        ARGS:
          --clean: (bool) if not set, the clean dependency will not be triggered.

options:
  --help, -h
    Show the help menu
  --version
    Show the version of the installed MakIm tool.
  --config-file MAKIM_FILE
    Specify a custom location for the config file.

If you have any problem, open an issue at: https://github.com/osl-incubator/makim

As you can see, the help menu automatically adds information defined by all the help key, inside the .makim.yaml file.

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

makim-1.20.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

makim-1.20.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file makim-1.20.0.tar.gz.

File metadata

  • Download URL: makim-1.20.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure

File hashes

Hashes for makim-1.20.0.tar.gz
Algorithm Hash digest
SHA256 3f1ca5b6653225d86870e9f714de89b29c22ceec1e23f3da82167eb03c7300e4
MD5 6fa6c95ce7b5eb7d4f7e66a3e34e32dc
BLAKE2b-256 4523c68624d6f0a4dd405a8d8619829db2e70b55a4aa6dc98349aacf7ac9a309

See more details on using hashes here.

Provenance

File details

Details for the file makim-1.20.0-py3-none-any.whl.

File metadata

  • Download URL: makim-1.20.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/6.5.0-1025-azure

File hashes

Hashes for makim-1.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e928989b47509fd34fcafda053513eacc35df7826e3465f6761ed058c3a877d
MD5 9e812e3c3562595da5788a77e17b4dd6
BLAKE2b-256 07351bdaea8b572e7833bc043f7bf1d742c4f89ad98d36091cba705072d4f9b9

See more details on using hashes here.

Provenance

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