8000 Convert change detection to a Python script by AA-Turner · Pull Request #129627 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Convert change detection to a Python script #129627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hugo's review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
  • Loading branch information
AA-Turner and hugovk authored Feb 4, 2025
commit 4c0a7a4dd0694ac733daa772bef59a861b6eea0d
2 changes: 1 addition & 1 deletion .github/workflows/reusable-change-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
COMMON_ANCESTOR=$( git rev-list --first-parent --max-parents=0 --max-count=1 "${branch_pr}" )
DATE=$( git log --date=iso8601 --format=%cd "${COMMON_ANCESTOR}" )

# Get all commits since that commit date from the base branch (eg: master or main):
# Get all commits since that commit date from the base branch (eg: main):
git fetch origin "${refspec_base}" --shallow-since="${DATE}" \
--no-tags --prune --no-recurse-submodules
env:
Expand Down
14 changes: 7 additions & 7 deletions Tools/build/compute-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
".ruff.toml",
"mypy.ini",
})
SUFFIXES_DOCUMENTATION = frozenset({".rst", ".md"})
SUFFIXES_C_OR_CPP = frozenset({".c", ".h", ".cpp"})
SUFFIXES_DOCUMENTATION = frozenset({".rst", ".md"})


@dataclass(kw_only=True, slots=True)
Expand All @@ -38,7 +38,7 @@ class Outputs:
run_windows_msi: bool = False


def compute_changes():
def compute_changes() -> None:
target_branch, head_branch = git_branches()
if target_branch and head_branch:
# Getting changed files only makes sense on a pull request
Expand All @@ -55,7 +55,7 @@ def compute_changes():
print("Run tests")

if outputs.run_hypothesis:
print("Run hypothesis tests")
print("Run Hypothesis tests")

if outputs.run_ci_fuzz:
print("Run CIFuzz tests")
Expand Down Expand Up @@ -155,14 +155,14 @@ def process_target_branch(outputs: Outputs, git_branch: str) -> Outputs:
if not git_branch:
outputs.run_tests = True

# Check if we should run the hypothesis tests
if git_branch in {"3.8", "3.9", "3.10", "3.11"}:
print("Branch too old for hypothesis tests")
# Check if we should run the Hypothesis tests
if git_branch in {"3.9", "3.10", "3.11"}:
print("Branch too old for Hypothesis tests")
outputs.run_hypothesis = False
else:
outputs.run_hypothesis = outputs.run_tests

# oss-fuzz maintains a configuration for fuzzing the main branch of
# OSS-Fuzz maintains a configuration for fuzzing the main branch of
# CPython, so CIFuzz should be run only for code that is likely to be
# merged into the main branch; compatibility with older branches may
# be broken.
Expand Down
Loading
0