diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae2c25459..eda7d3945 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,7 +71,7 @@ the checks CI runs on a pull request (Python 3.12 or newer): pip install pyyaml "jsonschema[format-nongpl]" markdown pyte hypothesis vermin python scripts/validate_pr.py --changed # the BIOS files the branch adds python scripts/validate_schemas.py --source-only # profiles and platform files -python scripts/profile_sync.py --added --base upstream/main --strict # each profile the branch adds +python scripts/profile_sync.py --added --strict # each profile the branch adds python scripts/refresh_data_dirs.py # data directories the pack-building tests read python scripts/generate_site.py # the pages the site tests read npm ci --prefix website && npm run build --prefix website # the built site, Node 24 @@ -80,10 +80,9 @@ python scripts/validate_site.py --site-dir website/dist # links and page budget vermin --no-tips -t=3.8- --violations install.py # install.py stays on Python 3.8 ``` -`upstream` is this repository as a remote of your fork -(`git remote add upstream https://github.com/Abdess/retrobios`, then -`git fetch upstream`). A profile you only edit is not held to `--strict`: its -older refs are reviewed by hand. +`profile_sync.py` compares the branch with this repository's `main`, and +fetches it in a fork's clone. A profile you only edit is not held to +`--strict`: its older refs are reviewed by hand. The full pipeline is not needed for a contribution: it rebuilds every pack in `dist/`, which is why maintainers run it before a release. diff --git a/scripts/generate_readme.py b/scripts/generate_readme.py index 1a3187461..77c5ef33d 100644 --- a/scripts/generate_readme.py +++ b/scripts/generate_readme.py @@ -981,7 +981,7 @@ the checks CI runs on a pull request (Python 3.12 or newer): pip install pyyaml "jsonschema[format-nongpl]" markdown pyte hypothesis vermin python scripts/validate_pr.py --changed # the BIOS files the branch adds python scripts/validate_schemas.py --source-only # profiles and platform files -python scripts/profile_sync.py --added --base upstream/main --strict # each profile the branch adds +python scripts/profile_sync.py --added --strict # each profile the branch adds python scripts/refresh_data_dirs.py # data directories the pack-building tests read python scripts/generate_site.py # the pages the site tests read npm ci --prefix website && npm run build --prefix website # the built site, Node 24 @@ -990,10 +990,9 @@ python scripts/validate_site.py --site-dir website/dist # links and page budget vermin --no-tips -t=3.8- --violations install.py # install.py stays on Python 3.8 ``` -`upstream` is this repository as a remote of your fork -(`git remote add upstream https://github.com/Abdess/retrobios`, then -`git fetch upstream`). A profile you only edit is not held to `--strict`: its -older refs are reviewed by hand. +`profile_sync.py` compares the branch with this repository's `main`, and +fetches it in a fork's clone. A profile you only edit is not held to +`--strict`: its older refs are reviewed by hand. The full pipeline is not needed for a contribution: it rebuilds every pack in `dist/`, which is why maintainers run it before a release. diff --git a/tests/test_contributing_text.py b/tests/test_contributing_text.py index 66ced6b53..593ad04fa 100644 --- a/tests/test_contributing_text.py +++ b/tests/test_contributing_text.py @@ -75,7 +75,8 @@ class BeforeOpeningAPullRequest(unittest.TestCase): # CI holds added profiles to their upstream, not edited ones: --changed # failed a contributor on refs they never wrote. self.assertIn("profile_sync.py --added --base", workflow) - self.assertIn("profile_sync.py --added --base upstream/main --strict", block) + self.assertIn("profile_sync.py --added --strict", block) + self.assertNotIn("upstream/main", section) self.assertNotIn("--changed --strict", block) def test_it_names_the_site_build_and_the_packages_ci_runs(self): diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index fc511761f..292ec753e 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -6017,7 +6017,11 @@ class TestBranchCheckIsWired(unittest.TestCase): import generate_readme # noqa: PLC0415 text = generate_readme.generate_contributing() - self.assertIn("profile_sync.py --added --base upstream/main --strict", text) + self.assertIn("profile_sync.py --added --strict", text) + # The default base is fetched by the tool: a documented upstream + # remote failed every clone that had origin alone. + self.assertNotIn("--base upstream/main", text) + self.assertNotIn("remote add upstream", text) self.assertNotIn("--emulator NAME --strict", text) workflow = (root / ".github" / "workflows" / "validate.yml").read_text() self.assertIn("profile_sync.py --added --base", workflow) diff --git a/wiki/tools.md b/wiki/tools.md index 93b044523..5992abbcd 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -475,7 +475,7 @@ python scripts/profile_sync.py --all --stale-before 2026-06-01 --limit 20 --tria python scripts/profile_sync.py --emulator vice --full-diff --ref vice/src/c64/c64rom.h --context 6 python scripts/profile_sync.py --emulator vice --strict python scripts/profile_sync.py --changed --strict -python scripts/profile_sync.py --added --base upstream/main --strict +python scripts/profile_sync.py --added --strict ``` Per part of a ref: `ANCHORED` (same content, same lines), `SHIFTED` (same