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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file oak_build-0.1.1.post1.tar.gz.

File metadata

  • Download URL: oak_build-0.1.1.post1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for oak_build-0.1.1.post1.tar.gz
Algorithm Hash digest
SHA256 5b6adc0f6cccde37cfba724c28e681d5131e82fd982166475c04c9ffcac73599
MD5 35a82fc2dfc8dfe661e4420103e858ad
BLAKE2b-256 b02c3a6c344c463e0543c2e63726717a5805469e87fdea042aec501cb4164350

See more details on using hashes here.

File details

Details for the file oak_build-0.1.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for oak_build-0.1.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa715d48ad6a873c1e9abf3bdc045df1e30ef4f6a14be55a70578b09b80eb45
MD5 13b8d1900c2636473ab61f8873b141fd
BLAKE2b-256 3f1a62ba45252bcce01ed7c11ecc9cb8dfb469fd0bc14802ff688081ea5f71d9

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