Skip to content

Resolve PR CI template failures after default-template switch#29

Merged
DocGarbanzo merged 2 commits into
devfrom
copilot/fix-ci-errors
Jun 15, 2026
Merged

Resolve PR CI template failures after default-template switch#29
DocGarbanzo merged 2 commits into
devfrom
copilot/fix-ci-errors

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown

CI started failing in test_template.py::test_drive after donkey5 became the default template. The test invoked complete.drive() with a config shape that no longer guaranteed complete-specific flags.

  • Root cause

    • test_drive created the default (donkey5) template, then executed donkeycar.templates.complete.drive().
    • complete.drive() accessed TRAIN_LOCALIZER / TRAIN_BEHAVIORS directly, which are not guaranteed on non-complete configs.
  • Changes

    • Template test alignment
      • Updated test_drive to explicitly create the complete template before calling complete.drive.
    • Runtime compatibility hardening
      • In donkeycar/templates/complete.py, replaced direct config attribute access with safe defaults via getattr(..., False) for TRAIN_LOCALIZER and TRAIN_BEHAVIORS.
      • Reused the normalized values when selecting model type and pilot outputs.
  • Representative diff

    # test_template.py
    path = custom_template(d2_path(gettempdir()), template="complete")
    
    # complete.py
    train_localizer = getattr(cfg, 'TRAIN_LOCALIZER', False)
    train_behaviors = getattr(cfg, 'TRAIN_BEHAVIORS', False)

Copilot AI changed the title fix(ci): exclude scripts/ from pytest collection Resolve PR CI template failures after default-template switch Jun 15, 2026
Copilot AI requested a review from DocGarbanzo June 15, 2026 07:43
@DocGarbanzo DocGarbanzo marked this pull request as ready for review June 15, 2026 07:58
@DocGarbanzo DocGarbanzo merged commit 6134270 into dev Jun 15, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants