Skip to content

A venue starts when its own meta says, not when the volume does - #43

Open
084intheImpala wants to merge 2 commits into
trojsten:masterfrom
084intheImpala:fix/venue-start
Open

084intheImpala wants to merge 2 commits into
trojsten:masterfrom
084intheImpala:fix/venue-start

Conversation

@084intheImpala

Copy link
Copy Markdown
Contributor

What was wrong

BuildableContextVenue.populate built the venue context like this:

venue=ContextVenue(self.root, competition, volume, venue)
                   .override('start', self.data['volume']['start']),

override is a plain assignment, so every venue's start was replaced by the volume's start, whatever the venue's own meta.yaml said. A venue's start: therefore had no effect at all.

It shows wherever a template prints venue.start, most visibly in the table instructions (instructions-inner.jtex: "you may open the envelope at …"). In phys/29 every venue starts at 11:30 except Lisboa, which is an hour behind the rest and whose metas say start: 10:30. The Portuguese instructions told teams to open their envelopes at 11:30.

The override has been there since at least ff63aef ("Overhaul of context methods"), and nobody noticed, because until Lisboa every venue happened to share the volume's start.

What this changes

  • modules/naboj/builder/contexts/buildable.py: drops the .override('start', …). Nothing else is needed. The fallback just below it, if 'start' not in self.data['venue']: … = self.data['volume']['start'], already covers a venue that gives no start, so the volume's time stays the default and stops overruling a venue that sets its own.
  • modules/naboj/tests/test_naboj_venue.py (new): for every venue of phys/29, builds BuildableContextVenue and checks that venue.start equals that venue's meta.yaml. Like test_naboj_page_layout.py, it is skipped when source/naboj isn't checked out.

How it was checked

  • The new test, with the fix reverted: 2 failed, 19 passed. The two failures are exactly lisboa-junior and lisboa-senior. With the fix, all 21 pass, and the rest of modules/naboj passes too.
  • Rebuilt output/naboj/phys/29/venues/lisboa-senior/instructions.pdf: it now says às 10:30. No other venue in phys/29 changes, because all their metas say 11:30, the same as the volume.

🤖 Generated with Claude Code

`BuildableContextVenue` overwrote `venue.start` with the volume's start
unconditionally, so every venue's instructions printed the volume's time.
Lisboa is an hour behind the rest and its meta says 10:30; its
instructions told teams to open their envelopes at 11:30.

The fallback below the override already covers a venue with no `start:`,
so dropping the override is the whole fix. The test reads every venue of
phys/29 and fails on exactly lisboa-junior and lisboa-senior without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sesquideus

Copy link
Copy Markdown
Collaborator

I assume that this year it's only about time zone difference, but we are all starting at the same UTC time. In that case it would be better to save the timezone info separately and leave the start time to its default, unless there is a real time difference (which has already happened, I think).

…n time

Lisboa is an hour behind the rest, but it starts when everyone else does, so
its meta should say which zone it is in rather than restate the start. The
volume and each venue may now give a `timezone` (an IANA name; the volume's
defaults to Europe/Bratislava), and a venue that gives no `start` takes the
volume's, converted to its own clock on the competition's date. A venue that
does give a `start` keeps it, for one that really starts at another moment.

`venue.start` is still local minutes, so no template changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@084intheImpala

Copy link
Copy Markdown
Contributor Author

@sesquideus good point! I think we fixed it now?

@sesquideus sesquideus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, even the schema and the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants