release: v0.6.1

This commit is contained in:
github-actions[bot]
2026-06-22 17:51:23 +00:00
parent be3d685b36
commit d03683dd48
4 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "manifoldbt"
version = "0.6.0"
version = "0.6.1"
description = "Rust-powered backtesting engine for quantitative research"
requires-python = ">=3.9"
license = { file = "LICENSE" }
+4 -10
View File
@@ -135,14 +135,6 @@ def _require_pro(feature: str) -> None:
raise SystemExit(0)
def _gate_pro(feature: str) -> bool:
"""Check Pro license. Returns True if Pro, False if Community (with warning)."""
if _is_pro():
return True
_warn_pro(feature)
return False
def _classify_error(exc: Exception) -> Exception:
"""Wrap a Rust ValueError/RuntimeError in a more specific exception."""
msg = str(exc)
@@ -814,8 +806,10 @@ def run_walk_forward(
Returns:
Dict with ``folds`` and ``best_params_per_fold``.
"""
if not _gate_pro("Walk-forward optimization"):
return {"folds": [], "best_params_per_fold": []}
# Pro gate (friendly message + clean exit). Real enforcement lives natively
# in `py_run_walk_forward` (check_feature("walk_forward")), so this cannot be
# bypassed by calling the native function directly.
_require_pro("Walk-forward optimization")
config = _prepare_config(config, strategy, store)
wf_json = json.dumps(_convert_param_grid_in_config(wf_config))
return _run_walk_forward_native(strategy.to_json(), wf_json, config.to_json(), store)
+12
View File
@@ -9,6 +9,9 @@ import numpy as np
_EMPTY_TS = np.array([], dtype="datetime64[ns]")
# Pro-gated feature label (see _require_pro). Single source to avoid drift.
_SAFETY_PRO_FEATURE = "Safety checks (lookahead, exposure)"
@dataclass
class LookaheadReport:
@@ -277,6 +280,9 @@ def detect_lookahead(
Returns:
DiagnosticsResult with ``.passed``, ``.assert_clean()``, ``print()``.
"""
from manifoldbt import _require_pro
_require_pro(_SAFETY_PRO_FEATURE)
from manifoldbt.plot._convert import trades_arrays
from manifoldbt._native import (
load_and_align as _load_and_align,
@@ -509,6 +515,9 @@ def risk_check(
print(report)
report.assert_clean()
"""
from manifoldbt import _require_pro
_require_pro(_SAFETY_PRO_FEATURE)
from manifoldbt.plot._convert import positions_arrays
pos = positions_arrays(result)
@@ -796,6 +805,9 @@ def check_exposure_stability(
print(report)
report.assert_clean()
"""
from manifoldbt import _require_pro
_require_pro(_SAFETY_PRO_FEATURE)
from manifoldbt._native import (
load_and_align as _load_and_align,
run_on_aligned as _run_on_aligned,
+3
View File
@@ -217,6 +217,9 @@ def tearsheet(
Returns the HTML string. Opens in browser when ``show=True``,
writes to disk when ``save`` is given.
"""
from manifoldbt import _require_pro
_require_pro("Tearsheets & export")
_ = benchmark # reserved for future benchmark overlay support
strategy_name = title or auto_title(result, "Backtest")
metrics = result.metrics if hasattr(result, "metrics") else {}