-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Showing
5 changed files
with
145 additions
and
0 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[tools] | ||
lefthook = "latest" | ||
task = "latest" | ||
uv = "latest" |
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,37 @@ | ||
version: '3' | ||
|
||
vars: | ||
# If you run bare environment or activated venv, set '' (blank string) | ||
RUN_PYTHON: 'uv run' | ||
|
||
tasks: | ||
setup: | ||
desc: 'Setup workspace' | ||
cmds: | ||
- 'uv sync --frozen --all-extras' | ||
- 'lefthook install' | ||
- task: 'docs:apidoc' | ||
verify: | ||
desc: 'Verify environment by all procs' | ||
cmds: | ||
- 'lefthook run pre-commit --all-files' | ||
- '{{.RUN_PYTHON}} pytest' | ||
- task: 'docs:intl' | ||
- task: 'docs:apidoc' | ||
- task: 'docs:build-linkcheck' | ||
- task: 'docs:build-dirhtml' | ||
- task: 'demo:intl' | ||
- task: 'docs:build-linkcheck' | ||
- task: 'demo:build' | ||
- 'uv build' | ||
release-*: | ||
desc: 'Run release process' | ||
vars: | ||
VERSION: '{{index .MATCH 0}}' | ||
cmds: | ||
- 'age update {{.VERSION}}' | ||
- 'uv sync --all-extras' # To write out as lock-file | ||
|
||
includes: | ||
docs: './doc' | ||
demo: './demo' |
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,46 @@ | ||
version: '3' | ||
|
||
vars: | ||
# If you run bare environment or activated venv, set '' (blank string) | ||
# RUN_PYTHON: '' | ||
SPHINX_DEFAULT_BUILD: 'mini18n-dirrevealjs' | ||
SPHINX_SOURCE_DIR: '.' | ||
SPHINX_OUTPUT_DIR: '_build' | ||
SPHINX_OPTIONS: '' | ||
SPHINX_LANGUAGES: | ||
- 'ja' | ||
|
||
env: | ||
SPHINXINTL_TRANSLATOR: "Kazuya Takei <[email protected]>" | ||
|
||
tasks: | ||
intl: | ||
desc: 'Sync i18n environment' | ||
dir: '{{.TASKFILE_DIR}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-build -M gettext {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}} {{.SPHINX_OPTIONS}}' | ||
- '{{.RUN_PYTHON}} sphinx-intl update --language={{.SPHINX_LANGUAGES | join ","}}' | ||
dev: | ||
desc: 'Run docs server' | ||
dir: '{{.TASKFILE_DIR}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-autobuild -b dirrevealjs {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}/dirrevealjs' | ||
build-*: | ||
desc: 'Make docs' | ||
dir: '{{.TASKFILE_DIR}}' | ||
vars: | ||
TARGET: '{{index .MATCH 0}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-build -M {{.TARGET}} {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}' | ||
build: | ||
desc: 'Make docs (default target)' | ||
deps: | ||
- 'build-{{.SPHINX_DEFAULT_BUILD}}' | ||
help: | ||
desc: 'Display help of docs' | ||
deps: | ||
- 'build-help' | ||
clean: | ||
desc: 'Clean build files of docs' | ||
deps: | ||
- '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,52 @@ | ||
version: '3' | ||
|
||
vars: | ||
# If you run bare environment or activated venv, set '' (blank string) | ||
# RUN_PYTHON: '' | ||
SPHINX_DEFAULT_BUILD: 'dirhtml' | ||
SPHINX_SOURCE_DIR: '.' | ||
SPHINX_OUTPUT_DIR: '_build' | ||
SPHINX_OPTIONS: '' | ||
SPHINX_LANGUAGES: | ||
- 'ja' | ||
|
||
env: | ||
SPHINXINTL_TRANSLATOR: "Kazuya Takei <[email protected]>" | ||
|
||
tasks: | ||
intl: | ||
desc: 'Sync i18n environment' | ||
dir: '{{.TASKFILE_DIR}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-build -M gettext {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}} {{.SPHINX_OPTIONS}}' | ||
- '{{.RUN_PYTHON}} sphinx-intl update --language={{.SPHINX_LANGUAGES | join ","}}' | ||
dev: | ||
desc: 'Run docs server' | ||
dir: '{{.TASKFILE_DIR}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-autobuild -b dirhtml {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}/dirhtml' | ||
apidoc: | ||
desc: 'Update apidoc' | ||
dir: '{{.TASKFILE_DIR}}' | ||
cmds: | ||
- 'rm -rf api' | ||
- '{{.RUN_PYTHON}} sphinx-apidoc -f -e -T -o=api/ ../sphinx_revealjs' | ||
build-*: | ||
desc: 'Make docs' | ||
dir: '{{.TASKFILE_DIR}}' | ||
vars: | ||
TARGET: '{{index .MATCH 0}}' | ||
cmds: | ||
- '{{.RUN_PYTHON}} sphinx-build -M {{.TARGET}} {{.SPHINX_SOURCE_DIR}} {{.SPHINX_OUTPUT_DIR}}' | ||
build: | ||
desc: 'Make docs (default target)' | ||
deps: | ||
- 'build-{{.SPHINX_DEFAULT_BUILD}}' | ||
help: | ||
desc: 'Display help of docs' | ||
deps: | ||
- 'build-help' | ||
clean: | ||
desc: 'Clean build files of docs' | ||
deps: | ||
- '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