forked from agntcy/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
123 lines (108 loc) · 2.84 KB
/
Taskfile.yml
File metadata and controls
123 lines (108 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: CC-BY-4.0
version: "3"
interval: '500ms'
dotenv: ['.env']
env:
BUILD_DIR: "{{.ROOT_DIR}}/.build"
VENV_DIR: "{{.ROOT_DIR}}/.dep/.venv"
# Taskfile env does not override the actual shell env, see:
# https://github.com/go-task/task/issues/202
PATH: "{{.VENV_DIR}}/bin:$PATH"
tasks:
default:
cmds:
- task -l
##
## Website
##
build:
desc: Build documentation website
deps:
- deps/patch
vars:
BUILD_SITE_DIR: "{{.BUILD_DIR}}/site"
cmds:
- pushd mkdocs && uv run mkdocs build --site-dir {{.BUILD_SITE_DIR}} && popd
- |
echo "Docs available at: file://{{.BUILD_SITE_DIR}}/index.html"
run:
desc: Run documentation website in live editing mode
deps:
- deps/patch
cmds:
- pushd mkdocs && uv run mkdocs serve
##
## Testing and Linting
##
test:
desc: Run all documentation tests and linting checks
deps:
- deps/patch
cmds:
- task: lint
- echo "All documentation tests passed!"
lint:
desc: Run all linting checks (spelling, markdown)
deps:
- deps/patch
cmds:
- task: lint:spelling
- task: lint:markdown
lint:spelling:
desc: Check spelling in documentation
internal: true
deps:
- deps/patch
dir: mkdocs
cmds:
- uv run codespell --config ../.codespellrc ../docs
lint:markdown:
desc: Check Markdown syntax and style
internal: true
deps:
- deps/patch
dir: mkdocs
cmds:
- uv run pymarkdown --config ../.pymarkdown scan ../docs
lint:fix:
desc: Auto-fix spelling and markdown issues where possible
deps:
- deps/patch
dir: mkdocs
cmds:
- task: lint:fix:spelling
- task: lint:fix:markdown
lint:fix:spelling:
desc: Auto-fix spelling issues only
internal: true
deps:
- deps/patch
dir: mkdocs
cmds:
- uv run codespell --config ../.codespellrc ../docs --write-changes
lint:fix:markdown:
desc: Auto-fix markdown issues only
internal: true
deps:
- deps/patch
dir: mkdocs
cmds:
- uv run pymarkdown --config ../.pymarkdown fix -r ../docs
##
## Dependencies
##
# TODO(msardara): This is a workaround, the __init__.py files should be in the acp-sdk repo
deps/patch:
internal: true
dir: mkdocs
vars:
PYTHON_VERSION:
sh: echo "python$(cat .python-version)"
cmds:
- uv sync
- touch .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/sync_client/__init__.py
- touch .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/async_client/__init__.py
generates:
- .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/sync_client
- .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/async_client