//! Feature Engineering for Foxhunt ML models
//!
//! Core feature extractors: technical indicators, price patterns, volume analysis,
//! microstructure proxies, OFI (Order Flow Imbalance), normalization, and more.

#![allow(clippy::module_name_repetitions)]
#![allow(clippy::integer_division)]
#![deny(
    clippy::unwrap_used,
    clippy::expect_used,
    clippy::panic
)]
#![allow(clippy::shadow_reuse, clippy::shadow_same, clippy::shadow_unrelated)] // Tensor ops: let x = x.relu() is idiomatic
#![allow(clippy::non_ascii_literal)] // Math symbols in ML documentation and error messages
#![allow(clippy::partial_pub_fields)] // ML config structs: some fields are pub API, some internal
#![allow(clippy::same_name_method)] // Intentional: inherent methods shadow trait defaults for ML-specific behavior
#![allow(clippy::indexing_slicing)] // Tensor/matrix indexing with bounds guaranteed by construction
#![allow(clippy::similar_names)] // ML naming: min_val/max_val, state/states are conventional

// Re-export core types at crate root for internal use
pub use ml_core::MLError;
pub use ml_core::types::OHLCVBar;

// Public modules (21 total)
pub mod adx_features;
pub mod alternative_bars;
pub mod bar_resampler;
pub mod barrier_optimization;
pub mod config;
pub mod ewma;
pub mod feature_extraction;
pub mod mbp10_loader;
pub mod microstructure;
pub mod microstructure_features;
pub mod normalization;
pub mod ofi_calculator;
pub mod pipeline;
pub mod position_features;
pub mod price_features;
pub mod regime_adx;
pub mod statistical_features;
pub mod time_features;
pub mod trades_loader;
pub mod types;
pub mod volume_features;

// Re-exports
pub use config::{FeatureConfig, FeatureGroup, FeatureIndices, FeaturePhase};
pub use alternative_bars::{
    DollarBarSampler, ImbalanceBarSampler, RunBarSampler, TickBarSampler, VolumeBarSampler,
};
pub use barrier_optimization::{BarrierOptimizer, BarrierParams, OptimizationResult};
pub use ewma::{AdaptiveThreshold, EWMACalculator};
pub use price_features::PriceFeatureExtractor;
pub use volume_features::VolumeFeatureExtractor;
pub use adx_features::AdxFeatureExtractor;
pub use regime_adx::RegimeADXFeatures;
pub use microstructure_features::{
    BuySellImbalance, HighLowSpread, InterArrivalTime, KyleLambda, MicrostructureFeature,
    PriceImpact, TickCount, VarianceRatio, VolumeWeightedSpread,
};
pub use time_features::TimeFeatureExtractor;
pub use statistical_features::StatisticalFeatureExtractor;
pub use normalization::{FeatureNormalizer, NormalizationStats, RingBuffer};
pub use pipeline::{FeatureExtractionPipeline, PipelinePerformance};
pub use position_features::PositionFeatures;
pub use ofi_calculator::{OFICalculator, OFIFeatures};
pub use mbp10_loader::{get_recent_snapshots, get_snapshots_for_timestamp, load_mbp10_snapshots_sync};
pub use trades_loader::{get_trades_for_bar, load_trades_sync, DbnTrade};
pub use bar_resampler::BarResampler;
