Skip to content

Add CTBase.Traits submodule (phase B of CTFlows→CTBase move)#461

Merged
ocots merged 6 commits into
mainfrom
move/ctflows-to-ctbase-phase-b
Jun 23, 2026
Merged

Add CTBase.Traits submodule (phase B of CTFlows→CTBase move)#461
ocots merged 6 commits into
mainfrom
move/ctflows-to-ctbase-phase-b

Conversation

@ocots

@ocots ocots commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Introduces a new CTBase.Traits submodule, the shared trait system for the
control-toolbox ecosystem (phase B of the CTFlows → CTBase move).

It owns, natively:

  • Time dependence: TimeDependence, Autonomous, NonAutonomous — these used
    to live in CTModels.Components; they are now defined here so the whole
    ecosystem shares a single set of types.
  • Variable dependence: VariableDependence, Fixed, NonFixed.
  • Integration mode, dynamics, mutability, AD, and variable-costate traits.
  • The generic predicates (is_autonomous, is_variable, …) with ::Any
    fallbacks and trait-contract dispatch (has_*_trait + time_dependence /
    variable_dependence).

Bumps version to 0.22.0-beta. No new dependencies.

Cross-repo ordering (IMPORTANT)

This is the first of three coordinated PRs and must merge first, then a CTBase
0.22 beta is released:

  1. CTBase #this → release 0.22 beta.
  2. CTModels adopts the trait types from CTBase.Traits (drops its own
    definitions) → release 0.13 beta.
  3. CTFlows deletes src/Traits/ and consumes CTBase.Traits.

Test plan

  • CTBase.Traits loads; types/predicates behave as expected.
  • Full CTBase test suite green (incl. the moved test/suite/traits/ + Aqua).
  • CI green.

🤖 Generated with Claude Code

ocots and others added 4 commits June 23, 2026 14:54
New `CTBase.Traits` submodule providing the trait system shared across the
control-toolbox ecosystem: time dependence (`TimeDependence`/`Autonomous`/
`NonAutonomous`, now defined natively here instead of in CTModels), variable
dependence (`Fixed`/`NonFixed`), integration mode, dynamics, mutability, AD and
variable-costate traits, plus the generic predicates (`is_autonomous`,
`is_variable`, ...) with their `::Any` fallbacks and trait-contract dispatch.

Registered in CTBase.jl after Exceptions. Bumps version to 0.22.0-beta.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Moved from CTFlows and rewired to CTBase.Traits (auto-discovered by the test
runner under test/suite/traits/).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a "Traits" guide under Core Concepts and a Traits API reference page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ocots added 2 commits June 23, 2026 16:14
- Add full module paths to all internal @ref references
- Change @extref to @ref for internal symbols (StrategyOptions, Exceptions)
- Fixes in abstract_strategy.jl, parameters.jl, describe_registry.jl
- Fixes in time_dependence.jl, variable_dependence.jl
- Ensures compliance with docstring philosophy from Handbook
- Remove CTFlows.Configs references from trait docstrings and examples
- Change @extref to @ref for internal Exceptions symbols
- Update documentation (getting-started, guide/traits, index)
- Clean up trait examples to remove CTFlows-specific configuration references
- Part of CTFlows→CTBase migration
@ocots
ocots merged commit ef69344 into main Jun 23, 2026
4 checks passed
@ocots
ocots deleted the move/ctflows-to-ctbase-phase-b branch June 23, 2026 14:16
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.

1 participant