Skip to main content

Simplify the usage of containers

Project description

MakIm

MakIm or just makim is based on make and focus on improve the way to define targets and dependencies. Instead of using the Makefile format, it uses yaml format.

The idea of this project is to offer a way to define targets 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 target.

Features

  • Help text as first-class in the .makim.yaml specification. It can be used by targets and arguments.
  • Targets have an option for arguments.
  • Targets have an option for dependencies.
  • Dependencies can call a target with specific arguments.
  • Dependencies can have a conditional control flow (if).
  • Allow the creation of groups, so the targets can be organized by topics.
  • Targets 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:
  - name: default
    env-file: .env
    targets:
      clean:
        help: Use this target 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:
          - target: 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 target: makim build

  • run the clean target: makim clean

  • run the build target 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] [target]

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

positional arguments:
  target
    Specify the target command to be performed.
    Options are:
      default.clean => Use this target 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.
    NOTE: 'default.' prefix is optional.

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.8.1.tar.gz (98.8 kB view details)

Uploaded Source

Built Distribution

makim-1.8.1-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: makim-1.8.1.tar.gz
  • Upload date:
  • Size: 98.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.8.1 Linux/5.15.0-1037-azure

File hashes

Hashes for makim-1.8.1.tar.gz
Algorithm Hash digest
SHA256 637a0bfe05c4ad94902e7f56611c3a502c7d89666c761185897a199064b1d9b0
MD5 972671cdd26cd9b2835866c127837d83
BLAKE2b-256 d38079343793697068b0ee8e9f6da3c98bd49cfe4ddc2c59933750172ce9c967

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: makim-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 64.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.8.1 Linux/5.15.0-1037-azure

File hashes

Hashes for makim-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e74c74028a5f6db3fe839ec4f6f53d62cb9384a151673d944175e7d827ef8d27
MD5 54ca6272c4f13e001f45be0599b65e69
BLAKE2b-256 02677b05916de4f4e33141dce500037f0473a20a1dd4dbad89a58940a175f0e0

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