Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Refactors LinearVerbosity to use SciMLLogging's @verbosity_specifier macro instead of manual struct definition and constructors
  • Reduces code from ~314 lines to ~218 lines while maintaining identical functionality
  • Bumps SciMLLogging minimum version to 1.7 (required for the macro)

Changes

src/verbosity.jl:

  • Replace @concrete struct with SciMLLogging.@verbosity_specifier LinearVerbosity
  • Remove manual keyword constructor (~60 lines)
  • Remove manual preset constructors (~70 lines)
  • Remove _resolve_arg_value helper function
  • Keep backwards-compatible helper functions (option_group, group_options) and group classification constants

Project.toml:

  • Bump SciMLLogging minimum version from 1.3.1 to 1.7

What the macro auto-generates

  • Parametric struct LinearVerbosity{T1, T2, ...} for type stability
  • Preset constructors: LinearVerbosity(None()), LinearVerbosity(Minimal()), etc.
  • Keyword constructor with proper precedence: individual field > group > preset

Test plan

  • LinearVerbosity Tests: 30/30 passed
  • LinearVerbosity Logs Tests: 3/3 passed
  • BLAS Return Code Interpretation: 23/23 passed
  • OpenBLAS Verbosity Integration Tests: 5/5 passed
  • CI tests

🤖 Generated with Claude Code

ChrisRackauckas and others added 2 commits December 18, 2025 07:51
…acro

This change updates LinearVerbosity to use the @verbosity_specifier macro from
SciMLLogging instead of manual struct definition and constructor implementations.

Changes:
- Replace @concrete struct with @verbosity_specifier macro
- Remove manual keyword constructor (now auto-generated by macro)
- Remove manual preset constructors (now auto-generated by macro)
- Remove _resolve_arg_value helper function
- Keep group classification constants for backwards compatibility
- Keep option_group and group_options helper functions
- Bump SciMLLogging minimum version to 1.7 (required for @verbosity_specifier)

The macro generates:
- Parametric struct for type stability
- Preset constructors for None, Minimal, Standard, Detailed, All
- Keyword constructor with precedence: individual > group > preset

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The @verbosity_specifier macro generates code that uses these imports,
but ExplicitImports can't detect usage through macro expansions.
Added them to the ignore list in the QA tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ChrisRackauckas-Claude
Copy link
Contributor Author

Fixed the ExplicitImports stale imports error. The @verbosity_specifier macro generates code that uses these SciMLLogging imports (AbstractVerbositySpecifier, AbstractMessageLevel, AbstractVerbosityPreset, None, Minimal, Standard, Detailed, All), but ExplicitImports can't detect usage through macro expansions. Added them to the ignore list in the QA tests.

@ChrisRackauckas ChrisRackauckas merged commit babd4b8 into SciML:main Dec 18, 2025
140 of 142 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