Test Update Summary
Changes Made
1. Created Compatibility Layers
Created backward compatibility wrappers for the old phase execution API:
/nf/core/phased_execution.py- ProvidesPhaseExecutionPlanandCircularDependencyInfowrappers/nf/core/phase_models.py- ProvidesExecutionPlanwrapper and re-exports from new phases module/nf/core/phase_planner.py- ProvidesCircularDependencyPhasePlannerwrapper/nf/core/phase_planner_v2.py- ProvidesOptimizedPhasePlannerwrapper
These wrappers ensure that tests using the old API will continue to work by translating calls to the new unified phases API.
2. API Changes Handled
The main API changes that were addressed:
PhaseExecutionPlan.add_phase(description)- Now creates and returns a Phase objectExecutionPlan.add_phase(description, stack_id)- Similar but with stack_id parameterCircularDependencyInfo(cycle_path=...)- Maps old cycle_path to new cycle parameter- Various phase planner methods mapped to new PhasePlanner implementation
Tests That May Need Removal/Update
1. Performance Comparison Tests (OUTDATED)
test_phase_optimization.py- Compares "original" vs "optimized" planners that are now both wrapperstest_phase_performance.py- Benchmarks that may not be meaningful with new implementationtest_parallel_phase_benchmarks.py- Similar performance comparisons
These tests were comparing different implementations that no longer exist. They now compare two wrappers around the same implementation.
2. Implementation-Specific Tests
- Tests that check specific implementation details of the old phase planners
- Tests for Tarjan's algorithm vs DFS (the new implementation may use different algorithms)
- Cache-specific tests that rely on old caching mechanisms
3. Tests That Should Be Kept
test_phased_execution.py- Basic phased execution functionalitytest_circular_dep_resolution.py- Core circular dependency handlingtest_n_phase_circular_deps.py- Complex multi-phase scenariostest_phased_resource_omission.py- Resource omission logic
Recommendations
- Remove purely performance comparison tests - They no longer test meaningful differences
- Keep functional tests - Tests that verify correct behavior should be retained
- Update implementation-specific tests - Rewrite to test the new implementation
- Add new tests - Create tests for the new unified phases API
Missing Dependencies
Note: There's a missing magic_codec dependency preventing tests from running. This needs to be resolved before tests can be executed.