diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fa3a8ece..fd89caf1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,12 +66,16 @@ the checks CI runs on a pull request (Python 3.12 or newer): pip install pyyaml "jsonschema[format-nongpl]" markdown 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 --changed --strict # each profile the branch adds or edits +python scripts/profile_sync.py --added --base upstream/main --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 python -m unittest discover -s tests -t . ``` +`upstream` is this repository as a remote of your fork +(`git remote add upstream https://github.com/Abdess/retrobios`). 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 1d32b975e..cfaec5afe 100644 --- a/scripts/generate_readme.py +++ b/scripts/generate_readme.py @@ -968,12 +968,16 @@ the checks CI runs on a pull request (Python 3.12 or newer): pip install pyyaml "jsonschema[format-nongpl]" markdown 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 --changed --strict # each profile the branch adds or edits +python scripts/profile_sync.py --added --base upstream/main --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 python -m unittest discover -s tests -t . ``` +`upstream` is this repository as a remote of your fork +(`git remote add upstream https://github.com/Abdess/retrobios`). 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 eed4b7945..09392caea 100644 --- a/tests/test_contributing_text.py +++ b/tests/test_contributing_text.py @@ -72,6 +72,11 @@ class BeforeOpeningAPullRequest(unittest.TestCase): self.assertNotIn("pipeline.py", block) workflow = (REPO_ROOT / ".github" / "workflows" / "validate.yml").read_text(encoding="utf-8") self.assertIn("validate_schemas.py --source-only", workflow) + # 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.assertNotIn("--changed --strict", block) def test_it_installs_what_the_checks_need_and_no_site_package(self): """The site is built by Node from website/package-lock.json: a pip