Skip to content

Commit

Permalink
Reorganize core persistence crate Python wranglers
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Oct 21, 2023
1 parent 546b64b commit 05a1cc9
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion nautilus_core/persistence/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
pub mod arrow;
pub mod backend;
mod kmerge_batch;
pub mod wranglers;

#[cfg(feature = "python")]
pub mod python;
9 changes: 5 additions & 4 deletions nautilus_core/persistence/src/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use pyo3::prelude::*;

mod backend;
mod wranglers;

/// Loaded as nautilus_pyo3.persistence
#[pymodule]
Expand All @@ -24,9 +25,9 @@ pub fn persistence(_: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_class::<crate::backend::session::DataBackendSession>()?;
m.add_class::<crate::backend::session::DataQueryResult>()?;
m.add_class::<backend::transformer::DataTransformer>()?;
m.add_class::<crate::wranglers::bar::BarDataWrangler>()?;
m.add_class::<crate::wranglers::delta::OrderBookDeltaDataWrangler>()?;
m.add_class::<crate::wranglers::quote::QuoteTickDataWrangler>()?;
m.add_class::<crate::wranglers::trade::TradeTickDataWrangler>()?;
m.add_class::<wranglers::bar::BarDataWrangler>()?;
m.add_class::<wranglers::delta::OrderBookDeltaDataWrangler>()?;
m.add_class::<wranglers::quote::QuoteTickDataWrangler>()?;
m.add_class::<wranglers::trade::TradeTickDataWrangler>()?;
Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub struct OrderBookDeltaDataWrangler {
metadata: HashMap<String, String>,
}

#[cfg(feature = "python")]
#[pymethods]
impl OrderBookDeltaDataWrangler {
#[new]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub struct QuoteTickDataWrangler {
metadata: HashMap<String, String>,
}

#[cfg(feature = "python")]
#[pymethods]
impl QuoteTickDataWrangler {
#[new]
Expand Down

0 comments on commit 05a1cc9

Please sign in to comment.