-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathTaskfile.yml
More file actions
144 lines (128 loc) · 3.52 KB
/
Copy pathTaskfile.yml
File metadata and controls
144 lines (128 loc) · 3.52 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# 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 --watch-theme
##
## 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, links)
deps:
- deps/patch
cmds:
- task: lint:spelling
- task: lint:markdown
- task: lint:links
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:links:
desc: Check for broken links in built documentation site
internal: true
deps:
- build
cmds:
- find .build/site -name '.index' -type f -delete
- find .build/site -depth -name '.index' -type d -exec rm -rf {} \; 2>/dev/null || true
- |
set -euo pipefail
if [ -z "${GITHUB_TOKEN:-}" ] && command -v gh >/dev/null 2>&1; then
GITHUB_TOKEN="$(gh auth token 2>/dev/null || true)"
export GITHUB_TOKEN
fi
lychee \
--config lychee.toml \
--exclude-path "(^|/)404\\.html$" \
--exclude-all-private \
.build/site
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