Shared CI / build tooling for the Juniper ML platform (dependency-documentation generator + workflow-script-path lint + AGENTS.md version-drift lint + AGENTS.md header-schema lint)
Project description
juniper-ci-tools
Shared CI / build tooling for the Juniper ML platform.
This package is the single source of truth for the dependency-documentation
generator that historically lived as scripts/generate_dep_docs.sh (or
util/generate_dep_docs.sh) in every Juniper repo. Three variants of that
script drifted on origin/main; the 2026-05-20 bug fix in
juniper-cascor#276
(switching the conda-dependency extraction from sed to awk to avoid
emitting an invalid trailing prefix: / variables: key) shipped in 1 of 8
repos. This package distributes that fix as pip install-able tooling so it
cannot drift again.
This work mirrors the
juniper-doc-tools PyPI migration plan
that addressed the analogous 2026-05-18 doc-link validator incident.
Installation
pip install juniper-ci-tools
This installs two console scripts:
juniper-generate-dep-docs— dependency-documentation generator (the consolidatedscripts/generate_dep_docs.shport; see "Usage" below).juniper-lint-workflow-paths— lints that everypython|bash <path>invocation in.github/workflows/*.ymlreferences a file that exists on disk. Added in 0.2.0; consolidates the 6 byte-identical copies ofutil/test_workflow_script_paths.pythat existed across consumer repos.
The package requires Python 3.11 or newer and depends on PyYAML.
Usage
Run from the root of any Juniper repo that has a pyproject.toml:
juniper-generate-dep-docs
Equivalent module form:
python -m juniper_ci_tools
This will:
- Create
conf/if needed. - Back up any existing
conf/requirements_ci.txtwith a timestamp infix. - Render
notes/PIP_DEPENDENCY_FILE_HEADER.md(substituting placeholders like<X.Y.Z ...>,<YYYY-MM-dd ...>,<Python Version>,<Pip Version>) and appendpip list --format=freezeoutput. - If
condais onPATH: back up any existingconf/conda_environment_ci.yaml, rendernotes/CONDA_DEPENDENCY_FILE_HEADER.md, append the dependency block extracted fromconda env export --no-builds(using the awk-equivalent logic that produces valid YAML), and validate the result withyaml.safe_load.
If conda is not available the conda step is skipped with a warning (matches the legacy bash script). If the generated YAML fails to parse, the command exits non-zero.
CLI options
| Flag | Default | Purpose |
|---|---|---|
--repo-root |
cwd | Repo root containing pyproject.toml |
--conf-dir |
conf |
Output directory |
--notes-dir |
notes |
Directory containing header templates |
--pip-header |
PIP_DEPENDENCY_FILE_HEADER.md |
Pip header template filename |
--conda-header |
CONDA_DEPENDENCY_FILE_HEADER.md |
Conda header template filename |
--pip-filename |
requirements_ci.txt |
Pip output filename |
--conda-filename |
conda_environment_ci.yaml |
Conda output filename |
--no-conda |
off | Skip conda generation even if conda is installed |
--no-yaml-validation |
off | Skip yaml.safe_load on generated conda file |
Library API
from juniper_ci_tools import generate_dep_docs
result = generate_dep_docs(repo_root="/path/to/repo")
print(result.pip_file, result.conda_file, result.yaml_validated)
See the package's juniper_ci_tools/generate_dep_docs.py docstring for the
full surface.
Development
cd juniper-ci-tools
pip install -e ".[test]"
pytest
License
MIT. Copyright (c) 2024-2026 Paul Calnon.
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
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_ci_tools-0.4.0.tar.gz.
File metadata
- Download URL: juniper_ci_tools-0.4.0.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
520b4da6be0bbc2dc016f82a74db318f612fb30e1bce2de32622c521d62abc06
|
|
| MD5 |
b397ccbe95e83687f537c019c28f346b
|
|
| BLAKE2b-256 |
566e8bba73631bc01c9a4c8fee4a310fb22964d7b4a27d164307fea41962bdde
|
Provenance
The following attestation bundles were made for juniper_ci_tools-0.4.0.tar.gz:
Publisher:
publish-ci-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_ci_tools-0.4.0.tar.gz -
Subject digest:
520b4da6be0bbc2dc016f82a74db318f612fb30e1bce2de32622c521d62abc06 - Sigstore transparency entry: 1607734248
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-ml@79e5304f6b8508a1b006f103b6d67f02d29c130c -
Branch / Tag:
refs/tags/juniper-ci-tools-v0.4.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-ci-tools.yml@79e5304f6b8508a1b006f103b6d67f02d29c130c -
Trigger Event:
push
-
Statement type:
File details
Details for the file juniper_ci_tools-0.4.0-py3-none-any.whl.
File metadata
- Download URL: juniper_ci_tools-0.4.0-py3-none-any.whl
- Upload date:
- Size: 28.9 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 |
8f2bd7ef1378d55469b130a991433df0977908d4c3bb50fac047114b63439b5a
|
|
| MD5 |
759604d2bb36a09b185b06f5d78c636a
|
|
| BLAKE2b-256 |
63d4e2e10036920911ad73bfb6084512f42c08f2fb8ae2901da5ff721efb4979
|
Provenance
The following attestation bundles were made for juniper_ci_tools-0.4.0-py3-none-any.whl:
Publisher:
publish-ci-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_ci_tools-0.4.0-py3-none-any.whl -
Subject digest:
8f2bd7ef1378d55469b130a991433df0977908d4c3bb50fac047114b63439b5a - Sigstore transparency entry: 1607734338
- Sigstore integration time:
-
Permalink:
pcalnon/juniper-ml@79e5304f6b8508a1b006f103b6d67f02d29c130c -
Branch / Tag:
refs/tags/juniper-ci-tools-v0.4.0 - Owner: https://github.com/pcalnon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-ci-tools.yml@79e5304f6b8508a1b006f103b6d67f02d29c130c -
Trigger Event:
push
-
Statement type: