Skip to main content

No project description provided

Project description

oak-build

A make-like build system written on python

How to use

Create oak_build.py file in your project directory. Every method marked with @task decorator can be called from CLI.

from pathlib import Path

from oak_build import task


@task
def create_file():
    with open(Path("result.txt"), "w") as txt:
        txt.write("test content\n")

To execute create_file task call oak create_file from console.

Task dependencies

You can link dependent tasks with depends_on parameter.

from oak_build import task, run


@task
def unit_tests():
    run("poetry run pytest tests")


@task
def integration_tests():
    run("poetry run pytest integration_tests")


@task(
    depends_on=[
        unit_tests,
        integration_tests,
    ]
)
def tests():
    pass

When oak tests is called oak build will execute unit_tests and integration_tests tasks as well.

Examples

For examples see integration tests files and self build oak_file.py.

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

oak_build-0.1.1.post1.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

oak_build-0.1.1.post1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

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