Skip to content

0.6.0: rename HalfPeriod to SuppliedPeriod with 4-mode supply doc; deprecate old names (removed in 0.9.0)#12

Merged
mwlang merged 1 commit into
mainfrom
release/0.6.0-supplied-period
Jun 13, 2026
Merged

0.6.0: rename HalfPeriod to SuppliedPeriod with 4-mode supply doc; deprecate old names (removed in 0.9.0)#12
mwlang merged 1 commit into
mainfrom
release/0.6.0-supplied-period

Conversation

@mwlang

@mwlang mwlang commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • 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.
  • :supplied_period symbol registered as the new default Settings::Indicators#dominant_cycle_kind.
  • HalfPeriod / HalfPeriodPoint constants + :half_period registry symbol kept as deprecated aliases (Module#deprecate_constant on constants; one-time warn on symbol). All scheduled for removal in 0.9.0.
  • 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.

Test plan

  • Spec suite green: 1414/0/2-pending; 99.16% line coverage
  • New spec/lib/quant/indicators/dominant_cycles/supplied_period_spec.rb covers all 4 documented supply modes + deprecation aliases + warning emission
  • Existing HalfPeriod consumers in spec suite migrated to new names; backward-compat aliases verified

Context

This rename came from a design discussion where the operator observed that HalfPeriod and a proposed RollingExtremaPeriod (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

… 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

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.15%. Comparing base (a519301) to head (a814178).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwlang
mwlang merged commit cf893ff into main Jun 13, 2026
5 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.

1 participant