[PR #167] docs: update pt-PT quickstart pc checker and whitelist foreign CLI flags #218

Open
opened 2026-11-26 20:17:10 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/167
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9901


📝 Commits (1)

  • efa3f31 docs: update pt-PT quickstart pc checker and whitelist foreign CLI flags

📊 Changes

2 files changed (+9 additions, -6 deletions)

View changed files

📝 docs/i18n/pt-PT/quickstart.md (+1 -4)
📝 tests/test_docs_cli_flags.py (+8 -2)

📄 Description

Carried over from old PR 9901 by neoisg8 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9901, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
This branch conflicts with the current main and needs a rebase.
neoisg8: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677

Depends on: none.

What and why

tests/test_docs_cli_flags.py was failing on main (e56d97950):

FAIL: test_docs_name_existing_flags
AssertionError: Lists differ: [('docs/embedded_shaders.md:372', '--ssa-rewrite'), ... ('docs/i18n/pt-PT/quickstart.md:45', '--profile'), ('docs/i18n/pt-PT/quickstart.md:46', '--profile')] != []

FAIL: test_fenced_commands_use_the_flags_of_their_tool
AssertionError: Lists differ: [('docs/testing.md:318', 'scripts/bench_wave64.py', '--prefix')] != [] : fenced commands using a flag their script lacks: docs/testing.md:318 scripts/bench_wave64.py --prefix
  1. Commit 5125a01f0 removed tools/pc_checker.py and updated README.md to point to the web-based checker, but docs/i18n/pt-PT/quickstart.md still referenced pc_checker.py and --profile 1/--profile 2. This updates the Portuguese quickstart to match README.md.
  2. docs/testing.md:318 invokes scripts/bench_wave64.py with $(brew --prefix llvm)/bin/llvm-mc, causing the test runner to interpret --prefix as a flag to bench_wave64.py.
  3. docs/embedded_shaders.md:372 quotes external spirv-opt passes (--ssa-rewrite, --eliminate-dead-code-aggressive, --cfg-cleanup, --eliminate-dead-branches, --merge-blocks, --merge-return, --scalar-replacement).
  4. This adds --prefix and the spirv-opt passes to FOREIGN in tests/test_docs_cli_flags.py, which is dedicated to third-party tool flags quoted in documentation.

Tested

  • Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files.
  • Negative controls on main (e56d97950):
    python -I tests/test_docs_cli_flags.py -> FAILED (failures=2).
  • Positive controls on fix/docs-cli-flags-foreign-and-i18n (efa3f3176):
    python -I tests/test_docs_cli_flags.py -> Ran 4 tests in 24.853s - OK.
  • Hygiene checks:
    python -I scripts/check_no_game_data.py docs/i18n/pt-PT/quickstart.md tests/test_docs_cli_flags.py: clean.
    git diff --check origin/main: clean.

AI-assisted: yes.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: docs-only change.)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/167 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9901` --- ### 📝 Commits (1) - [`efa3f31`](https://github.com/ubiquitarianism/leonida/commit/efa3f317634f9e60c8b39f7d3caed94f04cc19a1) docs: update pt-PT quickstart pc checker and whitelist foreign CLI flags ### 📊 Changes **2 files changed** (+9 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `docs/i18n/pt-PT/quickstart.md` (+1 -4) 📝 `tests/test_docs_cli_flags.py` (+8 -2) </details> ### 📄 Description > Carried over from **old PR 9901** by `neoisg8` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9901`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > This branch conflicts with the current `main` and needs a rebase. > `neoisg8`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Claimed in the coordination issue: https://github.com/ProjectLeonida/Leonida/issues/9677 Depends on: none. ### What and why `tests/test_docs_cli_flags.py` was failing on `main` (`e56d97950`): ```text FAIL: test_docs_name_existing_flags AssertionError: Lists differ: [('docs/embedded_shaders.md:372', '--ssa-rewrite'), ... ('docs/i18n/pt-PT/quickstart.md:45', '--profile'), ('docs/i18n/pt-PT/quickstart.md:46', '--profile')] != [] FAIL: test_fenced_commands_use_the_flags_of_their_tool AssertionError: Lists differ: [('docs/testing.md:318', 'scripts/bench_wave64.py', '--prefix')] != [] : fenced commands using a flag their script lacks: docs/testing.md:318 scripts/bench_wave64.py --prefix ``` 1. Commit `5125a01f0` removed `tools/pc_checker.py` and updated `README.md` to point to the web-based checker, but `docs/i18n/pt-PT/quickstart.md` still referenced `pc_checker.py` and `--profile 1`/`--profile 2`. This updates the Portuguese quickstart to match `README.md`. 2. `docs/testing.md:318` invokes `scripts/bench_wave64.py` with `$(brew --prefix llvm)/bin/llvm-mc`, causing the test runner to interpret `--prefix` as a flag to `bench_wave64.py`. 3. `docs/embedded_shaders.md:372` quotes external `spirv-opt` passes (`--ssa-rewrite`, `--eliminate-dead-code-aggressive`, `--cfg-cleanup`, `--eliminate-dead-branches`, `--merge-blocks`, `--merge-return`, `--scalar-replacement`). 4. This adds `--prefix` and the `spirv-opt` passes to `FOREIGN` in `tests/test_docs_cli_flags.py`, which is dedicated to third-party tool flags quoted in documentation. ### Tested - Windows 11 Pro 26100, Python 3.12.10, CPU only, no GPU, no game files. - Negative controls on `main` (`e56d97950`): `python -I tests/test_docs_cli_flags.py` -> `FAILED (failures=2)`. - Positive controls on `fix/docs-cli-flags-foreign-and-i18n` (`efa3f3176`): `python -I tests/test_docs_cli_flags.py` -> `Ran 4 tests in 24.853s - OK`. - Hygiene checks: `python -I scripts/check_no_game_data.py docs/i18n/pt-PT/quickstart.md tests/test_docs_cli_flags.py`: clean. `git diff --check origin/main`: clean. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: docs-only change.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#218
No description provided.