Skip to content
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

Replace requirements-docs.txt with a python doc pixi environment #5909

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- uses: prefix-dev/[email protected]
with:
python-version: "3.8"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-doc.txt
pixi-version: v0.18.0

- name: Build via mkdocs
shell: bash
run: |
mkdocs build --strict -f rerun_py/mkdocs.yml
pixi run -e py-docs mkdocs build --strict -f rerun_py/mkdocs.yml

no-codegen-changes:
name: Check if running codegen would produce any changes
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,12 @@ jobs:
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}

- name: Set up Python
uses: actions/setup-python@v4
- uses: prefix-dev/[email protected]
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "rerun_py/requirements-doc.txt"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-doc.txt
pixi-version: v0.18.0

- name: Build via mkdocs
shell: bash
run: |
mkdocs build --strict -f rerun_py/mkdocs.yml
run: pixi run -e py-docs mkdocs build --strict -f rerun_py/mkdocs.yml

# ---------------------------------------------------------------------------

Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/reusable_checks_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,11 @@ jobs:
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}

- name: Set up Python
uses: actions/setup-python@v4
- uses: prefix-dev/[email protected]
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "rerun_py/requirements-doc.txt"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-doc.txt
pixi-version: v0.18.0

- name: Build via mkdocs
shell: bash
run: |
mkdocs build --strict -f rerun_py/mkdocs.yml
pixi run -e py-docs mkdocs build --strict -f rerun_py/mkdocs.yml
17 changes: 4 additions & 13 deletions .github/workflows/reusable_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,9 @@ jobs:
fetch-depth: 0 # Don't do a shallow clone
ref: ${{ inputs.RELEASE_COMMIT || (github.event_name == 'pull_request' && github.event.pull_request.head.ref || '') }}

- name: Set up Python
uses: actions/setup-python@v4
- uses: prefix-dev/[email protected]
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "rerun_py/requirements-doc.txt"

- name: Install Python dependencies
shell: bash
run: |
pip install --upgrade pip
pip install -r rerun_py/requirements-doc.txt
pixi-version: v0.18.0

- name: Set up git author
shell: bash
Expand All @@ -89,7 +80,7 @@ jobs:
shell: bash
run: |
git fetch
mike deploy -F rerun_py/mkdocs.yml --rebase -b gh-pages --prefix docs/python -u ${{inputs.PY_DOCS_VERSION_NAME}} stable
pixi run -e py-docs mike deploy -F rerun_py/mkdocs.yml --rebase -b gh-pages --prefix docs/python -u ${{inputs.PY_DOCS_VERSION_NAME}} stable
git checkout gh-pages
git checkout --orphan gh-pages-orphan
git commit -m "Update docs for ${GITHUB_SHA}"
Expand All @@ -103,7 +94,7 @@ jobs:
shell: bash
run: |
git fetch
mike deploy -F rerun_py/mkdocs.yml --rebase -b gh-pages --prefix docs/python ${{inputs.PY_DOCS_VERSION_NAME}}
pixi run -e py-docs mike deploy -F rerun_py/mkdocs.yml --rebase -b gh-pages --prefix docs/python ${{inputs.PY_DOCS_VERSION_NAME}}
git checkout gh-pages
git checkout --orphan gh-pages-orphan
git commit -m "Update docs for ${GITHUB_SHA}"
Expand Down
5 changes: 0 additions & 5 deletions crates/re_build_search_index/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ Builds a Meilisearch index from our documentation.
rustup install nightly
rustup +nightly target add wasm32-unknown-unknown
```
- A local installation of `rerun_sdk` and `rerun_py/requirements-doc.txt`
```
pixi run py-build
pixi run pip install -r rerun_py/requirements-doc.txt
```

### Usage

Expand Down
4 changes: 3 additions & 1 deletion crates/re_build_search_index/src/ingest/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub fn ingest(ctx: &Context) -> anyhow::Result<()> {
.with_arg("rerun_py/site/objects.inv")
.with_arg("-")
.parse_json::<SphinxObjectInv>()
.context("sphobjinv may not be installed, install rerun_py/requirements-doc.txt")?
.context(
"sphobjinv may not be installed, are you running in the py-docs pixi environment?",
)?
.objects
.into_values()
.map(|o| (o.name.clone(), o))
Expand Down
Loading
Loading