Task executor - balance between Makefile and Gradle.
Project description
Task executor - balance between Makefile and Gradle.
THIS PROJECT IS A WORK IN PROGRESS.
Goals: - Define tasks as simple as in Makefile - Reuse code as simple as in Gradle (using extensions that provides tasks. Extensions are installable from PIP) - Simple configuration in Python
Rules
No hooks eg. task.executeAfter(otherTask), no complex dependencies
No dynamic tasks names eg. by turning on Publish component it should not create tasks eg. :publishIWAToDockerRegistry (where IWA is the project name)
Usage in shell
Tasks are prefixed always with “:”. Each task can handle it’s own arguments.
Tasks arguments usage
makefile.py
from rkd.syntax import TaskDeclaration, TaskAliasDeclaration
from rkd.standardlib.python import PyPublishTask
IMPORTS = [
TaskDeclaration(PyPublishTask())
]
TASKS = [
TaskAliasDeclaration(':my:test', [':py:publish', '--username=...', '--password=...'])
]
Example of calling same task twice, but with different input
Notes for this example: The “username” parameter is a default defined in makefile.py in this case.
$ rkd :my:test --password=first :my:test --password=second
>> Executing :py:publish
Publishing
{'username': '...', 'password': 'first'}
>> Executing :py:publish
Publishing
{'username': '...', 'password': 'second'}
Example of calling same task twice, with no extra arguments
In this example the argument values “…” are taken from makefile.py
$ rkd :my:test :my:test
>> Executing :py:publish
Publishing
{'username': '...', 'password': '...'}
>> Executing :py:publish
Publishing
{'username': '...', 'password': '...'}
Example of –help per command:
$ rkd :env:test :env:test --help
usage: :py:publish [-h] [--username USERNAME] [--password PASSWORD]
optional arguments:
-h, --help show this help message and exit
--username USERNAME Username
--password PASSWORD Password
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rkd-0.0.1.dev22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc2b698f7f56a101449fc9cef36961014bcb785a3affcf029857390f00a7f25b |
|
MD5 | 011177381c6f745f1d23a5ab56895dc1 |
|
BLAKE2b-256 | cc75485f258550eae3975b803ccab3b3769da33c5446a16080c4e93820d369f6 |