Start adding row-level splitting, refactor cli and graph into subcrates
This commit is contained in:
@@ -10,13 +10,15 @@ use std::io::Write;
|
||||
use clap::{command, Parser};
|
||||
|
||||
pub use commands::Commands;
|
||||
use coster_rs::{
|
||||
|
||||
use log::info;
|
||||
use schemars::schema_for;
|
||||
|
||||
use crate::{
|
||||
create_products::InputFile,
|
||||
graph::{Graph, RunnableGraph},
|
||||
SourceType,
|
||||
};
|
||||
use log::info;
|
||||
use schemars::schema_for;
|
||||
|
||||
mod commands;
|
||||
|
||||
@@ -41,7 +43,7 @@ impl Cli {
|
||||
output,
|
||||
use_numeric_accounts,
|
||||
flush_pass,
|
||||
} => coster_rs::move_money(
|
||||
} => crate::move_money(
|
||||
&mut csv::Reader::from_path(rules)?,
|
||||
&mut csv::Reader::from_path(lines)?,
|
||||
&mut csv::Reader::from_path(accounts)?,
|
||||
@@ -66,7 +68,7 @@ impl Cli {
|
||||
} => {
|
||||
if msgpack_serialisation {
|
||||
let mut file = BufWriter::new(File::create(output)?);
|
||||
coster_rs::reciprocal_allocation(
|
||||
crate::reciprocal_allocation(
|
||||
&mut csv::Reader::from_path(lines)?,
|
||||
&mut csv::Reader::from_path(accounts)?,
|
||||
&mut csv::Reader::from_path(allocation_statistics)?,
|
||||
@@ -81,7 +83,7 @@ impl Cli {
|
||||
zero_threshold,
|
||||
)
|
||||
} else {
|
||||
coster_rs::reciprocal_allocation(
|
||||
crate::reciprocal_allocation(
|
||||
&mut csv::Reader::from_path(lines)?,
|
||||
&mut csv::Reader::from_path(accounts)?,
|
||||
&mut csv::Reader::from_path(allocation_statistics)?,
|
||||
@@ -165,7 +167,7 @@ impl Cli {
|
||||
date_order_column: None,
|
||||
},
|
||||
);
|
||||
coster_rs::create_products::create_products_polars(definitions, vec![], output)
|
||||
crate::create_products::create_products_polars(definitions, vec![], output)
|
||||
}
|
||||
Commands::RunGraph { graph, threads } => {
|
||||
let file = File::open(graph)?;
|
||||
|
||||
Reference in New Issue
Block a user