Shared documentation tooling for the Juniper ML platform (markdown link validator with cross-repo and ecosystem-root awareness)
Project description
juniper-doc-tools
Shared documentation tooling for the Juniper ML platform: a markdown link validator with cross-repo and ecosystem-root awareness.
This is the long-term replacement for the standalone
scripts/check_doc_links.py script that historically lived in every Juniper
repo. See
JUNIPER_DOC_TOOLS_PYPI_MIGRATION_PLAN_2026-05-18.md
in the parent juniper-ml repo for the design rationale and migration plan.
Install
pip install juniper-doc-tools
No runtime dependencies — pure stdlib.
CLI usage
Two invocation forms are supported:
juniper-check-doc-links \
--exclude templates --exclude history --exclude legacy \
--cross-repo skip
# or, equivalently:
python -m juniper_doc_tools \
--exclude templates --exclude history --exclude legacy \
--cross-repo skip
Common flags:
| Flag | Description |
|---|---|
--exclude DIR |
Directory name to exclude from scanning (repeatable). |
--cross-repo {skip,warn,check} |
How to handle cross-repo / ecosystem-root links. check (default) validates them against the filesystem; skip is the typical CI mode. |
--strict-repo-boundary |
Disable ecosystem-root link classification. Links like ../../CLAUDE.md are flagged as "outside repository boundary" instead of being subject to --cross-repo policy. Off by default. |
--repo-root PATH |
Repository root for resolving paths (default: CWD). |
-v, --verbose |
Print every link checked. |
--version |
Print the package version. |
Exit codes: 0 if all links valid, 1 if broken links found or arguments
are invalid.
Library usage
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)")
What it validates
For every .md (and .markdown / .rst / .txt) file under the repo root:
- Relative file links —
[text](path/to/file.md)— the target must exist on disk. - Same-file anchors —
[text](#some-heading)— the heading must exist in the source file. - Cross-repo links —
../juniper-X/path/in/sibling.md— classified by regex against the known Juniper ecosystem repo set; subject to--cross-repopolicy. - Ecosystem-root links —
../../CLAUDE.md,../../notes/..., etc. — paths into the Juniper parent directory; also subject to--cross-repopolicy (unless--strict-repo-boundaryis set).
External URLs (http://, https://, mailto:) and embedded images
(data:, //) are skipped.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file juniper_doc_tools-0.1.0.tar.gz.
File metadata
- Download URL: juniper_doc_tools-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
750827804a0042a207fa6e587bc7baa28d86326660e91a6689b54077dcf5c76a
|
|
| MD5 |
7f140b4bbae9273a47b4fcc1f0fe2186
|
|
| BLAKE2b-256 |
1c872e3f080540b519b571105ba247b61a01c99ee3db743d2ec7c7069373e11b
|
Provenance
The following attestation bundles were made for juniper_doc_tools-0.1.0.tar.gz:
Publisher:
publish-doc-tools.yml on pcalnon/juniper-ml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_doc_tools-0.1.0.tar.gz -
Subject digest:
750827804a0042a207fa6e587bc7baa28d86326660e91a6689b54077dcf5c76a - Sigstore transparency entry: 1572755530
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-ml@db41230faaf897de191254b7cd501ae58dd80744 -
Branch / Tag:
refs/tags/juniper-doc-tools-v0.1.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-doc-tools.yml@db41230faaf897de191254b7cd501ae58dd80744 -
Trigger Event:
push
-
Statement type:
File details
Details for the file juniper_doc_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: juniper_doc_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75602c0dbfdead0f97a037a85338fa06050cbdbfa8fa03d5723ade635a821737
|
|
| MD5 |
ca6d2702ea16f6ba8bbd8b2563080c66
|
|
| BLAKE2b-256 |
90464743282ea862a16caefb9004ddc64e61476cd9238c1b089d32823c2414af
|
Provenance
The following attestation bundles were made for juniper_doc_tools-0.1.0-py3-none-any.whl:
Publisher:
publish-doc-tools.yml on pcalnon/juniper-ml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniper_doc_tools-0.1.0-py3-none-any.whl -
Subject digest:
75602c0dbfdead0f97a037a85338fa06050cbdbfa8fa03d5723ade635a821737 - Sigstore transparency entry: 1572755561
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-ml@db41230faaf897de191254b7cd501ae58dd80744 -
Branch / Tag:
refs/tags/juniper-doc-tools-v0.1.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-doc-tools.yml@db41230faaf897de191254b7cd501ae58dd80744 -
Trigger Event:
push
-
Statement type: