Skip to main content

Z Doc Builder Experience by Swarmauri

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - zdx Discord

ZDX

Z Doc Builder Experience by Swarmauri. Reusable tooling to build and serve MkDocs-based documentation sites for Swarmauri projects.

Features

  • Material for MkDocs configuration
  • mkdocstrings support for API reference generation
  • README harvesting across workspaces
  • Dockerfile for containerized deployments

Installation

pip install zdx

Getting Started

  1. Place your documentation sources in a dedicated directory (e.g., docs/swarmauri-sdk).
  2. Customize mkdocs.yml and api_manifest.yaml for your project.
  3. Install zdx and use the zdx CLI to build and preview the site.

CLI Usage

Generate from a manifest

zdx generate --docs-dir /path/to/docs --manifest api_manifest.yaml

Build READMEs into pages

zdx readmes --docs-dir /path/to/docs

Serve the site

zdx serve --docs-dir /path/to/docs

Generate and serve together

zdx serve --generate --docs-dir /path/to/docs --manifest api_manifest.yaml

Control failure handling

Use the --on-error flag with any command that installs packages or generates documentation to decide how strictly zdx reacts to subprocess failures:

zdx generate --on-error warn

Valid values are:

  • fail ? stop immediately if a package installation or API build fails
  • warn ? print a warning but keep going
  • ignore ? suppress warnings and continue

You can also define the ZDX_FAILURE_MODE environment variable to set the default for every invocation. For example, the provided Docker assets default to warn so that optional packages do not abort a deployment.

API Manifest

zdx uses a YAML manifest to decide which Python packages to document and how those pages are organized. Each project keeps its manifest alongside the docs sources. This repository includes manifests for:

Path Purpose
infra/docs/swarmauri-sdk/api_manifest.yaml Generates API docs for the SDK packages.
infra/docs/peagen/api_manifest.yaml Drives documentation for the peagen tool.
infra/docs/tigrbl/api_manifest.yaml Builds docs for the tigrbl project.
pkgs/community/zdx/api_manifest.yaml Template manifest for new sites.

Manifest Schema

An api_manifest.yaml file defines a list of targets. Each target produces Markdown pages under docs/api/<name>/ and a corresponding navigation entry in the MkDocs configuration.

targets:
  - name: Core
    package: swarmauri_core
    search_path: /pkgs/core
    include:
      - swarmauri_core.*
    exclude:
      - "*.tests.*"

Every field controls a different part of the generation process:

Field Description
name Label used for the top-level navigation item and the folder under docs/api/.
search_path Directory containing the source package(s). The generator scans this path for modules.
package Root import name when documenting a single package. Omit when using discover.
discover When true, automatically finds all packages under search_path and builds docs for each. Generates separate folders and nav entries per package.
include Glob patterns of fully qualified modules to include. Classes from matching modules get individual Markdown files.
exclude Glob patterns of modules to skip. Use to drop tests or experimental code from the docs.

For each module that survives the include/exclude filters, zdx writes a page per public class. Pages land in docs/api/<name>/<module path>/<Class>.md and a simple index.md is created if one does not exist. The navigation section for the target is appended to mkdocs.yml, ensuring the new pages appear in the rendered site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zdx-0.11.0.dev1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zdx-0.11.0.dev1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file zdx-0.11.0.dev1.tar.gz.

File metadata

  • Download URL: zdx-0.11.0.dev1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for zdx-0.11.0.dev1.tar.gz
Algorithm Hash digest
SHA256 084940c8ad2ac84da05e889f88fb4685feada5b7ea023a1b67c598cbe6a1f96f
MD5 ade168847d0ab51b4b07b3023c67c00f
BLAKE2b-256 6c26110e4c5f1eea020b74c817e276c4aaa9463765f332a5f10ac3cc0d603ca7

See more details on using hashes here.

File details

Details for the file zdx-0.11.0.dev1-py3-none-any.whl.

File metadata

  • Download URL: zdx-0.11.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for zdx-0.11.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 2816d068a528435341ab4fdf89ac7527562f8b1066aa4c3b38ed02b69397813f
MD5 0d20b332709926a3bfedf11d574e59ef
BLAKE2b-256 18598a76ea79ab13c4d4b8af0507a47dba701eefc0a8477e08cf9ff7403da617

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page