Skip to content
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
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <tool>` 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.
1 change: 1 addition & 0 deletions book/chapters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"elib_url": "https://underactuated.csail.mit.edu/htmlbook/elib.cgi",
"chapter_ids" : [
"intro",
"pend",
Expand Down
2 changes: 1 addition & 1 deletion book/htmlbook
2 changes: 1 addition & 1 deletion book/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h1>Table of Contents</h1>
<li>Stance Dynamics</li>
<li>Foot Collision</li>
<li>Forward simulation</li>
<li>Poincar&eacute Map</li>
<li>Poincar&#233; Map</li>
<li>Fixed Points and Stability</li>
<li>Stability of standing still</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion book/simple_legs.html
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ <h1><a href="index.html" style="text-decoration:none;">Underactuated Robotics</a

</subsubsection> <!-- end of forward simulation -->

<subsubsection><h1>Poincar&eacute Map</h1>
<subsubsection><h1>Poincar&eacute; Map</h1>

<p>We can now derive the angular velocity at the beginning of each
stance phase as a function of the angular velocity of the previous
Expand Down
32 changes: 32 additions & 0 deletions docs/hosting.md
Original file line number Diff line number Diff line change
@@ -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.
Loading