Skip to content

Commit e494c15

Browse files
committed
refactor: move to mkdocs-material
Signed-off-by: Mauro Sardara <[email protected]>
1 parent 4169932 commit e494c15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+5165
-1576
lines changed

.github/workflows/reusable-docs.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ jobs:
5050
id: pages
5151
uses: actions/configure-pages@v5
5252

53-
- name: Setup Python
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: "3.12"
57-
5853
- name: Setup Golang
5954
uses: actions/setup-go@v5
6055
with:
@@ -65,6 +60,11 @@ jobs:
6560
run: |
6661
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
6762
63+
- name: Setup UV
64+
shell: bash
65+
run: |
66+
curl -LsSf https://astral.sh/uv/install.sh | sh
67+
6868
- name: Update GITHUB_PATH
6969
shell: bash
7070
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
@@ -80,7 +80,7 @@ jobs:
8080
uses: actions/upload-pages-artifact@v3
8181
with:
8282
name: docs-website
83-
path: ./.build/docs/html
83+
path: ./.build/site
8484

8585
deploy:
8686
name: Deploy artifacts

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Build
22
.build/
33
venv/
4+
.venv
5+
site
46

57
# Dependencies
68
.dep/
79

810
# Secrets
911
.env
12+
13+
# Generated files
14+
generated/

README.md

+19-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Markdown.
1212
- [macOS](#macos)
1313
- [Linux](#linux)
1414
- [Windows](#windows)
15+
- [Running local live server](#running-local-live-server)
1516
- [Building the Documentation](#building-the-documentation)
1617
- [Contributing](#contributing)
1718
- [Copyright Notice](#copyright-notice)
@@ -23,36 +24,49 @@ To build the documentation locally, you need to install required dependencies.
2324
**Prerequisites**
2425

2526
- [Taskfile](https://taskfile.dev/)
26-
- [Python](https://www.python.org/downloads/)
27+
- [Uv](https://docs.astral.sh/uv/getting-started/installation/)
2728
- [Golang](https://go.dev/doc/devel/release#go1.24.0)
2829

2930
### macOS
3031

31-
- Install Taskfile using Homebrew:
32+
- Install Taskfile and uv using Homebrew:
3233

3334
```sh
3435
brew install go-task/tap/go-task
36+
brew install uv
37+
```
3538

3639
### Linux
3740

38-
- Install Taskfile using bash:
41+
- Install Taskfile and uv using bash:
3942

4043
```sh
4144
sh -c '$(curl -fsSL https://taskfile.dev/install.sh)'
45+
curl -LsSf https://astral.sh/uv/install.sh | sh
46+
```
4247

4348
### Windows
4449

45-
- Install Taskfile using scoop:
50+
- Install Taskfile and uv using scoop:
4651

4752
```sh
4853
scoop install go-task
54+
scoop install main/uv
55+
```
56+
57+
## Running local live server
58+
59+
```sh
60+
task run
61+
```
4962

5063
## Building the Documentation
5164

5265
- To build the documentation, run the following command:
5366

5467
```sh
5568
task build
69+
```
5670

5771
- This will generate the HTML documentation in the .build/docs/html directory.
5872

@@ -67,4 +81,4 @@ changes. Submit a pull request.
6781

6882
[Copyright Notice and License](./LICENSE.md)
6983

70-
Copyright AGNTCY Contributors (https://github.com/agentcy)
84+
Copyright AGNTCY Contributors (https://github.com/agentcy)

Taskfile.yml

+21-24
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,46 @@ tasks:
2626
build:
2727
desc: Build documentation website
2828
deps:
29-
- deps/venv
29+
- deps/patch
3030
- deps/proto-diagrams
3131
preconditions:
3232
- which go
33-
- which python
3433
env:
35-
SOURCE_DIR: "{{.ROOT_DIR}}/docs"
3634
SCHEMA_DIR: "{{.ROOT_DIR}}/schema"
3735
BUILD_DOCS_DIR: "{{.BUILD_DIR}}/docs"
3836
vars:
39-
BUILD_SITE_DIR: "{{.BUILD_DIR}}/docs/html"
37+
BUILD_SITE_DIR: "{{.BUILD_DIR}}/site"
4038
cmds:
41-
- PATH={{.PATH}} ./docs/build-docs.sh
39+
- mkdir -p docs/generated
40+
- "{{.DEPS_DIR}}/proto-gen-md-diagrams -d ${SCHEMA_DIR} -o docs/generated"
41+
- pushd mkdocs && uv run mkdocs build --site-dir {{.BUILD_SITE_DIR}} && popd
4242
- |
4343
echo "Docs available at: file://{{.BUILD_SITE_DIR}}/index.html"
4444
45-
# TODO(ramizpolic): This usually works well to regenerate context, but it's not a real hot-reload.
46-
# Note that sometimes it crashes and goes into reload loop. Investigate or find alternative.
4745
run:
46+
deps:
47+
- deps/patch
48+
- deps/proto-diagrams
4849
desc: Run documentation website in live editing mode
49-
preconditions:
50-
- which go
51-
- which python
52-
watch: true
53-
sources:
54-
- 'docs/**/*'
55-
- 'schema/**/*'
5650
vars:
5751
BUILD_SITE_DIR: "{{.BUILD_DIR}}/docs/html"
5852
cmds:
59-
- task: build
60-
- |
61-
echo "Docs available at: file://{{.BUILD_SITE_DIR}}/index.html"
53+
- pushd mkdocs && uv run mkdocs serve
6254

63-
##
64-
## Dependencies
65-
##
66-
deps/venv:
55+
# TODO(msardara): This is a workaround, the __init__.py files shohuld be in the acp-sdk repo
56+
deps/patch:
6757
internal: true
58+
dir: mkdocs
59+
vars:
60+
PYTHON_VERSION:
61+
sh: echo "python$(cat .python-version)"
6862
cmds:
69-
- python3 -m venv {{.VENV_DIR}}
70-
status:
71-
- test -f {{.VENV_DIR}}
63+
- uv sync
64+
- touch .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/sync_client/__init__.py
65+
- touch .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/async_client/__init__.py
66+
generates:
67+
- .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/sync_client
68+
- .venv/lib/{{.PYTHON_VERSION}}/site-packages/agntcy_acp/acp_v0/async_client
7269

7370
deps/proto-diagrams:
7471
internal: true

docs/.index

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
nav:
2+
- INTRODUCTION: index.md
3+
- OASF: oasf
4+
- AGENT DIRECTORY SERVICE: dir
5+
- AGENT MANIFEST: manifest
6+
- SEMANTIC SDK: semantic-sdk
7+
- SYNTACTIC SDK: syntactic-sdk
8+
- MESSAGING SDK: messaging-sdk
9+
- AGENT WORKFLOW SERVER: agws
10+
- CSIT: csit
11+
- HOW-TOs: how-to-guides

docs/_static/css/theme.custom.css

-89
This file was deleted.

docs/agws/.index

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nav:
2+
- Agent Workflow Server: workflow_server.md
3+
- Workflow Server Manager: workflow_server_manager.md

0 commit comments

Comments
 (0)