Skip to content

build.py and build_people.py order undergrad alumni differently, so people.html thrashes between them #16

Description

@jeremymanning

people.html can be regenerated by two different entry points, and they produce different orderings of the undergraduate alumni section. Whichever ran most recently wins, so the file flips back and forth and every flip shows up as a large diff.

Cause

scripts/build_people.py calls its own build_people() with the CV path (scripts/build_people.py:547-555), which lets parse_cv_undergrad_order read the authoritative ordering out of the CV.

scripts/build.py calls the same build_people() without the cv_path argument (scripts/build.py:39-43). With no CV path, parse_cv_undergrad_order has nothing to order by and the CV-derived ordering is dropped entirely, falling back to whatever default order the parser produces.

Reproduction

  1. Run python scripts/build_people.py. Note the undergrad alumni order in people.html.
  2. Run python scripts/build.py.
  3. git diff people.html.

Expected

Both entry points produce byte-identical people.html. The build script and the people-specific script are two ways to do the same thing.

Actual

The undergrad alumni section is reordered: ~76 alumni entries move, producing 152 changed lines out of 180 entries (each moved entry accounts for a removed and an added line). Running the other script flips it straight back. The content is identical in both versions — only the ordering differs — so the diff is pure churn that buries any real change made in the same commit.

Current repo state

The committed people.html currently matches the no-CV output — i.e. the build.py ordering. That means:

  • scripts/pre_push_check.py is effectively a no-op right now, since the committed file already agrees with what build.py produces.
  • The churn gets injected the moment anyone runs build_people.py directly, or onboards a new member (which regenerates people.html through the CV-aware path).

So this is quiet at the moment but fires on the next onboarding.

Suggested fix

One line: pass the same cv_path in build.py:39-43 that build_people.py:547-555 passes, so both callers hand build_people() the CV and parse_cv_undergrad_order produces the CV ordering in both cases.

The CV ordering is the correct one — it's the ordering the lab actually maintains by hand — so build.py should adopt it rather than build_people.py dropping it. After the fix, regenerate people.html once through either entry point and commit the resulting one-time reordering, so the two paths agree from then on and pre_push_check.py becomes meaningful again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions