release: cut v1.0.0
Prepare the first public 1.0.0 release and finish the remaining CI hardening work. Highlights: - align Python, Rust, WASM, Conda, API, MCP, and docs version metadata to 1.0.0 - promote package metadata to Production/Stable and update stability/versioning docs for the stable series - move the accumulated Unreleased notes into a dated 1.0.0 changelog section and keep a fresh top-level Unreleased block - strengthen the changelog checker so it validates a single top-level Unreleased section - fix the CI/package support mismatch by declaring Python >=3.10 consistently and gating pandas-ta extras to Python 3.12+ - restore Sphinx autodoc compatibility for documented ferro_ta.<module> imports by registering module aliases - make the TA-Lib benchmark guardrail less flaky by checking median and tail-percentile speedups instead of failing on a single mild outlier - switch PyPI publishing to OIDC-only trusted publishing and wire the changelog check into the required CI gate - apply the Ruff-driven cleanup across the Python and test tree and refresh uv/cargo lockfiles Validated locally: - python3 scripts/check_changelog.py - uv run --with ruff ruff check python tests - uv run --with ruff ruff format --check python tests - uv lock --check - sphinx-build -b html docs docs/_build -W --keep-going - build/install the ferro_ta 1.0.0 wheel successfully
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Unit tests for ferro_ta.indicators.volume"""
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
|
||||
from ferro_ta.indicators.volume import AD, ADOSC, OBV
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -24,6 +25,7 @@ SMALL_V = np.array([1000.0, 2000.0, 3000.0, 4000.0, 5000.0])
|
||||
# OBV
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestOBV:
|
||||
def test_known_values_rising(self):
|
||||
# Rising close: OBV accumulates all volume
|
||||
@@ -64,6 +66,7 @@ class TestOBV:
|
||||
# AD
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestAD:
|
||||
def test_known_formula(self):
|
||||
# AD = cumsum(CLV * volume)
|
||||
@@ -72,7 +75,7 @@ class TestAD:
|
||||
l = np.array([10.0])
|
||||
c = np.array([12.0])
|
||||
v = np.array([1000.0])
|
||||
clv = ((12 - 10) - (15 - 12)) / (15 - 10) # (2 - 3) / 5 = -0.2
|
||||
clv = ((12 - 10) - (15 - 12)) / (15 - 10) # (2 - 3) / 5 = -0.2
|
||||
expected = clv * 1000.0
|
||||
result = AD(h, l, c, v)
|
||||
np.testing.assert_allclose(result[0], expected, rtol=1e-10)
|
||||
@@ -94,6 +97,7 @@ class TestAD:
|
||||
# ADOSC
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestADOSC:
|
||||
def test_nan_warmup(self):
|
||||
result = ADOSC(_HIGH, _LOW, _CLOSE, _VOL, fastperiod=3, slowperiod=10)
|
||||
|
||||
Reference in New Issue
Block a user