Skip to content

Develop#707

Draft
jbcaillau wants to merge 88 commits intomainfrom
develop
Draft

Develop#707
jbcaillau wants to merge 88 commits intomainfrom
develop

Conversation

@jbcaillau
Copy link
Member

  • PR tracking develop -> main
  • develop stores the latest beta

ocots and others added 30 commits January 17, 2026 15:00
…link

- Combine test/Project.toml into main Project.toml using [extras] and [targets]
- Add compat constraints for all test dependencies
- Fix broken external reference in docs/src/manual-model.md
- Update version to 1.1.7-beta
- Accept CTParser v0.7 and v0.8
- Prepare for CTParser v0.8.2-beta testing
- Part of migration tracked in control-toolbox/CTParser.jl#207
Adapt to CTModels v0.7.x and integrate CTSolvers
- Add ctbase.jl with CTBase exception reexports using @reexport import
- Add ctdirect.jl with CTDirect types and functions reexports
- Add test_ctbase.jl and test_ctdirect.jl to verify reexports
- Enable ctdirect.jl include in OptimalControl.jl
- Add Reexport dependency to Project.toml
- Fix 'Invalid redefinition of constant' error by using proper @reexport import pattern
- Add ctflows.jl with CTFlows types, functions, operators, and macros reexports
- Add test_ctflows.jl to verify reexports with proper type checking
- Fix test issues: separate types vs functions, handle @lie macro correctly
- Enable ctflows.jl include in OptimalControl.jl
- All reexport tests now passing (35/35)
- Add reexport tests for CTModels, CTParser, CTSolvers, and ExaModels
- Fix @reexport import syntax errors by combining multiple import blocks
- Enable ctmodels.jl, ctparser.jl, ctsolvers.jl, and examodels.jl imports
- Add module prefix exports (CTBase, CTModels, ExaModels) for generated code
- Remove unused plots.jl import file
- All reexport tests now pass (426/426 tests)
- Add canonical solve function in src/solve.jl with CommonSolve interface
- Export solve function from OptimalControl module
- Create test problems (Beam, Goddard) in test/problems/
- Add comprehensive test_canonical.jl testing all combinations:
  * Discretizers: Collocation (midpoint, trapeze)
  * Modelers: ADNLPModeler, ExaModeler
  * Solvers: IpoptSolver, MadNLPSolver
  * Problems: Beam, Goddard
- Add progress printing for test debugging
- Update Project.toml dependencies (Reexport version, gitignore)
- Remove unused modelers.jl (moved to .save/)
- Change println to print for inline progress display
- Add ✓ done confirmation after each test completion
- Add CUDA import and MadNLPGPU dependency
- Add CUDA availability check with informative message at module load
- Add GPU test section with:
  * ExaModeler(backend=CUDA.CUDABackend())
  * MadNLPSolver(linear_solver=MadNLPGPU.CUDSSSolver)
  * Guarded by CUDA.functional() check
- Tests run only if CUDA is available, otherwise skipped with @info
- Update Project.toml to include MadNLPGPU in dependencies and test extras
- Remove redundant validate_initial_guess call (already done in build_initial_guess)
- Update comment to reflect build_initial_guess handles both building and validation
- Create test/suite/builders/test_options_forwarding.jl
- Test ExaModeler options: base_type and backend (both @test_broken)
- Test ADNLPModeler options: name (@test_broken), backend (@test), and advanced backend overrides (@test_broken)
- Use MockGPUBackend <: KernelAbstractions.GPU for backend testing
- Document which options are currently forwarded vs not forwarded by CTDirect builders
- Remove @reexport from imports that should not be exported
- Update test files to use fully qualified type names
- Fix test expectations: types should not be exported to Main
- Ensure proper module scoping in reexport tests
- Convert 3 @test_broken → @test for advanced ADNLPModeler backends
- Add tests for all 7 advanced backend options (gradient, hessian, jacobian, hprod, jprod, jtprod, ghjvprod)
- Use Types instead of instances for cleaner API (no args needed)
- Add conditional GPU backend test for ExaModeler when CUDA available
- Update comments to reflect CTSolvers v0.2.5-beta capabilities
- Add CUDA availability check in test files
- Fix Goddard problem objective (max → min formulation)
- Update runtests.jl with CUDA check
- Update test_canonical.jl CUDA check pattern

Result: 10 Pass tests (vs 3 Pass, 3 Broken before)
Full coverage of all testable backend forwarding options
- Create test_print_utils.jl module with SOLID architecture
- Add column headers for better readability
- Implement scientific notation for error (8.14e-04 format)
- Add phantom sign for positive objectives alignment
- Make memory display optional (disabled by default)
- Use CTModels iterations() function for proper data extraction
- Maintain backward compatibility with existing tests

Features:
- Professional table format inspired by CTBenchmarks.jl
- Real-time progress display with colors
- Summary statistics with success rate
- Clean separation of concerns (SRP, DIP, DRY)
- 48/48 tests passing
ocots and others added 21 commits February 19, 2026 18:56
… modes

- Added  to test explicit and descriptive modes on a real problem (Beam).
- Limited iterations to 0 to ensure fast execution while verifying correct routing and return types.
- Follows Separation of Concerns by isolating these end-to-end mode tests from unit and canonical tests.
- Document two orthogonal mechanisms: route_to(...; bypass=true) and bypass(val)
- route_to with bypass: local permissive mode for descriptive solve
- bypass(val): wrapper for explicit strategy constructors
- Detailed implementation plan with file-by-file changes
- Clear separation: mode for global control, bypass for local actions
- Add English header comments explaining the role of each test file
- Updated test files in suite/solve/, suite/helpers/, suite/builders/, and suite/reexport/
- Comments describe what each test suite validates and its place in the architecture
- Improves code readability and maintainability for developers
- New test file test/suite/solve/test_bypass.jl with 27 tests
- Mock strategies implementing full CTSolvers contract (StrategyOptions, metadata, options accessor)
- Layer 3 override intercepting solve call to inspect resulting strategies
- Descriptive mode: error without bypass, bypass on solver/discretizer/modeler, multi-bypass, bypass(nothing)
- Explicit mode: bypass via strategy constructor
- Top-level dispatch: both descriptive and explicit paths via solve()
…tions with aliases init/i

- _descriptive_action_defs() declares initial_guess (aliases: init, i) and display
- _build_components_from_routed receives ocp, extracts action options from routed.action
- _DEFAULT_DISPLAY and _DEFAULT_INITIAL_GUESS constants as single source of truth
- _unwrap_option helper to unwrap OptionValue without duplication
- solve_descriptive signature simplified: no more explicit initial_guess/display args
- solve_explicit extracts action options from kwargs with _extract_action_kwarg
- CommonSolve.solve signature simplified: all kwargs...
- _extract_action_kwarg helper with alias conflict detection
- OptionValue imported from CTSolvers
- All 284 solve tests pass
…ALIASES/_INITIAL_GUESS_ALIASES_ONLY constants
@jbcaillau
Copy link
Member Author

stupid spell check failure!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

Breakage test results
Date: 2026-02-27 22:13:10

Name Latest Stable
OptimalControlProblems
Tutorials

@jbcaillau jbcaillau marked this pull request as ready for review February 25, 2026 15:15
@jbcaillau jbcaillau marked this pull request as draft February 25, 2026 15:15
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 89.93711% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.93%. Comparing base (d3c1cbb) to head (6a27947).

Files with missing lines Patch % Lines
src/helpers/print.jl 80.64% 12 Missing ⚠️
src/helpers/strategy_builders.jl 88.88% 2 Missing ⚠️
src/helpers/descriptive_routing.jl 93.33% 1 Missing ⚠️
src/solve/canonical.jl 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #707       +/-   ##
===========================================
+ Coverage   67.74%   89.93%   +22.19%     
===========================================
  Files           2       14       +12     
  Lines          31      159      +128     
===========================================
+ Hits           21      143      +122     
- Misses         10       16        +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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