Skip to content

fix: repoint stale doc paths referenced from the package - #295

Open
Gabeyocum28 wants to merge 1 commit into
open-flight:mainfrom
Gabeyocum28:fix/src-stale-doc-paths
Open

Gabeyocum28 wants to merge 1 commit into
open-flight:mainfrom
Gabeyocum28:fix/src-stale-doc-paths

Conversation

@Gabeyocum28

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes four references under src/openflight/ to docs/*.md files that no longer exist, and adds a test that keeps them from going stale again.

File Old reference Now
kld7/radc.py (OPS-bin penalty warning) docs/kld7-troubleshooting.md docs/legacy/troubleshooting.md
cloud/client.py (module docstring) docs/openflight-cloud-uploader-spec.md docs/reference/cloud-uploader-spec.md
session_logger.py (session_uuid comment) docs/cloud-sync-design.md docs/reference/cloud-uploader-spec.md, where session_uuid is now documented
kld7/two_ray.py (module docstring) scripts/analysis/kld7_subframe_stft.py and docs/kld7-subframe-stft-findings.md reworded: neither file was ever committed, so it now points at the two-ray section of docs/legacy/launch-angle-explained.md

Changelog entry added under Unreleased / Fixed.

Why was this required?

The docs restructure (45d3b4d) moved the flat docs/*.md guides 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. The radc.py one 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 .py file under src/openflight for docs/…​.md mentions 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 against main, 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

  • Traced each old path with git log --follow: three were deleted in the restructure commit 45d3b4d or in 6a3fd83, and the two_ray.py script/findings pair never existed in history (git log --all --name-only has no match), which is why that one is reworded rather than repointed.
  • Confirmed each successor by reading it: docs/legacy/troubleshooting.md is titled "K-LD7 Troubleshooting Guide"; docs/reference/cloud-uploader-spec.md is the wire contract implemented by src/openflight/cloud/ and documents session_uuid; docs/legacy/launch-angle-explained.md section 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.
  • Full suite: 1630 passed, 13 failed. The 13 are test_camera_* and fail identically on main in my environment because cv2 is not installed; unrelated.
  • ruff check and ruff format --check clean on all touched files. pylint on the four source files: 9.63/10.

No UI changes, so no screenshots.

Checklist

  • Single feature/fix — this PR is scoped to one thing with a clear story above
  • Automated tests included — new or updated tests cover this change
  • Manual testing described — I documented what I verified by hand above
  • Python tests pass (uv run pytest tests/ -v)
  • Pylint passes (uv run pylint src/openflight/ --fail-under=9)
  • Ruff passes (uv run ruff check src/openflight/)
  • UI builds (cd ui && npm run build) — no UI changes
  • UI lint passes (cd ui && npm run lint) — no UI changes
  • Updated docs or CHANGELOG if needed
  • No unrelated changes mixed in

@Gabeyocum28
Gabeyocum28 requested a review from jewbetcha as a code owner October 7, 2026 03:44
@Gabeyocum28

Copy link
Copy Markdown
Contributor Author

Closing and reopening to retrigger the pull_request workflows; only the pull_request_target audit ran on the initial open.

@Gabeyocum28 Gabeyocum28 closed this Oct 7, 2026
@Gabeyocum28 Gabeyocum28 reopened this Oct 7, 2026
@Gabeyocum28

Copy link
Copy Markdown
Contributor Author

Heads-up for review: the pull_request workflows (Tests, Pylint, PR Checks, UI, Documentation) never spawned for this PR, on the initial open, after a close/reopen, or after the empty synchronize commit above. Only the pull_request_target anti-slop audit ran. #292–#294 from the same fork triggered all of them an hour or two earlier and nothing in .github/workflows changed on main in between, so it looks like something on the GitHub/repo-settings side rather than this branch. Other forks' PRs currently show runs in action_required, mine show no runs at all.

Local results on this head, same commands as CI:

  • uv run pytest tests/ — 1630 passed, 11 skipped, 13 failed (all test_camera_*, identical on main here, cv2 not installed)
  • uv run pylint src/openflight/ --fail-under=9 on the four touched files — 9.63/10
  • uv run ruff check / ruff format --check — clean

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.
@Cormac131

Copy link
Copy Markdown
Collaborator

Hey @Gabeyocum28, could you pull in latest and fix the conflicts, thanks!

@Gabeyocum28

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (b052c15) and resolved the changelog conflict with #294; both entries are kept. Dropped the empty retrigger commit so the PR is the single commit again. Tests, ruff, and pylint pass locally on the new head.

@Gabeyocum28
Gabeyocum28 force-pushed the fix/src-stale-doc-paths branch from 7d09058 to a416dc0 Compare October 7, 2026 14:50
@Gabeyocum28

Copy link
Copy Markdown
Contributor Author

Correction to my earlier note: the missing pull_request runs were caused by the merge conflict, not repo settings. GitHub skips pull_request workflows when it cannot build the merge ref; once the branch was rebased they all spawned. Sorry for the noise.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants