-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c78618
commit 73009ce
Showing
12 changed files
with
172 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,4 +115,7 @@ ENV/ | |
*.logging | ||
|
||
# ARM emulator | ||
qemu-arm-static | ||
qemu-arm-static | ||
|
||
# Artifacts | ||
requirements.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
from invoke import Collection, task | ||
from invoke import Collection | ||
|
||
from tasks import ( | ||
build, | ||
config, | ||
docker, | ||
docs, | ||
linting, | ||
release, | ||
testing | ||
) | ||
from tasks.config import VERSION | ||
|
||
|
||
@task | ||
def version(ctx): | ||
print(VERSION) | ||
|
||
|
||
ns = Collection() | ||
|
||
config = Collection.from_module(config, name="config") | ||
docker = Collection.from_module(docker, name="docker") | ||
docs = Collection.from_module(docs, name="docs") | ||
linting = Collection.from_module(linting, name="lint") | ||
release = Collection.from_module(release, name="release") | ||
testing = Collection.from_module(testing, name="test") | ||
|
||
# Subtasks | ||
ns.add_collection(config) | ||
ns.add_collection(docker) | ||
ns.add_collection(docs) | ||
ns.add_collection(linting) | ||
ns.add_collection(release) | ||
ns.add_collection(testing) | ||
|
||
# Tasks | ||
ns.add_task(version) | ||
ns.add_task(build.version) | ||
ns.add_task(build.clean) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from invoke import task | ||
|
||
from tasks.config import VERSION | ||
|
||
|
||
@task | ||
def version(ctx): | ||
"""Show the current version.""" | ||
print(VERSION) | ||
|
||
|
||
@task | ||
def clean(ctx): | ||
"""Removes python build artifacts (*.pyc, *.pyo, caches, ...)""" | ||
ctx.run( | ||
"find . -type f -name '*.pyc' -delete && " | ||
"find . -type f -name '*.pyo' -delete && " | ||
"rm -rf .pytest_cache && " | ||
"rm -rf .mypy_cache" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import os | ||
|
||
from invoke import task | ||
|
||
# VERSION | ||
VERSION = "0.22.0" | ||
|
||
# PROJECT ROOT | ||
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | ||
|
||
# PATH STUFF | ||
CONFIGS_PATH = os.path.join(PROJECT_ROOT, 'config') | ||
DOCS_PATH = os.path.join(PROJECT_ROOT, 'docs') | ||
SCRIPTS_PATH = os.path.join(PROJECT_ROOT, 'scripts') | ||
SOURCE_PATH = os.path.join(PROJECT_ROOT, 'pnp') | ||
TASKS_PATH = os.path.join(PROJECT_ROOT, 'tasks') | ||
TEST_PATH = os.path.join(PROJECT_ROOT, 'tests') | ||
PROJECT_ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | ||
CONFIGS_PATH = os.path.join(PROJECT_ROOT_PATH, 'config') | ||
DOCS_PATH = os.path.join(PROJECT_ROOT_PATH, 'docs') | ||
SCRIPTS_PATH = os.path.join(PROJECT_ROOT_PATH, 'scripts') | ||
SOURCE_PATH = os.path.join(PROJECT_ROOT_PATH, 'pnp') | ||
TASKS_PATH = os.path.join(PROJECT_ROOT_PATH, 'tasks') | ||
TEST_PATH = os.path.join(PROJECT_ROOT_PATH, 'tests') | ||
|
||
|
||
# DOCKER STUFF | ||
LOCAL_IMAGE_NAME = 'pnp' | ||
LOCAL_IMAGE_TAG = 'local' | ||
ARM_SUFFIX_TAG = 'arm' | ||
PUBLIC_IMAGE_NAME = 'hazard/pnp' | ||
@task(default=True) | ||
def config(ctx): | ||
"""Shows the general configuration.""" | ||
for k, v in globals().items(): | ||
if k.endswith("_PATH"): | ||
print(k.ljust(20), v) |
Oops, something went wrong.