Skip to content

flow: read variables.yaml directly, delete variables.json - #4800

Merged
maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:drop-variables-json
Nov 8, 2026
Merged

maliberty merged 2 commits into
The-OpenROAD-Project:masterfrom
oharboe:drop-variables-json

Conversation

@oharboe

@oharboe oharboe commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Before: flow/scripts/variables.json was a generated copy of variables.yaml committed to git, with yaml_to_json.py to regenerate it and a CI check to catch a forgotten regeneration.
Now: defaults.py and non_stage_variables.py read variables.yaml, and the JSON, the converter and the check are gone.

Why the JSON was added: #4113, for #4103. OpenROAD's bazel test test/... ran the flow through bazel-orfs. non_stage_variables.py, which util.tcl runs inside the Bazel sandbox, found no PyYAML.

Why it is no longer needed:

Checked: on master, defaults.py and non_stage_variables.py <stage> print the same lines as the JSON version for every stage, in the YAML's order instead of sorted. make print-* on asap7 gcd works.

variables.json stays for now: this PR leaves flow/scripts/variables.json untouched, so it does not conflict with the constant variables.json churn on master while it is in review. Nothing reads it after this PR. variables.json is deleted in a separate PR after this one lands.

🤖 Generated with Claude Code

variables.json was added in The-OpenROAD-Project#4113 for The-OpenROAD-Project#4103: OpenROAD's
`bazel test test/...` ran the flow through bazel-orfs, and
non_stage_variables.py, exec'd from util.tcl inside the Bazel
sandbox, found no PyYAML.  OpenROAD has since dropped bazel-orfs and
test/orfs (The-OpenROAD-Project/OpenROAD#11546), ORFS no longer
carries Bazel build files (c4d858d), and bazel-orfs sets PYTHON_EXE
to a Python that has PyYAML for every action.  A plain make run uses
the host python3, and the DependencyInstaller
(etc/requirements-common.in) and flake.nix install PyYAML, as they did
before The-OpenROAD-Project#4113.

defaults.py and non_stage_variables.py go back to reading
variables.yaml as they did before The-OpenROAD-Project#4113, and variables.json,
yaml_to_json.py, the CI check that kept them in sync and the
linguist-generated attribute go away.  Both scripts print the same
lines as before, in the YAML's order rather than sorted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe requested a review from a team as a code owner November 6, 2026 22:17
@oharboe
oharboe requested review from sombraSoft and removed request for a team November 6, 2026 22:17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes the variables.json file and its conversion script, migrating the variable definitions entirely to YAML. The Python scripts defaults.py and non_stage_variables.py are updated to import yaml and load variables.yaml directly using yaml.safe_load instead of parsing JSON. All review comments have been filtered out as they suggest one-off cleanups regarding encoding arguments, which are out of scope according to the repository's style guide. Consequently, there is no additional feedback to provide.

@openroad-ci

openroad-ci commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 73c8893 · Jenkins build #2 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 2 without a comparable baseline.

variables.json changes with nearly every variables.yaml edit on
master, so deleting it here conflicts with master again and again
while this is in review.  Keep the file as it is on master; nothing
in the flow reads it after this change, and a separate pull request
deletes it once this one has landed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018PFLaCzFtFbnWE4nPTDwpC
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe

oharboe commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty @vvbandeira FYI fewer papercuts

@maliberty
maliberty merged commit 9ca2a9e into The-OpenROAD-Project:master Nov 8, 2026
12 checks passed
oharboe added a commit to oharboe/OpenROAD-flow-scripts that referenced this pull request Nov 8, 2026
variables.json is no longer read since The-OpenROAD-Project#4800, so it is deleted in a pull
request of its own rather than kept in step here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
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.

3 participants