From 7730d26b09858c1d2f08afa8feff1703257634fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Jun 2026 07:18:47 +0000 Subject: [PATCH 1/2] fix(ci): exclude scripts/ from pytest collection to fix RPi import error --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 72cb37dd3f..f6520485c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,9 @@ donkey = "donkeycar.management.base:execute_from_command_line" [project.urls] Homepage = "https://github.com/autorope/donkeycar" +[tool.pytest.ini_options] +norecursedirs = ["scripts"] + [tool.setuptools.dynamic] version = {attr = "donkeycar.__version__"} From 674ad81f28598319e984b2f868c2d0176629e467 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Jun 2026 07:40:40 +0000 Subject: [PATCH 2/2] fix(test): use complete template in test_drive and guard missing legacy config flags --- donkeycar/templates/complete.py | 9 ++++++--- donkeycar/tests/test_template.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/donkeycar/templates/complete.py b/donkeycar/templates/complete.py index 95770f7296..16dcd1e86a 100644 --- a/donkeycar/templates/complete.py +++ b/donkeycar/templates/complete.py @@ -64,10 +64,13 @@ def drive(cfg, model_path=None, use_joystick=False, model_type=None, #if we also try to use cuda. so disable for donkey_gym. os.environ["CUDA_VISIBLE_DEVICES"]="-1" + train_localizer = getattr(cfg, 'TRAIN_LOCALIZER', False) + train_behaviors = getattr(cfg, 'TRAIN_BEHAVIORS', False) + if model_type is None: - if cfg.TRAIN_LOCALIZER: + if train_localizer: model_type = "localizer" - elif cfg.TRAIN_BEHAVIORS: + elif train_behaviors: model_type = "behavior" else: model_type = cfg.DEFAULT_MODEL_TYPE @@ -394,7 +397,7 @@ def run(self, *components): # outputs = ['pilot/angle', 'pilot/throttle'] - if cfg.TRAIN_LOCALIZER: + if train_localizer: outputs.append("pilot/loc") # diff --git a/donkeycar/tests/test_template.py b/donkeycar/tests/test_template.py index 4daee0bb88..8b56bbfd6a 100755 --- a/donkeycar/tests/test_template.py +++ b/donkeycar/tests/test_template.py @@ -18,7 +18,7 @@ def test_config(): def test_drive(): - path = default_template(d2_path(gettempdir())) + path = custom_template(d2_path(gettempdir()), template="complete") myconfig = open(os.path.join(path, 'myconfig.py'), "wt") myconfig.write("CAMERA_TYPE = 'MOCK'\n") myconfig.write("USE_SSD1306_128_32 = False \n")