Skip to content

make_data.py: run the cases only after all case functions are defined - #51

Merged
jowr merged 1 commit into
masterfrom
chp/blissful-feynman-xpkzpm
Nov 12, 2026
Merged

jowr merged 1 commit into
masterfrom
chp/blissful-feynman-xpkzpm

Conversation

@jowr

@jowr jowr commented Nov 12, 2026

Copy link
Copy Markdown
Member

python cpp/tests/data/make_data.py stopped with NameError: name 'dome_label_cases' is not defined. The if __name__ == "__main__": guard sat above def dome_label_cases():, so main() ran before that function existed. The bug is in v1.5.0 and v1.5.1.

The guard now sits at the end of the file. Nothing else changes.

  • Only a contributor tool changes. cpp/ is not in the sdist or the wheel, so the installed package is the same and no changelog entry is needed.
  • The script now runs to the end (exit 0).
  • No golden data is regenerated here. Running the script at master rewrites 64 files under cpp/tests/data, because three defaults changed after the files were written: labels.symbols (9272cc7), branding.references (69db666) and branding.versions (2ea2bf1). With those three set to their old values, the regenerated scenes match the committed ones (item ids and positions). Pinning them in make_data.py is a separate follow-up.

Generated by Claude Code

The __main__ guard sat above dome_label_cases(), so main() called it
before the def had run and the script stopped with a NameError. Move
the guard to the end of the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH6pfY7QS5ZwURrTZTo
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 111ea93f-7bfb-42bc-a306-c275f7d2510f
Commits

Reviewing files that changed from the base of the PR and between 1574191 and 0042da8.

Files selected for processing: 1

  • cpp/tests/data/make_data.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@jowr
jowr merged commit 736a495 into master Nov 12, 2026
10 checks passed
@jowr
jowr deleted the chp/blissful-feynman-xpkzpm branch November 12, 2026 12:50
@jowr jowr mentioned this pull request Nov 12, 2026
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.

1 participant