Repository navigation
fix: repoint stale doc paths referenced from the package - #295
Gabeyocum28 wants to merge 1 commit into
Conversation
|
Closing and reopening to retrigger the pull_request workflows; only the pull_request_target audit ran on the initial open. |
|
Heads-up for review: the Local results on this head, same commands as CI:
Happy to rebase or re-push if a maintainer flips whatever needs flipping. |
Four places under src/openflight named docs/*.md files that the docs restructure moved, so the pointers have been 404s since: - kld7/radc.py OPS-bin penalty warning -> docs/legacy/troubleshooting.md - cloud/client.py docstring -> docs/reference/cloud-uploader-spec.md - session_logger.py session_uuid comment -> docs/reference/cloud-uploader-spec.md - kld7/two_ray.py docstring: cited an analysis script and findings doc that were never committed; now points at the two-ray section of docs/legacy/launch-angle-explained.md instead. Add tests/test_doc_references.py, which scans the package for docs/...md references and fails on any that do not exist, so a future docs move cannot strand them again. It failed on exactly these four before the fix.
|
Hey @Gabeyocum28, could you pull in latest and fix the conflicts, thanks! |
7d09058 to
a416dc0
Compare
|
Correction to my earlier note: the missing |
What does this PR do?
Fixes four references under
src/openflight/todocs/*.mdfiles that no longer exist, and adds a test that keeps them from going stale again.kld7/radc.py(OPS-bin penalty warning)docs/kld7-troubleshooting.mddocs/legacy/troubleshooting.mdcloud/client.py(module docstring)docs/openflight-cloud-uploader-spec.mddocs/reference/cloud-uploader-spec.mdsession_logger.py(session_uuidcomment)docs/cloud-sync-design.mddocs/reference/cloud-uploader-spec.md, wheresession_uuidis now documentedkld7/two_ray.py(module docstring)scripts/analysis/kld7_subframe_stft.pyanddocs/kld7-subframe-stft-findings.mddocs/legacy/launch-angle-explained.mdChangelog entry added under Unreleased / Fixed.
Why was this required?
The docs restructure (45d3b4d) moved the flat
docs/*.mdguides into sectioned directories. #294 fixed the pointers in scripts and the issue templates; these four live inside the Python package and were deliberately left out of that docs-only PR. Theradc.pyone is a production WARNING that fires when a K-LD7 build has a mounting or clutter problem, and it sends the user to a 404 at exactly the moment they need the troubleshooting guide. The cloud client docstring is the first thing a contributor reads before touching the wire contract.Automated tests
New
tests/test_doc_references.py. It scans every.pyfile undersrc/openflightfordocs/….mdmentions and parametrizes one test per reference asserting the file exists, plus a guard that the scan matched at least one reference so it can't pass vacuously. Written first: it failed on exactly these four references againstmain, and passes after the fix. Any future docs move that strands a pointer from the package will fail CI with the offending source file and path in the assertion message.Manual (human) testing
git log --follow: three were deleted in the restructure commit 45d3b4d or in 6a3fd83, and thetwo_ray.pyscript/findings pair never existed in history (git log --all --name-onlyhas no match), which is why that one is reworded rather than repointed.docs/legacy/troubleshooting.mdis titled "K-LD7 Troubleshooting Guide";docs/reference/cloud-uploader-spec.mdis the wire contract implemented bysrc/openflight/cloud/and documentssession_uuid;docs/legacy/launch-angle-explained.mdsection 4 is "Why two-ray demodulation".uv run pytest tests/test_doc_references.py: 5 passed.uv run pytest tests/test_kld7*.py tests/test_doc_references.py: 151 passed, 2 skipped.test_camera_*and fail identically onmainin my environment becausecv2is not installed; unrelated.ruff checkandruff format --checkclean on all touched files.pylinton the four source files: 9.63/10.No UI changes, so no screenshots.
Checklist
uv run pytest tests/ -v)uv run pylint src/openflight/ --fail-under=9)uv run ruff check src/openflight/)cd ui && npm run build) — no UI changescd ui && npm run lint) — no UI changes