Add CTBase.Traits submodule (phase B of CTFlows→CTBase move)#461
Merged
Conversation
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>
2 tasks
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a new
CTBase.Traitssubmodule, the shared trait system for thecontrol-toolbox ecosystem (phase B of the CTFlows → CTBase move).
It owns, natively:
TimeDependence,Autonomous,NonAutonomous— these usedto live in
CTModels.Components; they are now defined here so the wholeecosystem shares a single set of types.
VariableDependence,Fixed,NonFixed.is_autonomous,is_variable, …) with::Anyfallbacks 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.22beta is released:0.22beta.CTBase.Traits(drops its owndefinitions) → release
0.13beta.src/Traits/and consumesCTBase.Traits.Test plan
CTBase.Traitsloads; types/predicates behave as expected.test/suite/traits/+ Aqua).🤖 Generated with Claude Code