Skip to main content

Makim

CI Python Versions Package Version License Discord

Makim is inspired by tools like Make and Ansible, focusing on improving task definition and dependency management. Instead of using the Makefile format, it utilizes YAML for defining tasks.


Features

  • Help Text as First-Class: Add detailed help text to tasks and arguments for clear documentation.
  • Task Arguments: Define and manage arguments with types, defaults, and descriptions.
  • Dependencies with Conditional Control: Set task dependencies with if conditionals to manage execution dynamically.
  • Environment Variables: Scope variables globally, by group, or by task to reduce redundancy and maintain modularity.
  • Jinja2 Templating: Access arguments, variables, or environment variables via Jinja2 templates.
  • Matrix Configuration: Automate tasks across multiple parameter combinations (ideal for CI/CD workflows).
  • Hooks: Use pre-run and post-run hooks to customize task lifecycles.
  • Scheduler: Cron-like scheduling with APScheduler integration for periodic tasks.
  • Remote Execution: Execute tasks on remote servers via SSH with flexible configurations.
  • File Logging: Log outputs to files with custom formatting and stream control.
  • Retry Mechanism: Adds resilience by retrying tasks that encounter errors.
  • Validation: Ensures .makim.yaml configurations are correct with schema validation.

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:

groups:
  build:
    env:
      GROUP_ENV: group_value
    tasks:
      clean:
        help: Clean build artifacts
        args:
          cache:
            type: bool
            action: store_true
            help: Remove all cache files
        log:
          path: ./logs/clean.txt
          level: err
          format: "%(asctime)s - %(file)s - %(levelname)s - %(message)s"
        run: |
          echo "Cleaning build directory..."
          rm -rf build/
      compile:
        help: Compile the project
        hooks:
          pre-run:
            - task: build.clean # Run 'clean' before 'compile'
        run: |
          echo "Compiling the project..."

# Scheduler for automated tasks
scheduler:
  daily-clean:
    task: build.clean
    schedule: "0 0 * * *" # Every day at midnight

Some examples of how to use it:

  • run the compile task: makim build.compile

  • run the clean task with argument: makim build.clean --cache

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

$ makim --help

 Usage: makim [OPTIONS] COMMAND [ARGS]...

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

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --version             -v            Show the version and exit                │
│ --file                        TEXT  Makim config file [default: .makim.yaml] │
│ --dry-run                           Execute the command in dry mode          │
│ --verbose                           Execute the command in verbose mode      │
│ --skip-hooks                        Skip hooks while executing the command   │
│ --install-completion                Install completion for the current       │
│                                     shell.                                   │
│ --show-completion                   Show completion for the current shell,   │
│                                     to copy it or customize the              │
│                                     installation.                            │
│ --help                              Show this message and exit.              │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ build ──────────────────────────────────────────────────────────────────────╮
│ build.clean                         Clean build artifacts                    │
│ build.compile                       Compile the project                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Extensions ─────────────────────────────────────────────────────────────────╮
│ cron                                Tasks Scheduler                          │
╰──────────────────────────────────────────────────────────────────────────────╯

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

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

Playground

Experience makim directly in your browser using Google Colab! Google Colab is an online platform that allows you to write, run, and share Python code through your browser. It is especially useful for machine learning, data analysis, and education.

To try makim, simply click the following link, make a copy of the notebook to your drive, and then you can modify and execute the code as needed:

Experiment with makim on Google Colab

Metadata

Release files for makim 1.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for makim 1.29.0
File Size Uploaded
makim-1.29.0.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for makim 1.29.0
File Interpreter ABI Platform
makim-1.29.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.8 kB

Release files / makim-1.29.0.tar.gz

Download URL makim-1.29.0.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
92575a8087be6788d354e8a8bcc9c6e02b4219ebe2e612df1cc1827b2266ee22
BLAKE2b-256 checksum
How to use checksums
868c6215ee5827afd34f2ff695a2ae6f2f34ee37b83ffd4748f298164300de4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.1 CPython/3.11.14 Linux/6.11.0-1018-azure

Release files / makim-1.29.0-py3-none-any.whl

Download URL makim-1.29.0-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a73a105401d9f5210b890e8543c44517f9a0f8a85031a0cb1c3c6f4b88d8926
BLAKE2b-256 checksum
How to use checksums
a6f62c837052b3d5ec69aca1ab8e72a3cd1d2d73e092c6b3a25d0b88ba247a79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.1 CPython/3.11.14 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

1.29.0 This release

2 release files

1.28.0

2 release files

1.26.3

2 release files

1.26.2

2 release files

1.23.1

2 release files

1.23.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.19.0

2 release files

1.18.1

2 release files

1.18.0

2 release files

1.16.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.2

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page