-
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
7a3dc2d
commit 3c78618
Showing
8 changed files
with
51 additions
and
66 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
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
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,23 +1,31 @@ | ||
from invoke import Collection, task | ||
|
||
from tasks import docker | ||
from tasks import linting | ||
from tasks import testing | ||
from tasks import ( | ||
docker, | ||
docs, | ||
linting, | ||
testing | ||
) | ||
from tasks.config import VERSION | ||
|
||
ns = Collection() | ||
|
||
docker = Collection.from_module(docker, name="docker") | ||
linting = Collection.from_module(linting, name="lint") | ||
testing = Collection.from_module(testing, name="test") | ||
|
||
|
||
@task | ||
def version(ctx): | ||
print(VERSION) | ||
|
||
|
||
ns = Collection() | ||
|
||
docker = Collection.from_module(docker, name="docker") | ||
docs = Collection.from_module(docs, name="docs") | ||
linting = Collection.from_module(linting, name="lint") | ||
testing = Collection.from_module(testing, name="test") | ||
|
||
# Subtasks | ||
ns.add_collection(docker) | ||
ns.add_collection(docs) | ||
ns.add_collection(linting) | ||
ns.add_collection(testing) | ||
|
||
# Tasks | ||
ns.add_task(version) |
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
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,30 @@ | ||
import glob | ||
import os | ||
|
||
import MarkdownPP | ||
from invoke import task | ||
|
||
|
||
def process_directory(directory): | ||
for file_path in glob.iglob(os.path.join(directory, '**/*.mdpp'), recursive=True): | ||
process_file(file_path) | ||
|
||
|
||
def process_file(file_path): | ||
modules = MarkdownPP.modules.keys() | ||
with open(file_path, 'r') as mdpp: | ||
# Output file takes filename from input file but has .md extension | ||
with open(os.path.splitext(file_path)[0] + '.md', 'w') as md: | ||
MarkdownPP.MarkdownPP(input=mdpp, output=md, modules=modules) | ||
|
||
|
||
@task(default=True) | ||
def docs(ctx): | ||
"""Creates the markdown documentation.""" | ||
process_directory('docs/plugins/pull') | ||
process_directory('docs/plugins/push') | ||
process_directory('docs/plugins/udf') | ||
process_file('docs/plugins/README.mdpp') | ||
process_file('docs/engines/README.mdpp') | ||
process_file('docs/README.mdpp') | ||
process_file('README.mdpp') |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
CONFIGS_PATH, | ||
DOCS_PATH, | ||
SCRIPTS_PATH, | ||
SOURCE_PATH, | ||
SOURCE_PATH | ||
) | ||
|
||
|
||
|
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,23 +0,0 @@ | ||
# next-version: lint test-configs test | ||
# $(eval NEXT_VERSION := $(shell bumpversion --dry-run --allow-dirty --list $(VERSION_PART) | grep new_version | sed s,"^.*=",,)) | ||
# @echo Next version is $(NEXT_VERSION) | ||
# bumpversion $(VERSION_PART) | ||
# @echo "Review your version changes first" | ||
# @echo "Accept your version: \`make accept-version\`" | ||
# @echo "Revoke your version: \`make revoke-version\`" | ||
# | ||
# accept-version: | ||
# git push && git push --tags | ||
# | ||
# revoke-version: | ||
# git tag -d `git describe --tags --abbrev=0` # delete the tag | ||
# git reset --hard HEAD~1 # rollback the commit | ||
# | ||
# dist: | ||
# poetry build | ||
# | ||
# release-test: dist | ||
# poetry publish --repository testpypi | ||
# | ||
# release: dist | ||
# poetry publish | ||
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