From 52da7cee1d21febb673897cbb1d04ed54361d13f Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 18 Dec 2025 08:34:32 +0000 Subject: [PATCH 1/3] add specific excludes --- github_scripts/get_git_sources.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index e9f94f2..97d0867 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -12,6 +12,7 @@ from typing import Optional from pathlib import Path from shutil import rmtree +import shlex def run_command( @@ -24,7 +25,7 @@ def run_command( Outputs: - result object from subprocess.run """ - command = command.split() + command = shlex.split(command) result = subprocess.run( command, capture_output=True, @@ -117,8 +118,25 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: # Create a clean clone location loc.mkdir(parents=True) + exclude_dirs = ( + "applications/*/working", + "applications/*/bin", + "science/*/working", + "science/*/bin", + "interfaces/*/working", + "interfaces/*/bin", + "components/*/working", + "components/*/bin", + "infrastructure/*/working", + "infrastructure/*/bin", + "mesh_tools/*/working", + "mesh_tools/*/bin" + ) + # Trailing slash required for rsync command = f"rsync -av {repo_source}/ {loc}" + for item in exclude_dirs: + command = f"{command} --exclude '{item}'" run_command(command) # Fetch the main branch from origin From 327c509378d7885974cb522a8a944aa8f5ca780f Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 18 Dec 2025 08:48:02 +0000 Subject: [PATCH 2/3] add test directory too --- github_scripts/get_git_sources.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 97d0867..571bc77 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -120,16 +120,22 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: exclude_dirs = ( "applications/*/working", + "applications/*/test", "applications/*/bin", "science/*/working", + "science/*/test", "science/*/bin", "interfaces/*/working", + "interfaces/*/test", "interfaces/*/bin", "components/*/working", + "components/*/test", "components/*/bin", "infrastructure/*/working", + "infrastructure/*/test", "infrastructure/*/bin", "mesh_tools/*/working", + "mesh_tools/*/test", "mesh_tools/*/bin" ) From a75ee3789e92d57cf414f6c4d333429525615f78 Mon Sep 17 00:00:00 2001 From: James Bruten Date: Thu, 18 Dec 2025 09:56:35 +0000 Subject: [PATCH 3/3] run black --- github_scripts/get_git_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 571bc77..d5ec8d1 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -136,7 +136,7 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: "infrastructure/*/bin", "mesh_tools/*/working", "mesh_tools/*/test", - "mesh_tools/*/bin" + "mesh_tools/*/bin", ) # Trailing slash required for rsync