diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 91e87a0d..52001390 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -178,10 +178,9 @@ jobs: configuration: "--profile black --check-only" isort-version: 5.12.0 - name: autoflake - uses: creyD/autoflake_action@master - with: - options: --remove-all-unused-imports --in-place - # Pegging version s.t. https://github.com/creyD/autoflake_action/issues/1 + 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: diff --git a/AGENTS.md b/AGENTS.md index c3b1ff60..2d4bfffe 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,3 +2,5 @@ - Always run Python commands (including tests, linting, type checks, scripts, and tooling) using the repository virtual environment at `.venv`. - Prefer `.venv/bin/python -m ` over system Python or globally installed executables. +- Use the GitHub account `RussTedrake` for this repository; do not use `RussTedrake-walden`. +- See [docs/hosting.md](docs/hosting.md) before working on the live server. diff --git a/book/chapters.json b/book/chapters.json index 41bacbf5..5ce9952c 100644 --- a/book/chapters.json +++ b/book/chapters.json @@ -1,4 +1,5 @@ { + "elib_url": "https://underactuated.csail.mit.edu/htmlbook/elib.cgi", "chapter_ids" : [ "intro", "pend", diff --git a/book/htmlbook b/book/htmlbook index 32e5b9c5..966bf1b7 160000 --- a/book/htmlbook +++ b/book/htmlbook @@ -1 +1 @@ -Subproject commit 32e5b9c5f5ad2f81a2892d192be7992ca12133fb +Subproject commit 966bf1b775dabbe9be95b93e214d1efd278b0e87 diff --git a/book/index.html b/book/index.html index d64f7bf1..53bda9c3 100644 --- a/book/index.html +++ b/book/index.html @@ -186,7 +186,7 @@

Table of Contents

  • Stance Dynamics
  • Foot Collision
  • Forward simulation
  • -
  • Poincaré Map
  • +
  • Poincaré Map
  • Fixed Points and Stability
  • Stability of standing still
  • diff --git a/book/simple_legs.html b/book/simple_legs.html index 57b9c9a9..233f13be 100644 --- a/book/simple_legs.html +++ b/book/simple_legs.html @@ -438,7 +438,7 @@

    Underactuated Robotics -

    Poincaré Map

    +

    Poincaré Map

    We can now derive the angular velocity at the beginning of each stance phase as a function of the angular velocity of the previous diff --git a/docs/hosting.md b/docs/hosting.md new file mode 100644 index 00000000..506ae4eb --- /dev/null +++ b/docs/hosting.md @@ -0,0 +1,32 @@ +# CSAIL hosting + +The live checkout is `/var/www/underactuated` on +`underactuated-r1.csail.mit.edu`. Apache serves its `book` directory at +`https://underactuated.csail.mit.edu/` and enables CGI execution. + +SSH first to `login.csail.mit.edu` and complete interactive two-factor +authentication, then use `ssh -o ProxyJump=none underactuated-r1` for the +internal hop. The owner has sudo access; deployments require an interactive +sudo password. Files are managed by `www-data`. Preserve untracked historical +course directories when updating the checkout. + +## Bibliography endpoint + +`book/htmlbook/elib.cgi` is shared with the manipulation repository. It is +served directly at `https://underactuated.csail.mit.edu/htmlbook/elib.cgi` and +re-executes with this repository's `.venv/bin/python`. Install MySQL +Connector/Python there (the server deployment uses 9.4.0). The existing `venv` +is separate and should not be modified for this endpoint. + +The CGI reuses `/etc/elib.json` on the VM, owned by `root:www-data` with mode +640. That file contains the read-only database credentials; keep credentials +out of the repository and document root. The VM can reach CSAIL MySQL. + +The metadata installer reads `elib_url` from `book/chapters.json` and POSTs +an array of citation tags. The endpoint returns `entries` keyed by tag and a +`missing` array. It uses parameterized queries, excludes private paper URLs, +and limits requests to 1000 tags and 128 KiB. Missing records and request +failures stop the installer before it changes any HTML. + +Update the htmlbook submodule reference when adopting shared code changes. +CGI source updates do not require an Apache restart.