0.6.0: rename HalfPeriod to SuppliedPeriod with 4-mode supply doc; deprecate old names (removed in 0.9.0)#12
Merged
Conversation
… modes; HalfPeriod deprecated, removed in 0.9.0)
New `Quant::Indicators::DominantCycles::SuppliedPeriod` generalizes
the prior `HalfPeriod` slot. The class doc names four canonical
supply modes (fixed / manual / configured / external) that consumers
compose freely. The `compute` method stays no-op; whoever sets
`point.period` controls the period that downstream indicators
reading `adaptive_period` see. The substrate-driven external mode is
the load-bearing pattern for tick-derived adaptive lookbacks where
another process writes the period to a runtime store and the
integration site reads + populates the point.
`:supplied_period` symbol registered as the new default
`Settings::Indicators#dominant_cycle_kind`.
Deprecations (removed in 0.9.0):
- HalfPeriod constant -> SuppliedPeriod (Module#deprecate_constant
emits Ruby deprecation warning at access)
- HalfPeriodPoint constant -> SuppliedPeriodPoint (same treatment)
- :half_period dominant_cycle_kind symbol -> :supplied_period
(Settings::Indicators#dominant_cycle_indicator_class resolves to
SuppliedPeriod and emits one-time-per-instance warn)
The unrelated Settings::Indicators#half_period method (returns
(max+min)/2) and the point default symbol :half_period (which
references that method, not the deprecated class) are NOT deprecated.
Spec suite 1414/0/2-pending; 99.16% line coverage.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
=======================================
Coverage 99.15% 99.15%
=======================================
Files 75 75
Lines 2243 2253 +10
=======================================
+ Hits 2224 2234 +10
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Quant::Indicators::DominantCycles::SuppliedPeriodgeneralizes the priorHalfPeriodslot. The class doc names four canonical supply modes (fixed / manual / configured / external) that consumers compose freely.:supplied_periodsymbol registered as the new defaultSettings::Indicators#dominant_cycle_kind.HalfPeriod/HalfPeriodPointconstants +:half_periodregistry symbol kept as deprecated aliases (Module#deprecate_constant on constants; one-time warn on symbol). All scheduled for removal in 0.9.0.Settings::Indicators#half_periodmethod (returns(max+min)/2) and the point default symbol:half_period(which references that method, not the deprecated class) are NOT deprecated.Test plan
spec/lib/quant/indicators/dominant_cycles/supplied_period_spec.rbcovers all 4 documented supply modes + deprecation aliases + warning emissionHalfPeriodconsumers in spec suite migrated to new names; backward-compat aliases verifiedContext
This rename came from a design discussion where the operator observed that
HalfPeriodand a proposedRollingExtremaPeriod(originally part of virtuoso T3d) are functionally identical no-op DC-slot shells; the underlying capability is "supply a period from somewhere other than the indicator's own compute()." Naming was descriptive of one resolved value rather than the capability.SuppliedPeriod+ the 4-mode class doc gives downstream developers all the context to use the slot for fixed / manual / configured / external sources — all from one well-documented class.Tag v0.6.0 already pushed to this branch's tip.
🤖 Generated with Claude Code