From f0496d64153533f254264b31c90765c1c5393f71 Mon Sep 17 00:00:00 2001 From: Russ Tedrake Date: Wed, 25 Nov 2026 07:35:56 -0500 Subject: [PATCH 1/2] Bring CI to parity with manipulation; prefetch remote packages The nightly CI on master failed when the spot_description download timed out in the middle of test_spot. Port manipulation's CI improvements: - Prefetch Drake remote packages (setup/prefetch_remotes.py, with retries from htmlbook) before pytest, then run pytest with DRAKE_ALLOW_NETWORK=lcm:meshcat so uncached packages fail loudly instead of downloading mid-test. - Check out underactuated-solutions at solutions_sha.txt when the SOLUTIONS_TOKEN secret is available, so solutions are tested too. - Gate fork PRs behind collaborator status or the approved-for-ci label, via pull_request_target, before they receive secrets. - Run pytest with two xdist workers (--dist loadfile) and one native thread each; report slow tests and upload JUnit timings. - Use Ubuntu's git, skip system Jupyter in the Poetry job (INSTALL_JUPYTER=0), and drop xvfb, which nothing here needs. - Harden Homebrew setup on macOS; use Poetry 2.5.1 to match poetry.lock. - Add book/test_notebook_coverage.py using the shared htmlbook check. hybrid.ipynb and lcp_cart.ipynb were already disabled; list them as UNTESTED with their reasons. - Document all of this in docs/testing.md. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/main.yml | 296 +++++++++++++++++++++++--- book/htmlbook | 2 +- book/test_notebook_coverage.py | 39 ++++ docs/testing.md | 68 ++++++ poetry.lock | 108 ++++++---- pyproject.toml | 1 + setup/mac/install_prereqs.sh | 16 +- setup/prefetch_remotes.py | 24 +++ setup/ubuntu/24.04/install_prereqs.sh | 10 +- 9 files changed, 488 insertions(+), 76 deletions(-) create mode 100644 book/test_notebook_coverage.py create mode 100644 docs/testing.md create mode 100644 setup/prefetch_remotes.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e9f35682..73eded20 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,172 +35,398 @@ on: - opened - reopened - synchronize + pull_request_target: + types: + - labeled push: branches: - master schedule: - cron: '0 8 * * *' + +# Avoid multiplying native numerical-library threads across pytest workers. +env: + OMP_NUM_THREADS: '1' + OPENBLAS_NUM_THREADS: '1' + MKL_NUM_THREADS: '1' + NUMEXPR_NUM_THREADS: '1' + +concurrency: + # Label-triggered runs must not cancel the regular pull-request checks. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: + check-approval: + name: Check PR approval status + runs-on: ubuntu-latest + outputs: + should-run: ${{ steps.check.outputs.should-run }} + is-trusted: ${{ steps.check.outputs.is-trusted }} + steps: + - name: Check approval status + id: check + run: | + if [[ "${{ github.event_name }}" != "pull_request_target" ]]; then + echo "is-trusted=true" >> $GITHUB_OUTPUT + echo "should-run=true" >> $GITHUB_OUTPUT + echo "✅ Push or scheduled event - running tests automatically" + exit 0 + fi + + if [[ "${{ github.event.pull_request.author_association }}" == "COLLABORATOR" ]] || \ + [[ "${{ github.event.pull_request.author_association }}" == "MEMBER" ]] || \ + [[ "${{ github.event.pull_request.author_association }}" == "OWNER" ]]; then + echo "is-trusted=true" >> $GITHUB_OUTPUT + echo "should-run=true" >> $GITHUB_OUTPUT + echo "✅ Trusted contributor - running tests automatically" + elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'approved-for-ci') }}" == "true" ]]; then + echo "is-trusted=false" >> $GITHUB_OUTPUT + echo "should-run=true" >> $GITHUB_OUTPUT + echo "✅ First-time contributor approved via label - running tests" + else + echo "is-trusted=false" >> $GITHUB_OUTPUT + echo "should-run=false" >> $GITHUB_OUTPUT + echo "⏳ First-time contributor - waiting for maintainer approval" + echo "To approve this PR for CI, add the 'approved-for-ci' label" + fi + noble-poetry: name: ubuntu noble using poetry runs-on: ubuntu-24.04 container: ubuntu:24.04 + needs: [check-approval] + if: > + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) + || + (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository && + needs.check-approval.outputs.should-run == 'true') + || + (github.event_name != 'pull_request' && + github.event_name != 'pull_request_target') steps: - name: pre-checkout setup run: | - export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 DEBIAN_FRONTEND=noninteractive + export DEBIAN_FRONTEND=noninteractive apt-get update -o APT::Acquire::Retries=4 -qq - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends ca-certificates gnupg sudo - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24 - echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu noble main' > /etc/apt/sources.list.d/git.list - apt-get update -o APT::Acquire::Retries=4 -qq - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends git + apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends ca-certificates sudo git # Create non-root user for running repository setup / tests useradd -m -s /bin/bash runner echo 'runner ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - rm -rf /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin /var/lib/apt/lists/* /var/log/apt/* shell: bash + + - name: checkout PR code + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + sparse-checkout: | + * + !.github + sparse-checkout-cone-mode: false + - name: checkout + if: github.event_name != 'pull_request_target' uses: actions/checkout@v6 with: submodules: recursive + + - name: checkout solutions + env: + SOLUTIONS_TOKEN: ${{ secrets.SOLUTIONS_TOKEN }} + run: | + if [[ -z "${SOLUTIONS_TOKEN}" ]]; then + echo "SOLUTIONS_TOKEN not available; skipping solutions checkout" + exit 0 + fi + git clone https://x-access-token:${SOLUTIONS_TOKEN}@github.com/RobotLocomotion/underactuated-solutions.git solutions + cd solutions && git checkout $(cat ../solutions_sha.txt) && cd .. + shell: bash + - name: install dependencies run: | # Fix ownership of the workspace chown -R runner:runner . # Switch to runner user for remaining commands + sudo -H -u runner ./setup/submodule_checkout # Install system packages as root - ./setup/ubuntu/24.04/install_prereqs.sh - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends xvfb - sudo -H -u runner python3 -m pip install --user --break-system-packages poetry==2.4.3 + INSTALL_JUPYTER=0 ./setup/ubuntu/24.04/install_prereqs.sh + sudo -H -u runner python3 -m pip install --user --break-system-packages poetry==2.5.1 sudo -H -u runner python3 -m poetry config virtualenvs.in-project true sudo -H -u runner python3 -m poetry install --all-extras --with dev rm -rf /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin /var/lib/apt/lists/* /var/log/apt/* shell: bash + + - name: prefetch remote packages + run: | + sudo -H -u runner env XDG_CACHE_HOME=/tmp \ + "$(pwd)/.venv/bin/python" -m setup.prefetch_remotes + shell: bash + - name: test run: | set -euo pipefail VENV_PYTHON="$(pwd)/.venv/bin/python" - sudo -H -u runner xvfb-run \ - --auto-servernum \ - --server-args='-screen 0 1280x1024x24 -ac +extension GLX +extension RANDR +render -noreset' \ - "$VENV_PYTHON" -m pytest -ra + sudo --preserve-env=OMP_NUM_THREADS,OPENBLAS_NUM_THREADS,MKL_NUM_THREADS,NUMEXPR_NUM_THREADS \ + -H -u runner env -u DISPLAY XDG_CACHE_HOME=/tmp \ + DRAKE_ALLOW_NETWORK=lcm:meshcat "$VENV_PYTHON" -m pytest -n 2 --dist loadfile -ra --durations=30 --junitxml=test-results/pytest.xml shell: bash - # TODO(russt): add noble-pip-core workflow which only runs the tests in underactuated, but uses the underactuated module from pip. + + - name: upload test timings + if: always() + uses: actions/upload-artifact@v4 + with: + name: pytest-${{ github.job }} + path: test-results/pytest.xml + if-no-files-found: ignore + retention-days: 14 + + # TODO(russt): add noble-pip-core workflow which only runs the tests in + # underactuated, but uses the underactuated module from pip. noble-pip-all: name: ubuntu noble using wheel all runs-on: ubuntu-24.04 container: ubuntu:24.04 + needs: [check-approval] + if: > + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) + || + (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository && + needs.check-approval.outputs.should-run == 'true') + || + (github.event_name != 'pull_request' && + github.event_name != 'pull_request_target') steps: - name: pre-checkout setup run: | - export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 DEBIAN_FRONTEND=noninteractive - apt-get update -o APT::Acquire::Retries=4 -qq - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends ca-certificates gnupg sudo - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24 - echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu noble main' > /etc/apt/sources.list.d/git.list + export DEBIAN_FRONTEND=noninteractive apt-get update -o APT::Acquire::Retries=4 -qq - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends git + apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends ca-certificates sudo git # Create non-root user for running repository setup / tests useradd -m -s /bin/bash runner echo 'runner ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - rm -rf /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin /var/lib/apt/lists/* /var/log/apt/* shell: bash + + - name: checkout PR code + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + sparse-checkout: | + * + !.github + sparse-checkout-cone-mode: false + - name: checkout + if: github.event_name != 'pull_request_target' uses: actions/checkout@v6 with: submodules: recursive + + - name: checkout solutions + env: + SOLUTIONS_TOKEN: ${{ secrets.SOLUTIONS_TOKEN }} + run: | + if [[ -z "${SOLUTIONS_TOKEN}" ]]; then + echo "SOLUTIONS_TOKEN not available; skipping solutions checkout" + exit 0 + fi + git clone https://x-access-token:${SOLUTIONS_TOKEN}@github.com/RobotLocomotion/underactuated-solutions.git solutions + cd solutions && git checkout $(cat ../solutions_sha.txt) && cd .. + shell: bash + - name: install dependencies run: | # Fix ownership of the workspace chown -R runner:runner . # Switch to runner user for remaining commands + sudo -H -u runner ./setup/submodule_checkout # Install system packages as root ./setup/ubuntu/24.04/install_prereqs.sh - apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends xvfb # Test this revision's wheel before publishing a release to PyPI. sudo -H -u runner python3 -m pip wheel --no-deps --wheel-dir /tmp/underactuated-wheels . WHEEL_PATH="$(find /tmp/underactuated-wheels -name 'underactuated-*.whl')" - sudo -H -u runner python3 -m pip install --user --break-system-packages "${WHEEL_PATH}[all]" pytest pytest-timeout + sudo -H -u runner python3 -m pip install --user --break-system-packages \ + "${WHEEL_PATH}[all]" pytest pytest-timeout 'pytest-xdist>=3.6,<4' rm -rf ./underactuated # Force the tests to import the installed wheel. rm -rf /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin /var/lib/apt/lists/* /var/log/apt/* shell: bash + + - name: prefetch remote packages + run: | + sudo -H -u runner env XDG_CACHE_HOME=/tmp \ + python3 -m setup.prefetch_remotes + shell: bash + - name: test run: | set -euo pipefail - find book/htmlbook -type f -name 'test_*.py' -delete # remove the htmlbook tests, which have more python requirements - sudo -H -u runner xvfb-run \ - --auto-servernum \ - --server-args='-screen 0 1280x1024x24 -ac +extension GLX +extension RANDR +render -noreset' \ - python3 -m pytest -ra + find book/htmlbook -type f -name 'test_*.py' -delete # remove htmlbook tests (extra Python requirements) + sudo --preserve-env=OMP_NUM_THREADS,OPENBLAS_NUM_THREADS,MKL_NUM_THREADS,NUMEXPR_NUM_THREADS \ + -H -u runner env -u DISPLAY XDG_CACHE_HOME=/tmp DRAKE_ALLOW_NETWORK=lcm:meshcat \ + python3 -m pytest -n 2 --dist loadfile -ra --durations=30 --junitxml=test-results/pytest.xml shell: bash + + - name: upload test timings + if: always() + uses: actions/upload-artifact@v4 + with: + name: pytest-${{ github.job }} + path: test-results/pytest.xml + if-no-files-found: ignore + retention-days: 14 + tahoe: name: macos tahoe 26 # Drake 1.58+ only publishes macOS 26 (arm64) wheels. runs-on: macos-26 + needs: [check-approval] + if: > + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) + || + (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository && + needs.check-approval.outputs.should-run == 'true') + || + (github.event_name != 'pull_request' && + github.event_name != 'pull_request_target') steps: + - name: checkout PR code + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + sparse-checkout: | + * + !.github + sparse-checkout-cone-mode: false + - name: checkout + if: github.event_name != 'pull_request_target' uses: actions/checkout@v6 with: submodules: recursive + - name: setup python uses: actions/setup-python@v7 with: python-version: '3.13' + + - name: checkout solutions + env: + SOLUTIONS_TOKEN: ${{ secrets.SOLUTIONS_TOKEN }} + run: | + if [[ -z "${SOLUTIONS_TOKEN}" ]]; then + echo "SOLUTIONS_TOKEN not available; skipping solutions checkout" + exit 0 + fi + git clone https://x-access-token:${SOLUTIONS_TOKEN}@github.com/RobotLocomotion/underactuated-solutions.git solutions + cd solutions && git checkout $(cat ../solutions_sha.txt) && cd .. + shell: zsh -efuo pipefail {0} + - name: setup run: | + ./setup/submodule_checkout ./setup/mac/install_prereqs.sh - python -m pip install --user poetry==2.4.3 + python -m pip install --user poetry==2.5.1 python -m poetry config virtualenvs.in-project true python -m poetry env use "$(python -c 'import sys; print(sys.executable)')" python -m poetry install --all-extras --with dev shell: zsh -efuo pipefail {0} + - name: configure LCM multicast loopback run: | # https://drake.mit.edu/troubleshooting.html#lcm-macos sudo route -nv delete 224.0.0.0/4 || true sudo route -nv add -net 224.0.0.0/4 -interface lo0 + + - name: prefetch remote packages + run: XDG_CACHE_HOME=/tmp .venv/bin/python -m setup.prefetch_remotes + shell: zsh -efuo pipefail {0} + - name: test run: | - set -euo pipefail - .venv/bin/python -m pytest -ra + XDG_CACHE_HOME=/tmp DRAKE_ALLOW_NETWORK=lcm:meshcat .venv/bin/python -m pytest -n 2 --dist loadfile -ra --durations=30 --junitxml=test-results/pytest.xml shell: zsh -efuo pipefail {0} + + - name: upload test timings + if: always() + uses: actions/upload-artifact@v4 + with: + name: pytest-${{ github.job }} + path: test-results/pytest.xml + if-no-files-found: ignore + retention-days: 14 + lint: runs-on: ubuntu-24.04 + needs: [check-approval] + if: > + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) + || + (github.event_name == 'pull_request_target' && + github.event.pull_request.head.repo.full_name != github.repository && + needs.check-approval.outputs.should-run == 'true') + || + (github.event_name != 'pull_request' && + github.event_name != 'pull_request_target') steps: + - name: checkout PR code + if: github.event_name == 'pull_request_target' + uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.head.sha }} + sparse-checkout: | + * + !.github + sparse-checkout-cone-mode: false + - name: checkout repo + if: github.event_name != 'pull_request_target' uses: actions/checkout@v6 with: submodules: recursive + - name: setup python uses: actions/setup-python@v7 with: python-version: '3.12' + - name: black uses: psf/black@stable with: version: 26.10.1 jupyter: true + - name: isort uses: isort/isort-action@master with: - configuration: "--profile black --check-only" - isort-version: 5.12.0 + configuration: "--profile black --check-only" + isort-version: 5.12.0 + - name: autoflake run: | python -m pip install autoflake==2.0.2 autoflake . --remove-all-unused-imports --in-place + - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 2.4.3 + version: 2.5.1 virtualenvs-create: true virtualenvs-in-project: true + - name: build the docs run: | poetry install --only docs source .venv/bin/activate sphinx-build -M html underactuated book/python shell: bash + - name: Test full poetry install run: poetry install diff --git a/book/htmlbook b/book/htmlbook index e9b1d5bf..9e9d38c3 160000 --- a/book/htmlbook +++ b/book/htmlbook @@ -1 +1 @@ -Subproject commit e9b1d5bf70629bb8674b58e0c14ff968fcab1c39 +Subproject commit 9e9d38c33f00bb6ca6ce3dba733322e344db1602 diff --git a/book/test_notebook_coverage.py b/book/test_notebook_coverage.py new file mode 100644 index 00000000..b989d641 --- /dev/null +++ b/book/test_notebook_coverage.py @@ -0,0 +1,39 @@ +"""Check that every notebook in the book is executed by some test. + +See htmlbook/notebook_coverage.py. Notebooks that cannot run in CI must be +listed in `UNTESTED` with a reason. +""" + +from pathlib import Path + +import pytest +from htmlbook.notebook_coverage import ( + assert_book_notebooks_are_tested, + assert_exercise_notebooks_are_tested, + assert_untested_list_is_current, +) + +REPO_ROOT = Path(__file__).resolve().parents[1] +BOOK = REPO_ROOT / "book" +SOLUTIONS_NOTEBOOKS = REPO_ROOT / "solutions" / "notebooks" + +# Paths are relative to book/. +UNTESTED = { + "contact/hybrid.ipynb": "Waiting for Hybrid TrajOpt to land in Drake.", + "figures/lcp_cart.ipynb": "Needs plotly, which is not worth a dependency.", +} + + +def test_book_notebooks_are_tested() -> None: + assert_book_notebooks_are_tested(BOOK, UNTESTED) + + +def test_untested_list_is_current() -> None: + assert_untested_list_is_current(BOOK, UNTESTED) + + +@pytest.mark.skipif( + not SOLUTIONS_NOTEBOOKS.is_dir(), reason="needs the solutions checkout" +) +def test_exercise_notebooks_are_tested() -> None: + assert_exercise_notebooks_are_tested(BOOK, SOLUTIONS_NOTEBOOKS) diff --git a/docs/testing.md b/docs/testing.md new file mode 100644 index 00000000..635c51d9 --- /dev/null +++ b/docs/testing.md @@ -0,0 +1,68 @@ +# Remote packages in tests + +Local `pytest` runs can download Drake remote packages on demand. The root +`conftest.py` defaults `XDG_CACHE_HOME` to `/tmp`, so Drake caches them under +`/tmp/drake`. + +Each CI test job runs `python -m setup.prefetch_remotes` before pytest, using +the same Python installation, user, and `XDG_CACHE_HOME=/tmp` as the tests. +The prefetch retries failed downloads (see `book/htmlbook/drake_remotes.py`). +The pip job prefetches using the installed underactuated wheel, matching its +tests. During pytest, `DRAKE_ALLOW_NETWORK=lcm:meshcat` disables PackageMap +downloads while allowing Meshcat and LCM. Notebook subprocesses inherit these +settings. An uncached remote package therefore fails instead of downloading +in the middle of a test. This restricts Drake networking; it is not a general +network sandbox for Python or external programs. + +To reproduce this policy locally, run from the repository root: + +```sh +XDG_CACHE_HOME=/tmp .venv/bin/python -m setup.prefetch_remotes +XDG_CACHE_HOME=/tmp DRAKE_ALLOW_NETWORK=lcm:meshcat .venv/bin/python -m pytest -ra +``` + +If a test reports that PackageMap networking is disabled and no matching cache +entry exists, check that prefetch and pytest use the same user and cache +directory. If a test adds a new remote package, add it to +`setup/prefetch_remotes.py`. + +See Drake's [network policy documentation](https://drake.mit.edu/doxygen_cxx/group__allow__network.html). + +# Notebook coverage + +`book/test_notebook_coverage.py` fails when a tracked notebook is not +registered with `ipynb_test()` in a `test_*.py` file in its directory. Notebooks +that cannot run in CI go in its `UNTESTED` mapping with a reason. Exercise +notebooks are covered by tests in the solutions checkout; that check is skipped +when `solutions/` is absent. + +# Solutions in CI + +When the `SOLUTIONS_TOKEN` repository secret is set, each test job clones +`RobotLocomotion/underactuated-solutions` at the revision in +`solutions_sha.txt`, and pytest runs its tests too. Without the secret, the +jobs skip the solutions tests. Fork pull requests do not receive secrets until +a maintainer applies the `approved-for-ci` label, which runs the workflow +through `pull_request_target`. + +# CI timings + +Each test job prints its 30 slowest pytest phases and uploads a JUnit report as +`pytest-`, retained for 14 days and uploaded even on test failure when +available. + +CI uses two pytest-xdist workers with `--dist loadfile`, so tests in the same +file stay on one worker. Remote packages are prefetched before workers start, +and native numerical-library thread counts are limited to one to avoid +oversubscribing the runner. Local pytest remains serial by default. To try the +CI configuration: + +```sh +OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 NUMEXPR_NUM_THREADS=1 \ + .venv/bin/python -m pytest -n 2 --dist loadfile -ra --durations=30 +``` + +Ubuntu Poetry CI sets `INSTALL_JUPYTER=0` when installing system prerequisites +because its Python environment supplies the notebook dependencies. The +prerequisite script still installs system Jupyter by default for local users +and the pip job. diff --git a/poetry.lock b/poetry.lock index 59dfadb9..42677488 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -54,7 +54,7 @@ description = "Classes Without Boilerplate" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "attrs-25.1.0-py3-none-any.whl", hash = "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a"}, {file = "attrs-25.1.0.tar.gz", hash = "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e"}, @@ -191,7 +191,7 @@ files = [ {file = "beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9"}, {file = "beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7"}, ] -markers = {main = "extra == \"all\" or extra == \"grader\""} +markers = {main = "extra == \"grader\" or extra == \"all\""} [package.dependencies] soupsieve = ">=1.6.1" @@ -264,7 +264,7 @@ description = "An easy safelist-based HTML-sanitizing tool." optional = true python-versions = ">=3.10" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "bleach-6.4.0-py3-none-any.whl", hash = "sha256:4b6b6a54fff2e69a3dde9d21cc6301220bee3c3cb792187d11403fd795031081"}, {file = "bleach-6.4.0.tar.gz", hash = "sha256:4202482733d85cedd04e59fcb2f89f4e4c7c385a78d3c3c23c30446843a37452"}, @@ -339,7 +339,7 @@ files = [ name = "cffi" version = "2.1.1" description = "Foreign Function Interface for Python calling C code." -optional = true +optional = false python-versions = ">=3.10" groups = ["main", "dev"] files = [ @@ -444,7 +444,7 @@ files = [ {file = "cffi-2.1.1-cp315-cp315t-win_arm64.whl", hash = "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692"}, {file = "cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be"}, ] -markers = {main = "(extra == \"all\" or extra == \"grader\") and implementation_name == \"pypy\"", dev = "(sys_platform == \"linux\" or sys_platform == \"darwin\") and (platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\")"} +markers = {main = "(extra == \"grader\" or extra == \"all\") and implementation_name == \"pypy\"", dev = "sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\""} [package.dependencies] pycparser = {version = "*", markers = "implementation_name != \"PyPy\""} @@ -605,7 +605,7 @@ files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] -markers = {main = "sys_platform == \"win32\"", dev = "os_name == \"nt\" or platform_system == \"Windows\" or sys_platform == \"win32\"", docs = "sys_platform == \"win32\""} +markers = {main = "sys_platform == \"win32\"", dev = "sys_platform == \"win32\" or platform_system == \"Windows\" or os_name == \"nt\"", docs = "sys_platform == \"win32\""} [[package]] name = "comm" @@ -810,7 +810,7 @@ description = "XML bomb protection for Python stdlib modules" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61"}, {file = "defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69"}, @@ -953,6 +953,21 @@ range-diff = ["munkres"] sequoia = ["pysequoia (>=0.1.35)"] sha1dc = ["sha1dc"] +[[package]] +name = "execnet" +version = "2.1.2" +description = "execnet: rapid multi-Python deployment" +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec"}, + {file = "execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd"}, +] + +[package.extras] +testing = ["hatch", "pre-commit", "pytest", "tox"] + [[package]] name = "executing" version = "2.2.0" @@ -979,7 +994,7 @@ files = [ {file = "fastjsonschema-2.21.1-py3-none-any.whl", hash = "sha256:c9e5b7e908310918cf494a434eeb31384dd84a98b57a30bcb1f535015b554667"}, {file = "fastjsonschema-2.21.1.tar.gz", hash = "sha256:794d4f0a58f848961ba16af7b9c85a3e88cd360df008c59aac6fc5ae9323b5d4"}, ] -markers = {main = "extra == \"all\" or extra == \"grader\""} +markers = {main = "extra == \"grader\" or extra == \"all\""} [package.extras] devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benchmark", "pytest-cache", "validictory"] @@ -1107,7 +1122,7 @@ description = "Utilities for building Gradescope autograders" optional = true python-versions = "*" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "gradescope-utils-0.5.0.tar.gz", hash = "sha256:51542455ab9f4c9f75612e0a4ee0cb0c1386809de41254a77d3fd7b6c09525d5"}, {file = "gradescope_utils-0.5.0-py2.py3-none-any.whl", hash = "sha256:17c7bb3bc31474a862f006cb77e7f0f519cdade62ffd3cb014e5694a6afe2eb9"}, @@ -1431,7 +1446,7 @@ description = "An implementation of JSON Schema validation for Python" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, @@ -1454,7 +1469,7 @@ description = "The JSON Schema meta-schemas and vocabularies, exposed as a Regis optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "jsonschema_specifications-2024.10.1-py3-none-any.whl", hash = "sha256:a09a0680616357d9a0ecf05c12ad234479f549239d0f5b55f3deea67475da9bf"}, {file = "jsonschema_specifications-2024.10.1.tar.gz", hash = "sha256:0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272"}, @@ -1470,14 +1485,14 @@ description = "Jupyter protocol implementation and client libraries" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "jupyter_client-8.6.3-py3-none-any.whl", hash = "sha256:e8a19cc986cc45905ac3362915f410f3af85424b4c0905e94fa5f2cb08e8f23f"}, {file = "jupyter_client-8.6.3.tar.gz", hash = "sha256:35b3a0947c4a6e9d589eb97d7d4cd5e90f910ee73101611f01283732bd6d9419"}, ] [package.dependencies] -jupyter-core = ">=4.12,<5.0 || >=5.1.dev0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" python-dateutil = ">=2.8.2" pyzmq = ">=23.0" tornado = ">=6.2" @@ -1494,7 +1509,7 @@ description = "Jupyter core package. A base package on which Jupyter projects re optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "jupyter_core-5.7.2-py3-none-any.whl", hash = "sha256:4f7315d2f6b4bcf2e3e7cb6e46772eba760ae459cd1f59d29eb57b0a01bd7409"}, {file = "jupyter_core-5.7.2.tar.gz", hash = "sha256:aa5f8d32bbf6b431ac830496da7392035d6f61b4f54872f15c4bd2a9c3f536d9"}, @@ -1516,7 +1531,7 @@ description = "Pygments theme using JupyterLab CSS variables" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "jupyterlab_pygments-0.3.0-py3-none-any.whl", hash = "sha256:841a89020971da1d8693f1a99997aefc5dc424bb1b251fd6322462a1b8842780"}, {file = "jupyterlab_pygments-0.3.0.tar.gz", hash = "sha256:721aca4d9029252b11cfa9d185e5b5af4d54772bb8072f9b7036f4170054d35d"}, @@ -2089,7 +2104,7 @@ description = "A sane and fast Markdown parser with useful plugins and renderers optional = true python-versions = ">=3.10" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "mistune-3.4.0-py3-none-any.whl", hash = "sha256:d03cec4c8620f21517a996d82d14f3b59c30d79bda2cc6c56bd32b839f18ce6b"}, {file = "mistune-3.4.0.tar.gz", hash = "sha256:2eaf7952af928ca8d33b779762effc1da517b62c6ad85ec8ca957e3b07b9782a"}, @@ -2325,7 +2340,7 @@ description = "A client library for executing notebooks. Formerly nbconvert's Ex optional = true python-versions = ">=3.9.0" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "nbclient-0.10.2-py3-none-any.whl", hash = "sha256:4ffee11e788b4a27fabeb7955547e4318a5298f34342a4bfd01f2e1faaeadc3d"}, {file = "nbclient-0.10.2.tar.gz", hash = "sha256:90b7fc6b810630db87a6d0c2250b1f0ab4cf4d3c27a299b0cde78a4ed3fd9193"}, @@ -2333,7 +2348,7 @@ files = [ [package.dependencies] jupyter-client = ">=6.1.12" -jupyter-core = ">=4.12,<5.0 || >=5.1.dev0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" nbformat = ">=5.1" traitlets = ">=5.4" @@ -2349,7 +2364,7 @@ description = "Convert Jupyter Notebooks (.ipynb files) to other formats." optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "nbconvert-7.17.2-py3-none-any.whl", hash = "sha256:6a143c11c00bf831604da4b1be4347d36ea52367057eb920135d69bc2862fed2"}, {file = "nbconvert-7.17.2.tar.gz", hash = "sha256:344a218e8595117ce37396ed025d994f146d076226ebac59255a2fa085ab24d8"}, @@ -2387,7 +2402,7 @@ description = "The Jupyter Notebook format" optional = true python-versions = ">=3.10" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "nbformat-5.11.1-py3-none-any.whl", hash = "sha256:cc6698fa75f4fab8755ead786317815f13a6fee3b53311c0abb1a8b51d52f7ec"}, {file = "nbformat-5.11.1.tar.gz", hash = "sha256:32d4521c68c6e7d5b29c76defaeed9f42ea733142b9b19f88277ce10390b9c4d"}, @@ -2396,7 +2411,7 @@ files = [ [package.dependencies] fastjsonschema = ">=2.15" jsonschema = ">=2.6" -jupyter-core = ">=4.12,<5.0 || >=5.1.dev0" +jupyter-core = ">=4.12,<5.0.dev0 || >=5.1.dev0" traitlets = ">=5.1" [package.extras] @@ -2619,7 +2634,7 @@ description = "Utilities for writing pandoc filters in python" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "pandocfilters-1.5.1-py2.py3-none-any.whl", hash = "sha256:93be382804a9cdb0a7267585f157e5d1731bbe5545a85b268d6f5fe6232de2bc"}, {file = "pandocfilters-1.5.1.tar.gz", hash = "sha256:002b4a555ee4ebc03f8b66307e287fa492e4a77b4ea14d3f934328297bb4939e"}, @@ -2842,7 +2857,7 @@ files = [ {file = "platformdirs-4.13.0-py3-none-any.whl", hash = "sha256:3dbcf4cd708f21cf876c4eaa90e58412bc4f033d87143f41b1493ff77c25b7e1"}, {file = "platformdirs-4.13.0.tar.gz", hash = "sha256:1aa0b0d3f224c1f07c295121e312a5a24a180d6ae5a8425ea1784b3e3863e9c0"}, ] -markers = {main = "extra == \"all\" or extra == \"grader\""} +markers = {main = "extra == \"grader\" or extra == \"all\""} [[package]] name = "pluggy" @@ -3009,14 +3024,14 @@ tests = ["pytest"] name = "pycparser" version = "2.22" description = "C parser in Python" -optional = true +optional = false python-versions = ">=3.8" groups = ["main", "dev"] files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] -markers = {main = "(extra == \"all\" or extra == \"grader\") and implementation_name == \"pypy\"", dev = "(sys_platform == \"linux\" or sys_platform == \"darwin\") and implementation_name != \"PyPy\" and (platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\")"} +markers = {main = "(extra == \"grader\" or extra == \"all\") and implementation_name == \"pypy\"", dev = "(sys_platform == \"linux\" and platform_python_implementation != \"PyPy\" or sys_platform == \"darwin\") and implementation_name != \"PyPy\""} [[package]] name = "pydot" @@ -3119,6 +3134,27 @@ files = [ [package.dependencies] pytest = ">=7.0.0" +[[package]] +name = "pytest-xdist" +version = "3.8.0" +description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88"}, + {file = "pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1"}, +] + +[package.dependencies] +execnet = ">=2.1" +pytest = ">=7.0.0" + +[package.extras] +psutil = ["psutil (>=3.0)"] +setproctitle = ["setproctitle"] +testing = ["filelock"] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -3211,7 +3247,7 @@ description = "Python for Window Extensions" optional = true python-versions = "*" groups = ["main"] -markers = "sys_platform == \"win32\" and platform_python_implementation != \"PyPy\" and (extra == \"all\" or extra == \"grader\")" +markers = "sys_platform == \"win32\" and platform_python_implementation != \"PyPy\" and (extra == \"grader\" or extra == \"all\")" files = [ {file = "pywin32-308-cp310-cp310-win32.whl", hash = "sha256:796ff4426437896550d2981b9c2ac0ffd75238ad9ea2d3bfa67a1abd546d262e"}, {file = "pywin32-308-cp310-cp310-win_amd64.whl", hash = "sha256:4fc888c59b3c0bef905ce7eb7e2106a07712015ea1c8234b703a088d46110e8e"}, @@ -3316,7 +3352,7 @@ description = "Python bindings for 0MQ" optional = true python-versions = ">=3.7" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "pyzmq-26.2.1-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:f39d1227e8256d19899d953e6e19ed2ccb689102e6d85e024da5acf410f301eb"}, {file = "pyzmq-26.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a23948554c692df95daed595fdd3b76b420a4939d7a8a28d6d7dea9711878641"}, @@ -3540,7 +3576,7 @@ description = "JSON Referencing + Python" optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0"}, {file = "referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa"}, @@ -3607,7 +3643,7 @@ description = "Python bindings to Rust's persistent data structures (rpds)" optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "rpds_py-0.22.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967"}, {file = "rpds_py-0.22.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37"}, @@ -4055,7 +4091,7 @@ description = "Timeout decorator" optional = true python-versions = "*" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "timeout-decorator-0.5.0.tar.gz", hash = "sha256:6a2f2f58db1c5b24a2cc79de6345760377ad8bdc13813f5265f6c3e63d16b3d7"}, ] @@ -4067,7 +4103,7 @@ description = "A tiny CSS parser" optional = true python-versions = ">=3.8" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "tinycss2-1.4.0-py3-none-any.whl", hash = "sha256:3a49cf47b7675da0b15d0c6e1df8df4ebd96e9394bb905a5775adb0d884c5289"}, {file = "tinycss2-1.4.0.tar.gz", hash = "sha256:10c0972f6fc0fbee87c3edb76549357415e94548c1ae10ebccdea16fb404a9b7"}, @@ -4111,7 +4147,7 @@ description = "Tornado is a Python web framework and asynchronous networking lib optional = true python-versions = ">=3.11" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "tornado-6.6.1-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:a8d3e6acde5a80d13b13b5e4c7c226ca682f31d0a62b6c33cea038714bc2de1b"}, {file = "tornado-6.6.1-cp311-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1b6ff57cc69b339f8feb9e7b567b0e0eacb16bfaf234159496623ef7a67ba640"}, @@ -4197,7 +4233,7 @@ files = [ {file = "typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8"}, {file = "typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5"}, ] -markers = {main = "extra == \"all\" or extra == \"grader\""} +markers = {main = "extra == \"grader\" or extra == \"all\""} [[package]] name = "tzdata" @@ -4268,7 +4304,7 @@ description = "Character encoding aliases for legacy web content" optional = true python-versions = "*" groups = ["main"] -markers = "extra == \"all\" or extra == \"grader\"" +markers = "extra == \"grader\" or extra == \"all\"" files = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, @@ -4380,4 +4416,4 @@ grader = ["bleach", "gradescope-utils", "mistune", "nbconvert", "nbformat", "tim [metadata] lock-version = "2.1" python-versions = "<4.0,>=3.12" -content-hash = "84c43dc779385a01201ad56133457550f01bd8b6aaf333c3a34ec46b71186ee5" +content-hash = "e17330e98fd87d0ec2fd819a598be2baa30def82f287c2fd6fc07811ccc0d50c" diff --git a/pyproject.toml b/pyproject.toml index b5c4b888..c154033e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -130,6 +130,7 @@ poetry = ">=2.5.1,<2.6.0" pre-commit = ">=4.7.0" pytest = ">=9.2.0" pytest-timeout = ">=2.3.1" +pytest-xdist = ">=3.6,<4" requests = ">=2.34.2" # Minimum versions for transitive development dependency security fixes. dulwich = ">=1.2.21" diff --git a/setup/mac/install_prereqs.sh b/setup/mac/install_prereqs.sh index b7bde6ac..f45b2e54 100755 --- a/setup/mac/install_prereqs.sh +++ b/setup/mac/install_prereqs.sh @@ -18,7 +18,21 @@ if ! command -v brew &>/dev/null; then bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" fi +# Pass the --retry 4 argument when invoking curl(1). export HOMEBREW_CURL_RETRIES=4 -brew update +# Do not send brew(1) usage analytics to Google Analytics. +export HOMEBREW_NO_ANALYTICS=1 + +# Do not automatically update before running various brew(1) subcommands. +export HOMEBREW_NO_AUTO_UPDATE=1 + +# Forbid redirects from secure HTTPS to insecure HTTP. +export HOMEBREW_NO_INSECURE_REDIRECT=1 + +# Never automatically cleanup installed, upgraded, and/or reinstalled formulae. +export HOMEBREW_NO_INSTALL_CLEANUP=1 + +# brew update uses git(1), so HOMEBREW_CURL_RETRIES does not take effect. +brew update || (sleep 30; brew update) brew bundle --file="$(dirname ${(%):-%x})/Brewfile" diff --git a/setup/prefetch_remotes.py b/setup/prefetch_remotes.py new file mode 100644 index 00000000..45d1bf73 --- /dev/null +++ b/setup/prefetch_remotes.py @@ -0,0 +1,24 @@ +"""Prefetch the remote packages used by tests into Drake's cache. + +CI runs `python -m setup.prefetch_remotes` from the repository root before +pytest; see docs/testing.md. In the pip job, this imports the installed wheel. +""" + +import sys +from pathlib import Path + +from pydrake.multibody.parsing import Parser +from pydrake.multibody.plant import MultibodyPlant + +from underactuated.utils import ConfigureParser + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "book")) +from htmlbook.drake_remotes import prefetch_remotes # noqa: E402 + +if __name__ == "__main__": + parser = Parser(MultibodyPlant(0.0)) + ConfigureParser(parser) + packages = parser.package_map() + remotes = ["drake_models", "spot_description"] + assert all(packages.Contains(name) for name in remotes) + prefetch_remotes(packages, remotes) diff --git a/setup/ubuntu/24.04/install_prereqs.sh b/setup/ubuntu/24.04/install_prereqs.sh index f7f3b538..9bea49e1 100755 --- a/setup/ubuntu/24.04/install_prereqs.sh +++ b/setup/ubuntu/24.04/install_prereqs.sh @@ -55,15 +55,20 @@ apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy \ apt-get update -qq || (sleep 15; apt-get update -qq) +# CI installs notebook dependencies in its Python environment instead. +jupyter_packages=() +if [[ "${INSTALL_JUPYTER:-1}" != "0" ]]; then + jupyter_packages=(jupyter-notebook jupyter-nbconvert) +fi + # Keep this up to date with Drake's # setup/ubuntu/binary_distribution/packages-noble.txt, except that we choose to # not install most of the system `python3-*` packages. The second batch are new # requirements from this repo. apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy \ - --no-install-recommends $(cat < Date: Thu, 26 Nov 2026 07:40:48 -0500 Subject: [PATCH 2/2] Pin solutions with committed pytest registrations Co-Authored-By: Claude Opus 5.5 --- solutions_sha.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions_sha.txt b/solutions_sha.txt index 9ecdd40e..41797e2e 100644 --- a/solutions_sha.txt +++ b/solutions_sha.txt @@ -1 +1 @@ -5c93d80689edb8adeaf433d3ca764a2164160b91 +7d0ebac8c1564ae7e628ed2da3abf2ce0403440f