Skip to content

Commit

Permalink
Replace requirements-docs.txt with a python doc pixi environment (#5909)
Browse files Browse the repository at this point in the history
### What

* Part of  #5895

requirements-docs is still mentioned in python readme, this is handled
in
* #5911

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[rerun.io/viewer](https://rerun.io/viewer/pr/5909)
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5909?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5909?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5909)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
Wumpf authored Apr 11, 2024
1 parent d884026 commit 9d584c7
Show file tree
Hide file tree
Showing 12 changed files with 6,198 additions and 268 deletions.
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

0 comments on commit 9d584c7

Please sign in to comment.