diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f734a81..d41c565 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,6 +18,8 @@ jobs: task: 'tests' - name: 'Run Ruff' task: 'lint' + - name: 'Build docs' + task: 'build-docs' name: ${{ matrix.variant.name }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..3f0dbfd --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,23 @@ +name: Deploy Documentation +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Install Task + uses: arduino/setup-task@v2 + - name: Deploy Documentation + run: task deploy-docs diff --git a/docs/reference/agents.md b/docs/reference/agents.md new file mode 100644 index 0000000..d067990 --- /dev/null +++ b/docs/reference/agents.md @@ -0,0 +1,3 @@ +# Agents module + +::: redpanda.agents diff --git a/docs/reference/index.md b/docs/reference/index.md deleted file mode 100644 index a9871ef..0000000 --- a/docs/reference/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Agents module - -::: agents diff --git a/docs/reference/runtime.md b/docs/reference/runtime.md new file mode 100644 index 0000000..330e314 --- /dev/null +++ b/docs/reference/runtime.md @@ -0,0 +1,3 @@ +# Runtime module + +::: redpanda.runtime diff --git a/mkdocs.yml b/mkdocs.yml index a3f16c5..835387f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,7 +25,8 @@ plugins: - mkdocstrings: handlers: python: - paths: ["src/agents"] + paths: + - "src/redpanda" options: docstring_style: google # Shows links to other members in signatures @@ -69,4 +70,4 @@ validation: anchors: warn watch: - - "src/agents" + - "src/redpanda" diff --git a/src/redpanda/runtime/__init__.py b/src/redpanda/runtime/__init__.py index 2761fe4..560e4b5 100644 --- a/src/redpanda/runtime/__init__.py +++ b/src/redpanda/runtime/__init__.py @@ -19,6 +19,14 @@ async def serve(agent: Agent) -> None: + """ + Serve an agent as a Redpanda Connect processor plugin. + + This method runs for the entire lifetime of the server. + + Args: + agent: The agent to serve. + """ addr = os.getenv("REDPANDA_CONNECT_AGENT_RUNTIME_MCP_SERVER") if addr: agent.mcp.append(SSEMCPEndpoint(addr))