-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all dev/ci requirements.txt and fully replace with pixi (#5939)
### What * Fixes #5895 In the process cleans up quite a bit more ci to use the pixi environment consequently. Note that the process I followed here was essentially: * pick a requirements.txt file * check for each of its package if it's already in pixi * if not, try adding it as conda package to pixi * if not add it as pypi package to pixi * try documenting who uses it * repeat until requirements.txt file is empty * remove mentions of the requirements.txt file, ensure that python invocations below are using pixi ### 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 examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5939?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/5939?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/5939) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
29 changed files
with
1,227 additions
and
1,522 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -20,16 +20,9 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install "PyGithub==1.59.0" "requests>=2.31,<3" | ||
pixi-version: v0.18.0 | ||
|
||
- name: Wait a few seconds | ||
shell: bash | ||
|
@@ -40,7 +33,7 @@ jobs: | |
- name: Approve workflow runs | ||
shell: bash | ||
run: | | ||
python3 scripts/ci/approve_workflow_runs.py \ | ||
pixi run python scripts/ci/approve_workflow_runs.py \ | ||
--github-token "${{ secrets.GITHUB_TOKEN }}" \ | ||
--github-repository "rerun-io/rerun" \ | ||
--pr-number "${{ github.event.pull_request.number || github.event.issue.number }}" |
This file contains 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 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 |
---|---|---|
|
@@ -28,20 +28,14 @@ jobs: | |
with: | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install deps | ||
shell: bash | ||
run: | | ||
python3 -m pip install PyGithub==1.59.0 | ||
pixi-version: v0.18.0 | ||
|
||
- name: Check PR checkboxes | ||
shell: bash | ||
run: | | ||
./scripts/ci/check_pr_checkboxes.py \ | ||
pixi run ./scripts/ci/check_pr_checkboxes.py \ | ||
--github-token ${{ secrets.GITHUB_TOKEN }} \ | ||
--github-repository ${{ github.repository }} \ | ||
--pr-number ${{ github.event.pull_request.number }} |
This file contains 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 |
---|---|---|
|
@@ -49,26 +49,12 @@ jobs: | |
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.19.0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Python dependencies | ||
shell: bash | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r rerun_py/requirements-lint.txt | ||
|
||
- name: Python format check | ||
shell: bash | ||
run: | | ||
pixi run py-fmt-check | ||
run: pixi run py-fmt-check | ||
|
||
- name: Lint Python | ||
shell: bash | ||
run: | | ||
pixi run py-lint | ||
run: pixi run py-lint | ||
|
||
py-test-docs: | ||
name: Test Python Docs | ||
|
@@ -81,9 +67,7 @@ jobs: | |
pixi-version: v0.19.0 | ||
|
||
- name: Build via mkdocs | ||
shell: bash | ||
run: | | ||
pixi run -e py-docs mkdocs build --strict -f rerun_py/mkdocs.yml | ||
run: 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 | ||
|
@@ -122,11 +106,6 @@ jobs: | |
with: | ||
pixi-version: v0.19.0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Rerun lints | ||
run: pixi run lint-rerun | ||
|
||
|
This file contains 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 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 |
---|---|---|
|
@@ -23,20 +23,14 @@ jobs: | |
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install deps | ||
shell: bash | ||
run: | | ||
python3 -m pip install -r ./scripts/ci/requirements.txt | ||
pixi-version: v0.19.0 | ||
|
||
- name: Update PR description | ||
shell: bash | ||
run: | | ||
./scripts/ci/update_pr_body.py \ | ||
pixi run ./scripts/ci/update_pr_body.py \ | ||
--github-token '${{ secrets.GITHUB_TOKEN }}' \ | ||
--github-repository '${{ github.repository }}' \ | ||
--pr-number '${{ github.event.pull_request.number }}' |
This file contains 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 |
---|---|---|
|
@@ -78,16 +78,6 @@ jobs: | |
with: | ||
node-version: 18 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install deps | ||
shell: bash | ||
run: | | ||
python3 -m pip install -r ./scripts/ci/requirements-crates.txt | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.19.0 | ||
|
@@ -97,40 +87,40 @@ jobs: | |
shell: bash | ||
run: | | ||
echo Check that the release version matches expected format… | ||
python3 scripts/ci/crates.py check-git-branch-name | ||
pixi run python scripts/ci/crates.py check-git-branch-name | ||
echo Parse the release version from the branch name… | ||
# `release-0.8.1-meta.N` -> `0.8.1` | ||
release_version=$(python3 scripts/ci/crates.py get-version --from git --finalize) | ||
release_version=$(pixi run python scripts/ci/crates.py get-version --from git --finalize) | ||
echo "release_version: $release_version" | ||
echo Store version before the update, so we can later detect if it changed… | ||
previous=$(python3 scripts/ci/crates.py get-version) | ||
previous=$(pixi run python scripts/ci/crates.py get-version) | ||
echo If the version minus prerelease/build metadata is not the same as the release version, then update it.… | ||
if [ $(python3 scripts/ci/crates.py get-version --finalize) != $release_version ]; then | ||
python3 scripts/ci/crates.py version --exact $release_version | ||
if [ $(pixi run python scripts/ci/crates.py get-version --finalize) != $release_version ]; then | ||
pixi run python scripts/ci/crates.py version --exact $release_version | ||
fi | ||
echo If this is an 'rc', additionally set add '-rc.N'. This will also bump the 'N' if '-rc.N' is already set… | ||
if [ ${{ inputs.release-type }} = "rc" ]; then | ||
python3 scripts/ci/crates.py version --bump prerelease --pre-id=rc | ||
pixi run python scripts/ci/crates.py version --bump prerelease --pre-id=rc | ||
fi | ||
echo If this is an 'alpha', set the version to whatever is in the git branch name.… | ||
if [ ${{ inputs.release-type }} = "alpha" ]; then | ||
python3 scripts/ci/crates.py version --exact $(python3 scripts/ci/crates.py get-version --from git) | ||
pixi run python scripts/ci/crates.py version --exact $(pixi run python scripts/ci/crates.py get-version --from git) | ||
fi | ||
echo If this is a 'final', set the version to the final release version… | ||
if [ ${{ inputs.release-type }} = "final" ]; then | ||
python3 scripts/ci/crates.py version --exact $release_version | ||
pixi run python scripts/ci/crates.py version --exact $release_version | ||
fi | ||
echo Store version after the update, and the expected "final" release version… | ||
current=$(python3 scripts/ci/crates.py get-version) | ||
final=$(python3 scripts/ci/crates.py get-version --finalize) | ||
current=$(pixi run python scripts/ci/crates.py get-version) | ||
final=$(pixi run python scripts/ci/crates.py get-version --finalize) | ||
echo Output everything for use in other steps… | ||
echo "previous=$previous" >> "$GITHUB_OUTPUT" | ||
|
@@ -385,20 +375,10 @@ jobs: | |
with: | ||
node-version: 18 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.19.0 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python3 -m pip install -r scripts/ci/requirements-crates.txt | ||
- name: Commit new version | ||
shell: bash | ||
run: | | ||
|
@@ -409,9 +389,9 @@ jobs: | |
git pull --rebase | ||
# bump version and commit it | ||
python3 scripts/ci/crates.py version --bump auto | ||
pixi run python scripts/ci/crates.py version --bump auto | ||
pixi run toml-fmt | ||
version="$(python3 scripts/ci/crates.py get-version)" | ||
version="$(pixi run python scripts/ci/crates.py get-version)" | ||
git commit -am "Bump versions to $version" | ||
git push | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -31,10 +31,9 @@ jobs: | |
with: | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
python-version: 3.11 | ||
pixi-version: v0.18.0 | ||
|
||
- id: "auth" | ||
uses: google-github-actions/auth@v2 | ||
|
@@ -47,14 +46,10 @@ jobs: | |
with: | ||
version: ">= 363.0.0" | ||
|
||
- name: Install deps | ||
shell: bash | ||
run: pip install google-cloud-storage Jinja2 PyGithub | ||
|
||
- name: Render HTML template | ||
shell: bash | ||
run: | | ||
python scripts/ci/generate_pr_summary.py \ | ||
pixi run python scripts/ci/generate_pr_summary.py \ | ||
--github-token ${{secrets.GITHUB_TOKEN}} \ | ||
--github-repository ${GITHUB_REPOSITORY} \ | ||
--pr-number ${{ inputs.PR_NUMBER }} \ | ||
|
Oops, something went wrong.