-
Notifications
You must be signed in to change notification settings - Fork 244
Add documentation for python #1887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
samfreund
wants to merge
60
commits into
main
Choose a base branch
from
py-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 41 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
8452527
Update photon-api-docs.yml
samfreund c440ce5
Update photon-api-docs.yml
samfreund 35c72e8
Update photon-api-docs.yml
samfreund 47b799a
add docs for python
samfreund 462a2aa
Update photon-api-docs.yml
samfreund 7c6bab1
Update photon-api-docs.yml
samfreund 6d816b5
Update photon-api-docs.yml
samfreund 3c73b68
Update index.md
samfreund 55303cc
Update index.md
samfreund 34057f2
autogen files
samfreund 32e4f00
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund ddacff7
Update photon-api-docs.yml
samfreund 05309b1
Update mkdocs.yml
samfreund abc67bd
add logo
samfreund 88a1e78
actually add the logo
samfreund 77d5388
Update photon-api-docs.yml
samfreund e334d26
Update python.yml
samfreund 358f574
man I hate linting
samfreund 871ca61
Merge branch 'main' into py-docs
samfreund eb85834
add brand color
samfreund 331f4f0
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund d1761d0
update to exclude packet.py
samfreund 228caf4
Update photon-api-docs.yml
samfreund 3cdda8a
Add instructions for excluding a file
samfreund e522642
linting
samfreund 4081502
Update photon-api-docs.yml
samfreund 3547d05
exclude generated files
samfreund aacbdf5
Update index.md
samfreund a5b1cc0
Update photon-api-docs.yml
samfreund a5bc638
Merge branch 'main' into py-docs
samfreund ffdda9d
Update photon-api-docs.yml
samfreund 44b46cf
yeah that's good enough
samfreund 0bec1f2
Update photon-api-docs.yml
samfreund 0147a44
remove source
samfreund 3eea79f
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund b22371d
Merge branch 'main' into py-docs
samfreund abcd6b8
add docs to readme
samfreund 87b219d
Merge branch 'main' into py-docs
samfreund 697e52f
lint
samfreund 96b0938
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund c2581f3
limit publishing
samfreund fa8b60f
convert to requirements.txt
samfreund ebd1071
Merge branch 'main' into py-docs
samfreund 416e2f7
update versions
samfreund 783ed82
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund 476cd6d
Update photon-api-docs.yml
samfreund 8fb29ff
Update photon-api-docs.yml
samfreund dc0985d
fix docstrings style
samfreund cf68403
Merge branch 'py-docs' of github.com:photonvision/photonvision into p…
samfreund 50adef1
publish release docs
samfreund abb8ccf
add conditionals for publishing
samfreund 26f08a6
switch to sphinx
samfreund 8cf48be
update requirements.txt
samfreund 326c77f
dammit, it was a typo
samfreund 892e240
change theme
samfreund 6f2fd19
add files to index
samfreund 1637be6
change path
samfreund 05fcf87
debugggggging
samfreund 6fbb41f
this should fix importing?
samfreund 46e7170
trigger docs run
samfreund File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
* [estimatedRobotPose](reference/estimatedRobotPose.md) | ||
* estimation | ||
* [cameraTargetRelation](reference/estimation/cameraTargetRelation.md) | ||
* [openCVHelp](reference/estimation/openCVHelp.md) | ||
* [rotTrlTransform3d](reference/estimation/rotTrlTransform3d.md) | ||
* [targetModel](reference/estimation/targetModel.md) | ||
* [visionEstimation](reference/estimation/visionEstimation.md) | ||
* networktables | ||
* [NTTopicSet](reference/networktables/NTTopicSet.md) | ||
* [photonCamera](reference/photonCamera.md) | ||
* [photonPoseEstimator](reference/photonPoseEstimator.md) | ||
* simulation | ||
* [photonCameraSim](reference/simulation/photonCameraSim.md) | ||
* [simCameraProperties](reference/simulation/simCameraProperties.md) | ||
* [videoSimUtil](reference/simulation/videoSimUtil.md) | ||
* [visionSystemSim](reference/simulation/visionSystemSim.md) | ||
* [visionTargetSim](reference/simulation/visionTargetSim.md) | ||
* targeting | ||
* [TargetCorner](reference/targeting/TargetCorner.md) | ||
* [multiTargetPNPResult](reference/targeting/multiTargetPNPResult.md) | ||
* [photonPipelineResult](reference/targeting/photonPipelineResult.md) | ||
* [photonTrackedTarget](reference/targeting/photonTrackedTarget.md) | ||
* timesync | ||
* [timeSyncServer](reference/timesync/timeSyncServer.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# PhotonLib Python Docs | ||
|
||
For the full PhotonVision documentation visit [docs.photonvision.org](https://docs.photonvision.org). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:root > * { | ||
--md-primary-fg-color: #3498DB; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# gen_api_docs.py | ||
|
||
from pathlib import Path | ||
|
||
import mkdocs_gen_files | ||
|
||
nav = mkdocs_gen_files.Nav() | ||
|
||
for path in sorted(Path("photonlibpy").rglob("*.py")): | ||
if path.name == "py.typed": | ||
continue | ||
|
||
module_path = path.with_suffix("").as_posix().replace("/", ".") | ||
parts = tuple(path.relative_to("photonlibpy").with_suffix("").parts) | ||
|
||
if path.name == "__init__.py": | ||
continue | ||
else: | ||
doc_path = Path("reference", *parts).with_suffix(".md") | ||
|
||
nav[parts] = doc_path.as_posix() | ||
|
||
with mkdocs_gen_files.open(doc_path, "w") as f: | ||
f.write(f"# `{module_path}`\n\n::: {module_path}") | ||
|
||
mkdocs_gen_files.set_edit_path(doc_path, path) | ||
|
||
with mkdocs_gen_files.open("reference/SUMMARY.md", "w") as nav_file: | ||
nav_file.writelines(nav.build_literate_nav()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
site_name: PhotonLibPy Docs | ||
theme: | ||
name: material | ||
favicon: docs/favicon.ico # If you want a favicon | ||
logo: logo.svg # Optional logo | ||
palette: | ||
primary: custom | ||
|
||
plugins: | ||
- search: | ||
- mkdocstrings: | ||
handlers: | ||
python: | ||
options: | ||
show_source: false | ||
paths: | ||
- "." | ||
- gen-files: | ||
scripts: | ||
- gen_api_docs.py | ||
- literate-nav | ||
- section-index | ||
# To exclude files, add them under glob using their | ||
# path from photonlibpy prepended by reference/ | ||
# Additionally, change the extension from .py to .md | ||
- exclude: | ||
glob: | ||
- "reference/packet.md" | ||
- "reference/generated/*" | ||
|
||
nav: | ||
- Home: index.md | ||
- Reference: reference/SUMMARY.md | ||
|
||
extra_css: | ||
- stylesheets/extra.css | ||
|
||
extra_javascript: | ||
- js/exclude-details.js |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.