Skip to content

docs: add Python photonlib snippets and fix code tabs #1914 - #2599

Merged
mcm001 merged 1 commit into
PhotonVision:mainfrom
AzazelSensei:docs/python-photonlib-1914
Sep 6, 2026
Merged

mcm001 merged 1 commit into
PhotonVision:mainfrom
AzazelSensei:docs/python-photonlib-1914

Conversation

@AzazelSensei

Copy link
Copy Markdown
Contributor

Description

What changed?

Python tabs on Getting Target Data and the pose estimation example mixed rli with code-block under tab-set-code, so the Python tab did not work. Those groups are now tab-set/tab-item like the aiming example.

I also filled the photonlibpy snippets that were still "Coming Soon" on driver mode, pipeline index, latency, LEDs, best target, and using-target-data (wpimath equivalents, since photonlibpy has no PhotonUtils). Method names now mention Python where they differ (setLEDMode, getMinAreaRectCorners).

Why?

Python docs were incomplete or the tabs did not switch.

Testing

  • I have tested this change locally
  • Test evidence (screenshots, videos, or test results):

I checked the snippets against photonlibpy on main (PhotonCamera.setDriverMode, setPipelineIndex, setLEDMode, PhotonPipelineResult.getBestTarget / getLatencyMillis, VisionSystemSim). Did not rebuild the Sphinx site.

Related Issues

Closes #1914


AI Disclosure

  • This PR was authored entirely by me
  • This PR includes AI-generated code (e.g., from GitHub Copilot, ChatGPT)
    • If yes, I have reviewed all AI-generated code for correctness
    • If yes, please describe which parts were AI-assisted:

Merge Checklist

Additional Checks (if applicable)

  • User-facing changes? User documentation is updated

Mixed rli/code-block tab-set-code groups broke the Python tabs.
Switched those to tab-set/tab-item and filled the photonlibpy
examples that were still marked coming soon.
@AzazelSensei
AzazelSensei requested a review from a team as a code owner September 2, 2026 01:25
@github-actions github-actions Bot added the documentation Anything relating to https://docs.photonvision.org label Sep 2, 2026

@mcm001 mcm001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that with 2027 the examples may need to be rewritten so we'll have to update RLIs again

@mcm001
mcm001 merged commit c0bc407 into PhotonVision:main Sep 6, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Anything relating to https://docs.photonvision.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python Documentation Issue Tracker

2 participants