Skip to main content

Unimake is a set of development tools and frameworks for project maintaining. This tools makes it easy to organize development routines (such as building, testing, linting, running, etc)

Project description

Unimake

unimake is a set of development tools and frameworks for project maintaining. This tools makes it easy to organize development routines (such as building, testing, linting, running, etc) for a specific code base.

Goals

  • Allow gophers to use the full power of Python instead of makefiles and shell scripts.
  • Facilitate the task of product building consisting of several projects in different languages.
  • Provide the opportunity to develop debuggable project maintenance scripts.
  • Automate project maintenance routines.

Features

  • Convenient framework for a project description
  • Python is the only language for everything
  • Debuggable pipeline (unlike regular shell scripts)
  • Easiest way to create a powerful CLI (like make but more flexible)
  • Adapters for a commonly used build systems (go, cmake, ...)
  • Run project targets in remote environment (dev-container, remote server, etc)

How it works ?

Unimake provides the Python framework (umk), project commands runner tool (umk cli) and command line manager (unimake).

A specific project must contain at least 2 scripts:

  • .unimake/project.py - project info, build steps, etc.
  • .unimake/cli.py - command line interface to interact with project

umk tool allows you to execute a command from .unimake/cli.py

how-unimake-works

Script project.py

import umk 

class Project(umk.GoProject):  
    def __init__(self):  
        super().__init__()  
        self.git = umk.git()
        self.info.name.short = "project-name"
        self.info.name.full = "Project Name"
        self.info.version = umk.tag(self.git, "v1.0.0")
        self.info.authors = [
            umk.Author('Author Name', 'author.name@email.com')
        ]
        self.info.description = "Super puper mega description"  
        self.go = umk.Go.find("1.19")
        self.dlv = umk.Delve.find()
  
    async def build(self, mode: str):
        args = umk.GoBuildArgs.new(mode)  
        args.output = self.layout.output / 'foo'
        args.sources.append(self.layout.cmd / 'foo')
        args.flags.go.append('-mod=vendor')
        await self.go.build(args).asyn()
  
    def vendor(self):
        self.go.mod.tidy().sync()
        self.go.mod.vendor().sync()
  
    def debug(self, port=2345):
        self.dlv.exec(
            binary=self.layout.output / 'foo',
            flags=umk.DelveFlags(port)
        ).sync()
  
project = Project()

Script cli.py

from umk import cli  
from project import project  

@cli.cmd()
def vendor():  
    project.vendor()

@cli.cmd()
@cli.opt('--mode', default='debug', help='Build mode (debug|release)')
async def build(mode: str):
    await project.build(mode)

@cli.cmd(help="Run debug server (on port 2345 by default)")
@cli.opt('--port', type=int, default=2345)  
def debug(port: int):  
    project.debug(port)

Execute projects command

cd path/to/project/root
umk vendor
umk build
umk debug --port 3000

Installation

See installation instructions for more details.

Documentation

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

umk-0.0.3.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

umk-0.0.3-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file umk-0.0.3.tar.gz.

File metadata

  • Download URL: umk-0.0.3.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for umk-0.0.3.tar.gz
Algorithm Hash digest
SHA256 14fcf8433cf99297746fa809cb22b90ded469bf5933ba65e6674e046c4607a89
MD5 ada3c455bae14d31c55a9e189121754b
BLAKE2b-256 06797be6606345f6e0b3cbe9583d061f2107a6e332926e5ea29b54e63e3c2706

See more details on using hashes here.

File details

Details for the file umk-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: umk-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 37.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for umk-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 851754410740036ba3c499a277b61bcc1e5eb913085eeccc0f69d60498ab29dd
MD5 6db6404e34256b9648c0ce5482b74ffc
BLAKE2b-256 d02038e4ec65252875bc369a4e2076102de165fc7981becda1b8162dd338b292

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