Docs audit [April 2026]: Add dev docs#3336
Conversation
546d24f to
b52abbf
Compare
|
@C-Achard, ready for intermediate review. We should discuss limiting the documented API further to focus only on the current main API. Let's also discuss the workflows. |
|
Thanks, having a look now! |
C-Achard
left a comment
There was a problem hiding this comment.
Ok, there are a lot of comments, I'd suggest discussing this together @deruyter92, or happy to answer here if you have questions.
Thanks for adapting this!
| - name: Configure git for mike | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" |
There was a problem hiding this comment.
Does the bot need special permissions ?
There was a problem hiding this comment.
Good point, we need to add permissions for pushing to the gh-pages branch
There was a problem hiding this comment.
Based on compat, should this be numpy instead?
[tool.ruff.lint.pydocstyle]
convention = "google"There was a problem hiding this comment.
And should we add auto dosctring formatting? Some API docs render weirdly for me, I think because of styling issues in the dosctrings
There was a problem hiding this comment.
I would rather stick with google, which should normally work well with mkdocs as well.
I agree that a lot of docstrings render weirdly at the moment, which is probably worth an extra PR.
There was a problem hiding this comment.
Can we somehow avoid duplicates?
There was a problem hiding this comment.
yes good suggestion, this is duplicated now indeed
There was a problem hiding this comment.
Recommend adding:
[tool.ruff.format]
docstring-code-format = trueThis helps make docstrings more consistent.
Warning
This is going to change a lot of files though! We could make a separate PR if preferred
There was a problem hiding this comment.
Lets do it in a separate PR!
| returns_multiple_items: false | ||
| docstring_section_style: table | ||
| separate_signature: true | ||
| line_length: 88 |
There was a problem hiding this comment.
| line_length: 88 | |
| line_length: 120 | |
| dosctring_style: numpy |
This solves a lot of rendering oddities in parameters for me, but not all. Still, params sections render correctly with this.
There was a problem hiding this comment.
Good suggestion, feel free to play around with it in this branch. I'm currently not working at it.
|
|
||
| copyright: "Copyright © 2026 The DeepLabCut Team" | ||
|
|
||
| nav: |
There was a problem hiding this comment.
Could we put mds in a folder tree mirroring the TOC or at least grouped by topic for future extensibility?
There was a problem hiding this comment.
yes we can do that, good suggestion.
There was a problem hiding this comment.
I would recommend not adding this, I think contribution guides cover dev installation well enough.
pre-commit usage and config, CI workflows, etc, would be better topics IMO
There was a problem hiding this comment.
agreed. Let's keep it in the main docs only
|
|
||
| ## Running Top-Down Video Analysis with Existing Bounding Boxes | ||
|
|
||
| When `deeplabcut.pose_estimation_pytorch.apis.videos.video_inference` is called with a top-down model, it is assumed that a detector snapshot is given as well to obtain bounding boxes with which to run pose estimation. It's possible that you've already obtained bounding boxes for your video (with another object detector or through some other means), and you want to reuse those bounding boxes instead of running an object detector again. |
There was a problem hiding this comment.
This kind of guidance is super nice
There was a problem hiding this comment.
shall we add it in the main docs as well? or only dev-docs material?
| extra: | ||
| version: | ||
| provider: mike | ||
| default: main |
There was a problem hiding this comment.
| extra: | |
| version: | |
| provider: mike | |
| default: main | |
| extra: | |
| main_docs_url: "https://deeplabcut.github.io/DeepLabCut/" | |
| version: | |
| provider: mike | |
| default: main |
| nav: | ||
| - Get Started: |
There was a problem hiding this comment.
| nav: | |
| - Get Started: | |
| nav: | |
| - "← Main Documentation": "https://deeplabcut.github.io/DeepLabCut/" | |
| - Get Started: |
|
@C-Achard: green light to play around with this branch, I am currently not working on it. Good suggestions overall! |
Replacement PR for #3187 by @arashsm79 (credits go to @arashsm79, see the original PR for commit history).
Progress:
Description
Dev docs: build & deploy approach
This PR adds a second documentation site alongside the existing Jupyter Book, aimed at maintainers and developers. It lives under
/dev/on GitHub Pages and is versioned with mike.What gets built
deeplabcut, exceptcli,gui,benchmark,version-> should probably be limited further as most API has no clear docstrings currently, and some are distracting from the main APIs._toc.ymllinks todocs/dev.md, which redirects to/dev/(mike default →/dev/main/)CI on PRs (build only)
build-dev-docs.yml— reusable workflow; installs.[dev-docs]+ cairo deps, runsmkdocs build -f dev-docs/mkdocs.ymlintelligent-testing.ymlwhen the docs lane runsAuto-deploy on push to
maindeploy-docs.ymlpublishes both doc sets to thegh-pagesbranch:build-main-docs.yml) → artifactkeep_files: true(preserves/dev/)mike deploy main→gh-pages/dev/main/, thenmike set-default mainso/dev/redirects to the moving docs frommainThe
mainversion label means “docs tracking themainbranch”, distinct from frozen release snapshots like2.9or3.0.Manual release snapshots
manage-dev-docs.yml(workflow_dispatch only):2.9) from a git tagdev-docs/+pyproject.toml(tooling always current)deeplabcut/from the tag (API matches that release)mike deploy→gh-pages/dev/<version>/Design choices worth noting
/dev/; peaceiris runs before mike so root deploy doesn’t wipe versioned docsmain