Skip to main content

juniper-doc-tools

PyPI Python 3.12+ License: MIT

A zero-dependency markdown link validator (CLI + library) for documentation CI.

juniper-doc-tools checks that the links in your markdown actually resolve — relative file links, same-file heading anchors, cross-repo links into sibling repositories, and links into a parent ecosystem directory. It ships the juniper-check-doc-links console script (also python -m juniper_doc_tools) and a juniper_doc_tools library API. It is pure stdlib — no runtime dependencies — so it installs into the slimmest CI image, and it is the single replacement for the scripts/check_doc_links.py copy that used to be duplicated across the Juniper repositories.

Part of the Juniper platform. juniper-doc-tools is the shared documentation-link gate of Juniper — a multi-package ML research platform. It's a standalone tool with no Juniper dependencies; you can point it at any repo's docs.

Install

pip install juniper-doc-tools          # direct
pip install "juniper-ml[doc-tools]"    # via the meta-package

Quick start

CLI — the pattern every Juniper repo's docs lane uses:

juniper-check-doc-links --exclude templates --exclude history --exclude legacy --cross-repo skip

Library:

from pathlib import Path
from juniper_doc_tools import validate_directory

result = validate_directory(Path("."), exclude_dirs={"templates", "history"}, cross_repo_mode="skip")
if not result.ok:
    for error in result.errors:
        print(error)
    raise SystemExit(1)
print(f"All {result.scanned_files} files OK ({result.cross_repo_skipped} cross-repo links skipped)")

Exit code 0 if all links are valid, 1 on broken links or invalid arguments.

What it validates

Across .md / .markdown / .rst / .txt files:

Link class Example Check
Relative file links [text](path/to/file.md) target exists on disk
Same-file anchors [text](#some-heading) heading exists in the file
Cross-repo links ../juniper-<repo>/path.md per the --cross-repo {skip,warn,check} policy
Ecosystem-root links ../../notes/… per --cross-repo (unless --strict-repo-boundary)

External URLs (http, https, mailto) and embedded images are skipped.

Status

Live on PyPI, published independently of the meta-package on juniper-doc-tools-v* tags. Adopted by all eight Juniper repositories' documentation-link CI lanes (the per-repo scripts/check_doc_links.py copies were deleted). The current version is shown by the badge above; see CHANGELOG.md. Pin juniper-doc-tools>=0.1.0,<0.2.0.

Design

Part of the Juniper ML research platform. The PyPI-migration plan (four-wave structure + per-repo PR references): JUNIPER_2026-05-18_JUNIPER-ML_DOC-TOOLS-PYPI-MIGRATION-PLAN.md.

License

MIT — see LICENSE.

Metadata

Release files for juniper-doc-tools 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juniper-doc-tools 0.1.2
File Size Uploaded
juniper_doc_tools-0.1.2.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for juniper-doc-tools 0.1.2
File Interpreter ABI Platform
juniper_doc_tools-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / juniper_doc_tools-0.1.2.tar.gz

Download URL juniper_doc_tools-0.1.2.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c066dcde656fd3b588a62ae4ecbf54f85b7cc2bfe4f968d19a9214729aebaca5
BLAKE2b-256 checksum
How to use checksums
45f34f044a3f38e50d18d0ac23666e437ab8771adb0c6083bcb9c8295668f11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / juniper_doc_tools-0.1.2-py3-none-any.whl

Download URL juniper_doc_tools-0.1.2-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4892ba47e4bc2a4578764942f1ea1086c473930d844604cc6e84d4187ab5ba3
BLAKE2b-256 checksum
How to use checksums
01d017ee501c902d883df37bee289ee3e5ac1f06915ac77c8812ff7723755ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page