pub use rangebar_core as core;
#[cfg(feature = "providers")]
pub use rangebar_providers as providers;
#[cfg(feature = "config")]
pub use rangebar_config as config;
#[cfg(feature = "io")]
pub use rangebar_io as io;
#[cfg(feature = "streaming")]
pub use rangebar_streaming as streaming;
#[cfg(feature = "batch")]
pub use rangebar_batch as batch;
pub mod fixed_point {
pub use rangebar_core::fixed_point::*;
}
pub mod range_bars {
pub use rangebar_core::processor::*;
}
pub mod types {
pub use rangebar_core::types::*;
}
#[cfg(feature = "providers")]
pub mod tier1 {
pub use rangebar_providers::binance::symbols::*;
}
#[cfg(feature = "providers")]
pub mod data {
pub use rangebar_providers::binance::HistoricalDataLoader;
}
#[cfg(feature = "config")]
pub mod infrastructure {
#[cfg(feature = "config")]
pub use rangebar_config as config;
#[cfg(feature = "io")]
pub use rangebar_io as io;
}
#[cfg(feature = "streaming")]
pub mod engines {
#[cfg(feature = "streaming")]
pub use rangebar_streaming as streaming;
#[cfg(feature = "batch")]
pub use rangebar_batch as batch;
}
pub use rangebar_core::{
AggTrade, ExportRangeBarProcessor, FixedPoint, ProcessingError, RangeBar, RangeBarProcessor,
};
#[cfg(feature = "config")]
pub use rangebar_config::Settings;
#[cfg(feature = "providers")]
pub use rangebar_providers::binance::{
TIER1_SYMBOLS, get_tier1_symbols, get_tier1_usdt_pairs, is_tier1_symbol,
};
#[cfg(feature = "streaming")]
pub use rangebar_streaming::processor::{
StreamingError, StreamingMetrics, StreamingProcessor, StreamingProcessorConfig,
};
#[cfg(feature = "batch")]
pub use rangebar_batch::{AnalysisReport, BatchAnalysisEngine, BatchConfig, BatchResult};
#[cfg(feature = "io")]
pub use rangebar_io::{ArrowExporter, ParquetExporter, PolarsExporter, StreamingCsvExporter};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const NAME: &str = env!("CARGO_PKG_NAME");
pub const DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
pub fn init() {
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
#[allow(clippy::const_is_empty)]
fn test_version() {
assert!(!VERSION.is_empty());
assert!(!NAME.is_empty());
assert!(!DESCRIPTION.is_empty());
}
#[test]
fn test_types_export() {
let fp = FixedPoint::from_str("123.456").unwrap();
assert_eq!(fp.to_string(), "123.45600000");
}
#[test]
fn test_legacy_fixed_point_module() {
let fp = fixed_point::FixedPoint::from_str("100.0").unwrap();
assert_eq!(fp.to_string(), "100.00000000");
}
#[test]
fn test_legacy_types_module() {
use types::DataSource;
let _data_source = DataSource::BinanceSpot;
}
#[cfg(feature = "providers")]
#[test]
fn test_tier1_symbols_export() {
let symbols = get_tier1_symbols();
assert!(!symbols.is_empty());
assert!(symbols.contains(&"BTC".to_string()));
}
#[cfg(feature = "config")]
#[test]
fn test_settings_export() {
let settings = Settings::default();
assert!(!settings.app.name.is_empty());
}
#[cfg(feature = "providers")]
#[test]
fn test_data_module_export() {
use data::HistoricalDataLoader;
let _loader = HistoricalDataLoader::new("BTCUSDT");
}
}