Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Replace ReTestItems.jl with a lightweight test/testitem_compat.jl shim that provides @testsetup/@testitem macros, using SafeTestsets-style module isolation
  • Rewrite test/runtests.jl to use GROUP-based file inclusion (same pattern as OrdinaryDiffEq.jl)
  • Remove ReTestItems and Hwloc from Project.toml

This resolves CI issues like "Package ReTestItems not found" errors while preserving all existing tests unchanged. The @testitem/@testsetup annotations are kept in test files so the VSCode Julia extension can still discover tests.

Design details

@testsetup module Name ... end: Evaluates the module at Main scope. Exports make names available via using.

@testitem "name" [tags=...] [setup=[...]] begin ... end: Creates an isolated module inside a @testset block, automatically injecting using Test, using NeuralPDE, and using ..SetupModule for each setup module. When GROUP != "all", items whose tags don't match the current group are skipped (matching ReTestItems' tag-filtering behavior).

What does NOT change

  • No test file modifications — compatibility macros handle everything
  • No CI workflow changes — Tests.yml already uses GROUP env var with the same group names
  • All tests preserved — no downstream test removal

Test plan

Verified locally on 4 representative test groups:

  • GROUP=QA — Aqua + ExplicitImports (catches import issues)
  • GROUP=NNPDE2 — direct_function_tests + additional_loss_tests (verifies tag filtering skips untagged items)
  • GROUP=AdaptiveLoss — adaptive_loss_tests (verifies @testsetup module mechanism)
  • GROUP=DGM — dgm_tests (verifies include("burger_reference_data.jl") resolution in @eval'd modules)
  • Runic formatting check on modified files

🤖 Generated with Claude Code

Replace ReTestItems.jl with a lightweight testitem_compat.jl shim that
provides @testsetup/@testitem macros compatible with both the standard
test runner and the VSCode Julia extension. Test files are unchanged.

- Add test/testitem_compat.jl with SafeTestsets-style module isolation
- Rewrite test/runtests.jl to use GROUP-based file inclusion
- Remove ReTestItems and Hwloc from Project.toml

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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