Skip to content

Commit aeaba8b

Browse files
gitttt-1234alicup29talmo
authored
Migrate to mkdocs for sleap documentation (#2367)
* Modify mkdocs.yml and docs.yml * Change docs to mkdocs * Change docs workflow to uv * Remove path filters * Fix docs.yml * Fix docs.yml * Add branches * Run with uv * Fix links * Fix redirect links * Fix docs sleap.ai links * Add API references * Modify CLI docs * Modify colab to use sleap-nn and sleap-io * change: uv installation integration * change: remove unnecessary warning * change: comment out conda related setup * change: remove conda setup steps & replace w/ uv * fix: add tip to copy entire instance * fix: additional reminder for pip installation * fix: add help flag shortcut to train/track * fix: include yaml config format * change: add `uv run` reminder & remove deprecated sleap-render args * Update guides and learnings * change: update features to include nn and io & uv quick install * fix: remove deprecated CLI feature desc. from sleap-inspect * fix: ruff error * Add note to point to sleap-nn cli * Update training notebooks * change: update uv installation instructions for uv tool install/uvx/uv sync * fix: change quick install to quick start and use uvx * Add what's new section * change: typos and moving around info boxes * change: uv installation steps revamp (platform-specific/installation verification * Update model evaluation notebook * fix: reformat tip about uv pip * fix: highlight use of YAML config * fix: highlight that uvx is only invocation, not installation --------- Co-authored-by: AmickL <[email protected]> Co-authored-by: AmickL <[email protected]> Co-authored-by: Talmo Pereira <[email protected]>
1 parent 013205a commit aeaba8b

File tree

268 files changed

+9057
-7418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+9057
-7418
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 5 deletions

.github/workflows/docs.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
1-
# Docs build
2-
name: Docs
1+
name: Deploy MkDocs to GitHub Pages
32

43
on:
5-
workflow_dispatch
6-
# release:
7-
# types:
8-
# - published
9-
# push:
10-
# branches:
11-
# - main
12-
# - develop
13-
# paths:
14-
# - "sleap/**"
15-
# - "docs/**"
16-
# - "mkdocs.yml"
17-
# - ".github/workflows/docs.yml"
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
- divya/change-to-mkdocs
9+
workflow_dispatch: # Allows manual triggering from GitHub UI
1810

1911
jobs:
2012
docs:
2113
name: Docs
2214
runs-on: "ubuntu-latest"
2315
permissions:
24-
# Give the default GITHUB_TOKEN write permission to commit and push the
25-
# added or changed files to the repository.
2616
contents: write
2717
steps:
2818
- name: Checkout repo
2919
uses: actions/checkout@v4
3020
with:
31-
fetch-depth: 0 # Fetch all history for all branches
21+
fetch-depth: 0
3222

3323
- name: Setup UV
3424
uses: astral-sh/setup-uv@v6
@@ -37,28 +27,48 @@ jobs:
3727

3828
- name: Install dependencies
3929
run: |
40-
uv sync --all-extras
30+
uv sync --extra dev --extra nn-cpu --extra docs --extra jupyter
4131
4232
- name: Print environment info
4333
run: |
44-
uv run python --version
45-
uv run pip freeze
34+
which python
35+
uv pip list
36+
uv pip freeze
4637
4738
- name: Setup Git user
4839
run: |
4940
git config --global user.name "github-actions[bot]"
5041
git config --global user.email "github-actions[bot]@users.noreply.github.com"
5142
52-
- name: Build and upload docs (release)
43+
- name: Build and upload docs (release event)
5344
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5645
run: |
57-
uv run mike deploy --update-aliases --allow-empty --push "${{ github.event.release.tag_name }}" latest
46+
uv runmike deploy --update-aliases --allow-empty --push "${{ github.event.release.tag_name }}" stable
5847
59-
- name: Build and upload docs (dev)
60-
if: ${{ github.event_name == 'push' }}
61-
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
- name: Get tag that 'stable' alias points to, or fallback to 'dev'
49+
id: get-stable-tag
6350
run: |
64-
uv run mike deploy --update-aliases --allow-empty --push dev
51+
git fetch origin gh-pages || true
52+
git checkout origin/gh-pages -- versions.json 2>/dev/null || true
53+
54+
if [ -f versions.json ]; then
55+
stable_tag=$(jq -r '.[] | select(.aliases | index("stable")) | .version' versions.json)
56+
fi
57+
58+
if [ -z "$stable_tag" ]; then
59+
echo "No stable alias found. Falling back to 'dev'."
60+
stable_tag="dev"
61+
fi
62+
63+
echo "Using: $stable_tag"
64+
echo "stable_tag=$stable_tag" >> $GITHUB_OUTPUT
65+
66+
67+
- name: Build and upload docs (push event)
68+
if: github.event_name == 'push'
69+
run: |
70+
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
71+
uv run mike deploy --update-aliases --allow-empty --push "${{ steps.get-stable-tag.outputs.stable_tag }}" stable
72+
else
73+
uv run mike deploy --update-aliases --allow-empty --push dev
74+
fi

.github/workflows/website.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 14 deletions

docs/Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/__init__.py

Whitespace-only changes.

docs/_static/add-skeleton.gif

-1.04 MB
Binary file not shown.

docs/_static/add-video.gif

-315 KB
Binary file not shown.

docs/_static/bottomup_approach.jpg

-467 KB
Binary file not shown.

docs/_static/css/tabs.css

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)