Copy/paste friendly. These are the supported entry points. Helper scripts are intentionally omitted.
python tools/lint.py --dir datamgr
# Options:
# --phase {ast,import,all} # default: all
# --exclude-dir PATTERN # optional, pattern inside --dir-
Import‑safe modules only. No I/O, threads, env reads, network, or heavy globals at import time.
-
Only top‑level definitions are indexed. We record modules, classes, functions, and class methods defined at module top level. Nested functions are allowed for local helpers but are not nodes in the atlas and are not tracked in the call graph.
-
Stable FQIDs. Don’t generate functions/classes dynamically or rename at runtime. Avoid
exec/execfile/eval, dynamic__getattr__, or metaprogramming that obscures symbols. -
Explicit imports. No wildcard imports (
from x import *). Prefer explicit relative imports within the package. -
__all__only at the top‑level package__init__.py. Nowhere else. -
CALL graph is declared, not traced. Each module may declare a module‑level
CALLSregistry to record edges using real callables (aliases resolve to their targets). Example:# in some module, e.g., datamgr/services/ingest.py from datamgr.util.calls import Calls from datamgr.storage.catalog_sqlite import DatasetCatalog from datamgr.storage.part_store_h5 import PartStore CALLS = Calls() def ingest_part(...): ... # Declare edges using callables (introspection-only) CALLS.add(ingest_part, [DatasetCatalog.ensure_dataset, PartStore.write_part])
The linter verifies that every target resolves to a top‑level function or method and that all FQIDs are importable.
-
Ignore list is centralized.
.dm/ignore.jsonis the only source for global exclusions (e.g.,datamgr/navspec.py). Don’t hard‑code skips in tools. -
Style nits that help the atlas: keep docstrings brief; avoid massive module‑level constants; prefer one class/function per logical concern so pages stay readable.
# Full collect
python tools/introspect_collect.py --dir datamgr --out artifacts
# Delta collect (reads .dm/deltas.json)
python tools/introspect_collect.py --dir datamgr --out artifacts --delta-only --deltas .dm/deltas.jsonpython tools/nav_merge.py
# Writes artifacts/affected_fqids.txt (list of nodes to regenerate)# Full (no affected list)
python tools/build_package_atlas.py \
--commit "$(git rev-parse --short HEAD)" \
--nodes artifacts/nodes.json \
--edges artifacts/edges.json \
--out docs/api-nav \
--repo datamgr
# Incremental (only affected + neighbors)
python tools/build_package_atlas.py \
--commit "$(git rev-parse --short HEAD)" \
--nodes artifacts/nodes.json \
--edges artifacts/edges.json \
--affected-fqids artifacts/affected_fqids.txt \
--out docs/api-nav \
--repo datamgrThe atlas always publishes to
docs/api-nav/latest/….--commitis used only for GitHub source links.
python tools/repo_index.py
# Writes docs/index.html with Blob/Raw links and a Package Atlas quick link.- On every push to main, the Pages workflow runs: lint → collect (delta/full) → merge deltas → build Package Atlas → generate Repo Index → deploy
docs/. - To skip the job for a commit, include the token
[skip-index]in the commit message. - To force‑run even if a previous commit had
[skip-index], use the manual workflow dispatch and setforce=true. - Delta builds use
.dm/deltas.json; if it’s empty or artifacts are missing, a full collect runs.
# Add changes (paths and/or modules)
python tools/deltas.py add --path datamgr/api/navigator.py --module datamgr.api.navigator
# Add/update a note (appears on the Repo Index Deltas panel)
python tools/deltas.py note --text "Refactor api.navigator"
# Show manifest
python tools/deltas.py show
# Clear manifest
python tools/deltas.py clearTrack per-file status and maintain Current / Previous / Next lists. Writes progress.json and PROGRESS.md.
# Status / note (PATH must be an existing repo file)
python tools/progress.py PATH --status {pending|skeleton|impl|tested|docs} [--note "msg"] [--force]
# Render only
python tools/progress.py --render-only
# Worklists — replace (empty to clear)
python tools/progress.py --set-current [ITEM...]
python tools/progress.py --set-previous [ITEM...]
python tools/progress.py --set-next [ITEM...]
# Or explicit clears
python tools/progress.py --clear-current --clear-previous --clear-next
# Promote (Current→Previous, Next→Current), then optionally set new Next
python tools/progress.py --promote [--set-next ITEM...]Warnings
- Don’t combine
--set-currentwith--set-next --promote(error). - Don’t combine
--set-previouswith--promote(Previous is set automatically). - Status downgrades need
--force. Use repo-root paths.
# Full rebuild (first run or big refactor)
python tools/lint.py --dir datamgr
python tools/introspect_collect.py --dir datamgr --out artifacts
python tools/build_package_atlas.py --commit "$(git rev-parse --short HEAD)" --nodes artifacts/nodes.json --edges artifacts/edges.json --out docs/api-nav --repo datamgr
python tools/repo_index.py# Delta cycle
python tools/deltas.py add --path datamgr/api/navigator.py
python tools/introspect_collect.py --dir datamgr --out artifacts --delta-only --deltas .dm/deltas.json
python tools/nav_merge.py
python tools/build_package_atlas.py --commit "$(git rev-parse --short HEAD)" --nodes artifacts/nodes.json --edges artifacts/edges.json --affected-fqids artifacts/affected_fqids.txt --out docs/api-nav --repo datamgr
python tools/repo_index.py
python tools/deltas.py clear- All commands run from the repo root.
- Tools honor
.dm/ignore.json(single source of ignore) and keep builds incremental via.dm/deltas.json. - Do not commit generated outputs:
artifacts/,docs/api-nav/,docs/index.html.