Skip to content

Commit 94c6c5d

Browse files
committed
fix: suppress verbose output in tests
- Fix MD060 table formatting in CHANGELOG.md - Replace @info logs with silent comments for CUDA GPU skips - Redirect stdout for show_time=true test to suppress timing output - Keep test logic intact while reducing noise
1 parent 1e5b25e commit 94c6c5d

File tree

4 files changed

+103
-28
lines changed

4 files changed

+103
-28
lines changed

BREAKING.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,34 @@ and provides migration guides for users upgrading between versions.
55

66
---
77

8-
## v0.3.1-beta (2026-02-14)
8+
## v0.3.3-beta (2026-02-16)
9+
10+
**Breaking change:** The base solver abstract type was renamed from
11+
`AbstractOptimizationSolver` to `AbstractNLPSolver` for consistency with the
12+
`AbstractNLPModeler` naming introduced in v0.3.0.
13+
14+
### Migration
15+
16+
Replace any references to the old abstract type:
917

10-
**No breaking changes** — This release only adds enhancements:
18+
```text
19+
AbstractOptimizationSolver → AbstractNLPSolver
20+
```
1121

12-
- Backend override options now accept both `Type{<:ADBackend}` and `ADBackend` instances
13-
- Improved validation and error messages
14-
- Better test coverage and documentation
22+
No other API changes are required.
23+
24+
---
25+
26+
## v0.3.2-beta (2026-02-15)
27+
28+
No breaking changes. This release focused on options getters/encapsulation
29+
and documentation updates.
30+
31+
---
32+
33+
## v0.3.1-beta (2026-02-14)
34+
35+
No breaking changes.
1536

1637
---
1738

@@ -33,25 +54,25 @@ This aligns with Julia conventions (`Module.Type`) and improves readability.
3354

3455
### Modelers
3556

36-
| v0.2.x | v0.3.0 |
37-
|--------|--------|
38-
| `ADNLPModeler` | `Modelers.ADNLP` |
39-
| `ExaModeler` | `Modelers.Exa` |
40-
| `AbstractOptimizationModeler` | `AbstractNLPModeler` |
57+
| v0.2.x | v0.3.0 |
58+
|------------------------------|------------------------|
59+
| `ADNLPModeler` | `Modelers.ADNLP` |
60+
| `ExaModeler` | `Modelers.Exa` |
61+
| `AbstractOptimizationModeler`| `AbstractNLPModeler` |
4162

4263
### Solvers
4364

44-
| v0.2.x | v0.3.0 |
45-
|--------|--------|
46-
| `IpoptSolver` | `Solvers.Ipopt` |
47-
| `MadNLPSolver` | `Solvers.MadNLP` |
48-
| `MadNCLSolver` | `Solvers.MadNCL` |
49-
| `KnitroSolver` | `Solvers.Knitro` |
65+
| v0.2.x | v0.3.0 |
66+
|---------------|------------------|
67+
| `IpoptSolver` | `Solvers.Ipopt` |
68+
| `MadNLPSolver`| `Solvers.MadNLP` |
69+
| `MadNCLSolver`| `Solvers.MadNCL` |
70+
| `KnitroSolver`| `Solvers.Knitro` |
5071

5172
### DOCP
5273

53-
| v0.2.x | v0.3.0 |
54-
|--------|--------|
74+
| v0.2.x | v0.3.0 |
75+
|------------------------------------|--------------------|
5576
| `DiscretizedOptimalControlProblem` | `DiscretizedModel` |
5677

5778
---
@@ -62,7 +83,7 @@ This aligns with Julia conventions (`Module.Type`) and improves readability.
6283

6384
The simplest migration is a global search-and-replace in your codebase:
6485

65-
```
86+
```text
6687
ADNLPModeler → Modelers.ADNLP
6788
ExaModeler → Modelers.Exa
6889
AbstractOptimizationModeler → AbstractNLPModeler

CHANGELOG.md

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Changelog
2+
<!-- markdownlint-disable MD024 -->
23

34
All notable changes to CTSolvers.jl will be documented in this file.
45

@@ -9,6 +10,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
910

1011
## [Unreleased]
1112

13+
## [0.3.3-beta] - 2026-02-16
14+
15+
### Changed
16+
17+
- **Solver abstract type rename**`AbstractOptimizationSolver` was renamed to
18+
`AbstractNLPSolver` for consistency with `AbstractNLPModeler` naming
19+
- **Docs maintenance** — Updated references to the new abstract solver type
20+
across orchestration/routing examples and solver documentation
21+
22+
### Fixed
23+
24+
- **Test alignment** — Tests updated to use `AbstractNLPSolver`, keeping
25+
inheritance and contract checks consistent with the new naming
26+
27+
---
28+
29+
## [0.3.2-beta] - 2026-02-15
30+
31+
### Added
32+
33+
- **Options getters** — New getters/exported helpers for `StrategyOptions`
34+
35+
### Changed
36+
37+
- **Encapsulation** — Internal access to strategy options now goes through
38+
`_raw_options`/getter helpers; docs updated accordingly
39+
- **Docs** — Options system guide expanded and translated to English sections
40+
41+
### Fixed
42+
43+
- **Test refactor** — Tests updated to use the new getters and encapsulation
44+
pattern
45+
46+
---
47+
1248
## [0.3.1-beta] - 2026-02-14
1349

1450
### Added
@@ -25,6 +61,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2561
- `jacobian_backend`, `hessian_backend`, `ghjvprod_backend`
2662
- From: `Union{Nothing, ADNLPModels.ADBackend}`
2763
- To: `Union{Nothing, Type{<:ADNLPModels.ADBackend}, ADNLPModels.ADBackend}`
64+
- **Solver abstract type rename**`AbstractOptimizationSolver` was renamed to
65+
`AbstractNLPSolver` for consistency with `AbstractNLPModeler` naming
2866
- **Validation logic**`validate_backend_override()` now correctly handles three forms:
2967
- `nothing` (use default)
3068
- `Type{<:ADBackend}` (constructed by ADNLPModels)
@@ -41,6 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4179
### Technical Details
4280

4381
#### Backend Override Usage
82+
4483
```julia
4584
# Three accepted forms:
4685
Modelers.ADNLP(gradient_backend=nothing) # Use default
@@ -49,6 +88,7 @@ Modelers.ADNLP(gradient_backend=ADNLPModels.ForwardDiffADGradient()) # Instance
4988
```
5089

5190
#### Type Declaration Change
91+
5292
```julia
5393
# Before
5494
type=Union{Nothing, ADNLPModels.ADBackend}
@@ -124,6 +164,7 @@ See [BREAKING.md](BREAKING.md) for a detailed migration guide.
124164
### Technical Details
125165

126166
#### Import Refactoring
167+
127168
```julia
128169
# Before
129170
using DocStringExtensions
@@ -135,6 +176,7 @@ import NLPModels
135176
```
136177

137178
#### GPU Test Implementation
179+
138180
```julia
139181
# Before (dead code)
140182
# using MadNLPGPU
@@ -146,6 +188,7 @@ gpu_solver = Solvers.MadNLP(linear_solver=MadNLPGPU.CUDSSSolver)
146188
```
147189

148190
#### CUDA Availability Helper
191+
149192
```julia
150193
is_cuda_on() = CUDA.functional()
151194
if is_cuda_on()
@@ -205,6 +248,7 @@ end
205248
### 🎉 BREAKING CHANGES
206249

207250
### Added
251+
208252
- **New option validation system** with strict and permissive modes
209253
- **`mode::Symbol` parameter** to strategy constructors (`:strict` default, `:permissive`)
210254
- **`route_to()` helper function** for option disambiguation
@@ -213,34 +257,40 @@ end
213257
- **Comprehensive test suite** with 66 tests covering all scenarios
214258

215259
### Changed
260+
216261
- **`build_strategy_options()`** now supports `mode` parameter
217262
- **`route_all_options()`** now supports `mode` parameter
218263
- **Error handling** uses CTBase `Exceptions.IncorrectArgument` and `Exceptions.PreconditionError`
219264
- **Warning system** for unknown options in permissive mode
220265
- **Documentation** completely updated with examples and tutorials
221266

222267
### Deprecated
268+
223269
- **Tuple syntax for disambiguation** (still supported but deprecated)
224270
- Old: `max_iter = (1000, :solver)`
225271
- New: `max_iter = route_to(solver=1000)`
226272

227273
### Fixed
274+
228275
- **Option validation** now provides helpful error messages
229276
- **Disambiguation** works clearly with `route_to()`
230277
- **Type safety** improved with `RoutedOption` type
231278
- **Memory usage** optimized for validation system
232279

233280
### Security
281+
234282
- **Strict mode by default** prevents unknown option errors
235283
- **Input validation** enhanced with type checking
236284
- **Error messages** don't leak sensitive information
237285

238286
### Performance
287+
239288
- **Minimal overhead**: < 1% for strict mode, < 5% for permissive mode
240289
- **Type stability** maintained throughout validation system
241290
- **Memory efficiency** optimized for large option sets
242291

243292
### Documentation
293+
244294
- **Complete user guide** with examples and best practices
245295
- **Migration guide** for existing code
246296
- **API reference** with detailed examples
@@ -252,13 +302,15 @@ end
252302
## [0.1.0] - 2025-XX-XX
253303

254304
### Added
305+
255306
- Initial release of CTSolvers.jl
256307
- Basic strategy construction and management
257308
- Option handling and validation
258309
- Strategy registry and metadata system
259310
- Integration with NLPModels and solvers
260311

261312
### Features
313+
262314
- Strategy builders and constructors
263315
- Option extraction and validation
264316
- Strategy registry with metadata
@@ -354,7 +406,7 @@ use permissive mode:
354406
## Performance Impact
355407

356408
| Operation | Before | After (Strict) | After (Permissive) | Overhead |
357-
|-----------|--------|----------------|-------------------|----------|
409+
| ----------- | -------- | ---------------- | -------------------- | ---------- |
358410
| Strategy construction | 100μs | 101μs | 105μs | < 1% / < 5% |
359411
| Option validation | 50μs | 50μs | 52μs | 0% / < 4% |
360412
| Disambiguation | N/A | 1μs | 1μs | < 1% |
@@ -390,6 +442,6 @@ use permissive mode:
390442

391443
## Questions?
392444

393-
- **GitHub Issues**: https://github.com/control-toolbox/CTSolvers.jl/issues
394-
- **Discord**: https://discord.gg/control-toolbox
395-
- **Documentation**: https://control-toolbox.github.io/CTSolvers.jl/
445+
- **GitHub Issues**: <https://github.com/control-toolbox/CTSolvers.jl/issues>
446+
- **Discord**: <https://discord.gg/control-toolbox>
447+
- **Documentation**: <https://control-toolbox.github.io/CTSolvers.jl/>

test/suite/extensions/test_madncl_extension.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function test_madncl_extension()
497497
# Test.@test Array(sol.solution)[1] ≈ max_prob.sol[1] atol=1e-6
498498
# end
499499
else
500-
@info "CUDA not functional, skipping GPU tests."
500+
# CUDA not functional — skip silently (reported in runtests.jl)
501501
end
502502
end
503503

@@ -537,7 +537,7 @@ function test_madncl_extension()
537537
# Test.@test Array(sol.solution)[1] ≈ max_prob.sol[1] atol=1e-6
538538
# end
539539
else
540-
@info "CUDA not functional, skipping GPU solve_with_madncl tests."
540+
# CUDA not functional — skip silently (reported in runtests.jl)
541541
end
542542
end
543543

@@ -570,7 +570,7 @@ function test_madncl_extension()
570570
Test.@test Array(sol.solution) expected atol=1e-6
571571
end
572572
else
573-
@info "CUDA not functional, skipping GPU initial guess tests."
573+
# CUDA not functional — skip silently (reported in runtests.jl)
574574
end
575575
end
576576
end

test/suite/optimization/test_optimization.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ function test_optimization()
142142
Test.@test nlp.meta.x0 == x0
143143

144144
# Test with kwargs
145-
nlp2 = builder(x0; show_time=true)
146-
Test.@test calls[] == 2
145+
redirect_stdout(devnull) do
146+
nlp2 = builder(x0; show_time=true)
147+
Test.@test calls[] == 2
148+
end
147149
end
148150

149151
Test.@testset "ExaModelBuilder" begin

0 commit comments

Comments
 (0)