From a5dd9cb7fdf64e62fc4b66b5fe75e152f4c16cea Mon Sep 17 00:00:00 2001 From: 35V LG84 <35vlg84-x4e6b92@e257.fi> Date: Sat, 16 Nov 2024 23:29:35 +0200 Subject: [PATCH 1/4] releng-next: Fix sharp edges and shenanigans Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi> --- tackler-cli/src/cli_args.rs | 28 +++++--- tackler-cli/src/main.rs | 10 +-- tackler-core/src/config/items.rs | 5 +- tackler-core/src/config/raw_items.rs | 27 ++++---- tackler-core/src/export/equity_exporter.rs | 2 +- tackler-core/src/kernel/accumulator.rs | 2 +- tackler-core/src/kernel/balance.rs | 71 +++++++++++++-------- tackler-core/src/kernel/settings.rs | 2 +- tackler-core/src/report/balance_reporter.rs | 2 +- 9 files changed, 92 insertions(+), 57 deletions(-) diff --git a/tackler-cli/src/cli_args.rs b/tackler-cli/src/cli_args.rs index 62de188..77b4e7c 100644 --- a/tackler-cli/src/cli_args.rs +++ b/tackler-cli/src/cli_args.rs @@ -86,20 +86,15 @@ pub(crate) struct Cli { /// This is path to '.git' directory. /// Either it is path to '.git' on bare repository, or path to '.git' on working copy #[arg( - long = "input.git.repo", - value_name = "git repo path", + long = "input.git.repository", + value_name = "git repository path", requires("input_git_ref"), requires("input_git_dir") )] pub(crate) input_git_repo: Option, /// Git reference name - #[arg( - long = "input.git.ref", - value_name = "git ref", - requires("input_git_repo"), - requires("input_git_dir") - )] + #[arg(long = "input.git.ref", value_name = "git ref")] pub(crate) input_git_ref: Option, /// Path prefix inside git repository @@ -131,7 +126,7 @@ pub(crate) struct Cli { pub(crate) reports: Option>, /// Group-by -selector for 'balance-group' report - #[arg(long = "group-by", value_name = "group-by", num_args(1), default_value = "year", + #[arg(long = "group-by", value_name = "group-by", num_args(1), value_parser([ PossibleValue::new(txn_ts::GroupBy::YEAR), PossibleValue::new(txn_ts::GroupBy::MONTH), @@ -184,6 +179,21 @@ impl Cli { ext: String::from("txn"), }; Ok(InputSettings::Git(i)) + } else if self.input_git_ref.is_some() && self.input_git_repo.is_none() { + let input_git_ref = self.input_git_ref.clone().unwrap(/*:ok: clap */); + match settings.get_input_settings( + Some(&config::StorageType::STORAGE_GIT.to_string()), + Some(self.conf_path.as_path()), + )? { + InputSettings::Git(git) => Ok(InputSettings::Git(GitInput { + git_ref: GitInputSelector::Reference(input_git_ref), + ..git + })), + _ => { + let msg = "CLI Arg handling: Internal logic error"; + Err(msg.into()) + } + } } else { settings.get_input_settings(self.input_storage.as_ref(), Some(self.conf_path.as_path())) } diff --git a/tackler-cli/src/main.rs b/tackler-cli/src/main.rs index 9d6d1fb..9dd5732 100644 --- a/tackler-cli/src/main.rs +++ b/tackler-cli/src/main.rs @@ -112,12 +112,12 @@ fn run() -> Result> { bal_reporter.write_txt_report(&mut settings, &mut w, &txn_set)?; } ReportType::BalanceGroup => { - let group_by = cli.group_by.clone().unwrap(/*:ok: clap*/); + let group_by = match &cli.group_by { + Some(gb) => txn_ts::GroupBy::from(gb)?, + None => settings.report.balance_group.group_by, + }; let bal_group_reporter = BalanceGroupReporter { - report_settings: BalanceGroupSettings::from( - &settings, - Some(txn_ts::GroupBy::from(group_by.as_str())?), - )?, + report_settings: BalanceGroupSettings::from(&settings, Some(group_by))?, }; bal_group_reporter.write_txt_report(&mut settings, &mut w, &txn_set)?; } diff --git a/tackler-core/src/config/items.rs b/tackler-core/src/config/items.rs index fe29837..c5ef6a2 100644 --- a/tackler-core/src/config/items.rs +++ b/tackler-core/src/config/items.rs @@ -496,7 +496,10 @@ impl Register { fn from(reg_raw: &RegisterRaw, report: &ReportRaw) -> Result> { Ok(Register { title: reg_raw.title.clone(), - timestamp_style: TimestampStyle::from(reg_raw.timestamp_style.as_str())?, + timestamp_style: match ®_raw.timestamp_style { + Some(style) => TimestampStyle::from(style.as_str())?, + None => TimestampStyle::Date, + }, acc_sel: get_account_selector(®_raw.acc_sel, report), }) } diff --git a/tackler-core/src/config/raw_items.rs b/tackler-core/src/config/raw_items.rs index a8813a8..cf9ce50 100644 --- a/tackler-core/src/config/raw_items.rs +++ b/tackler-core/src/config/raw_items.rs @@ -56,26 +56,27 @@ pub(super) struct AuditRaw { } #[derive(Debug, Clone, Deserialize)] -pub struct InputRaw { - pub storage: String, - pub fs: Option, - pub git: Option, +pub(super) struct InputRaw { + pub(super) storage: String, + pub(super) fs: Option, + pub(super) git: Option, } #[derive(Debug, Clone, Deserialize)] -pub struct FsRaw { - pub dir: String, - pub suffix: String, +pub(super) struct FsRaw { + pub(super) dir: String, + pub(super) suffix: String, } #[allow(dead_code)] #[derive(Debug, Clone, Deserialize)] -pub struct GitRaw { - pub repo: String, +pub(super) struct GitRaw { + #[serde(rename = "repository")] + pub(super) repo: String, #[serde(rename = "ref")] - pub git_ref: String, - pub dir: String, - pub suffix: String, + pub(super) git_ref: String, + pub(super) dir: String, + pub(super) suffix: String, } #[derive(Debug, Clone, Deserialize)] @@ -160,7 +161,7 @@ pub(super) struct BalanceGroupRaw { pub(super) struct RegisterRaw { pub(super) title: String, #[serde(rename = "timestamp-style")] - pub(super) timestamp_style: String, + pub(super) timestamp_style: Option, #[serde(rename = "accounts")] pub(super) acc_sel: Option, } diff --git a/tackler-core/src/export/equity_exporter.rs b/tackler-core/src/export/equity_exporter.rs index 0bb90de..dfbf4f1 100644 --- a/tackler-core/src/export/equity_exporter.rs +++ b/tackler-core/src/export/equity_exporter.rs @@ -75,7 +75,7 @@ impl Export for EquityExporter { ) -> Result<(), Box> { let bal_acc_sel = self.get_acc_selector()?; - let bal = Balance::from(&String::default(), txn_data, bal_acc_sel.as_ref(), cfg); + let bal = Balance::from(&String::default(), txn_data, bal_acc_sel.as_ref(), cfg)?; if bal.is_empty() { // todo: check if this is actually possible? diff --git a/tackler-core/src/kernel/accumulator.rs b/tackler-core/src/kernel/accumulator.rs index a1b329c..f54c260 100644 --- a/tackler-core/src/kernel/accumulator.rs +++ b/tackler-core/src/kernel/accumulator.rs @@ -60,7 +60,7 @@ where let metadata = None; let txn_set = TxnSet { metadata, txns }; - Balance::from(&group_by_key, &txn_set, ras, settings) + Balance::from(&group_by_key, &txn_set, ras, settings).unwrap() // todo: fix }) .filter(|bal| !bal.is_empty()) .sorted_by_key(|bal| bal.title.clone()) // todo: could this clone be avoided? diff --git a/tackler-core/src/kernel/balance.rs b/tackler-core/src/kernel/balance.rs index 63f454e..eb17178 100644 --- a/tackler-core/src/kernel/balance.rs +++ b/tackler-core/src/kernel/balance.rs @@ -22,6 +22,7 @@ use crate::model::{BalanceTreeNode, Commodity, TxnAccount, TxnRefs, TxnSet}; use itertools::Itertools; use rust_decimal::Decimal; use std::collections::{HashMap, HashSet}; +use std::error::Error; pub type Deltas = HashMap, Decimal>; pub type BTNs = Vec; @@ -98,13 +99,13 @@ impl Balance { my_acctn_sum: &(TxnAccount, Decimal), acc_sums: &[(TxnAccount, Decimal)], settings: &mut Settings, - ) -> Vec<(TxnAccount, Decimal)> { + ) -> Result, Box> { let my_acctn = &my_acctn_sum.0; if my_acctn.atn.depth == 1 { // we are on top, so either this node (my_acctn) exist already // or it has been created by its child; // End of recursion - vec![my_acctn_sum.clone()] + Ok(vec![my_acctn_sum.clone()]) } else { // Not on top => find parent for this node let parent = acc_sums @@ -116,28 +117,30 @@ impl Balance { if parent.is_empty() { if my_acctn.atn.depth > 2 { - let new_parent_atn = settings.get_txn_account(my_acctn.atn.parent.as_str(), my_acctn.comm.clone()).unwrap(/*:ok: existing account*/); + let new_parent_atn = settings + .get_txn_account(my_acctn.atn.parent.as_str(), my_acctn.comm.clone())?; let mut sub_tree = vec![my_acctn_sum.clone()]; let mut x = Balance::bubble_up_acctn( &(new_parent_atn, Decimal::ZERO), acc_sums, settings, - ); + )?; x.append(&mut sub_tree); - x + Ok(x) } else { // todo: the perfect tree of CoA // This is on depth 2 and it doesn't have parent, => let's create root account // End of Recursion - let new_parent_atn = settings.get_txn_account(my_acctn.atn.parent.as_str(), my_acctn.comm.clone()).unwrap(/*:ok: existing account*/); - vec![(new_parent_atn, Decimal::ZERO), my_acctn_sum.clone()] + let new_parent_atn = settings + .get_txn_account(my_acctn.atn.parent.as_str(), my_acctn.comm.clone())?; + Ok(vec![(new_parent_atn, Decimal::ZERO), my_acctn_sum.clone()]) } } else { // Parent of this exists, just bubble them up together let mut sub_tree = vec![my_acctn_sum.clone()]; - let mut x = Balance::bubble_up_acctn(parent[0], acc_sums, settings); + let mut x = Balance::bubble_up_acctn(parent[0], acc_sums, settings)?; x.append(&mut sub_tree); - x + Ok(x) } } } @@ -149,7 +152,10 @@ impl Balance { /// /// * `txns` sequence of transactions /// * `returns` unfiltered sequence of BalanceTreeNodes - fn balance(txns: &TxnRefs, settings: &mut Settings) -> Vec { + fn balance( + txns: &TxnRefs, + settings: &mut Settings, + ) -> Result, Box> { // Calculate sum of postings for each account. // // Input size: is "big", ~ all transactions @@ -180,25 +186,35 @@ impl Balance { // so the same fork in trunk will be "missing" multiple times. // // - // Input size: is "small", ~ size of CoA - // Output size: is "small", ~ size of CoA - let complete_coa_sum_tree = &account_sums + // Input size: "small", e.g. ~ size of CoA + // Output size: "small", e.g. ~ size of CoA + let complete_coa_sum_tree: &Vec<(TxnAccount, Decimal)> = &account_sums + .iter() + .try_fold( + Vec::new(), + |mut trees: Vec>, acc| { + let bua = Balance::bubble_up_acctn(acc, &account_sums, settings)?; + trees.push(bua); + Ok::>, Box>(trees) + }, + )? .iter() - .flat_map(|acc| Balance::bubble_up_acctn(acc, &account_sums, settings)) + .flatten() + .cloned() .collect::>() // make it distinct .into_iter() .collect::>(); // Get all root accounts - // Input size: is "small", ~ size of CoA - // Output size: is "small", ~ size of CoA + // Input size: "small", e.g. ~ size of CoA + // Output size: "small", e.g. ~ size of CoA let roots = complete_coa_sum_tree .iter() .filter(|(acctn, _)| acctn.atn.depth == 1); // Start from all roots and get all subtree BalanceTreeNodes - // Input size: is "small", ~ size of CoA - // Output size: is "small", ~ size of CoA + // Input size: "small", e.g. ~ size of CoA + // Output size: "small", e.g. ~ size of CoA let mut bal = roots .flat_map(|root_acc_sum| { Balance::get_balance_tree_nodes(root_acc_sum, complete_coa_sum_tree) @@ -206,23 +222,28 @@ impl Balance { .collect::>(); bal.sort_by(ord_by_btn); - bal + Ok(bal) } - pub fn from(title: &str, txn_set: &TxnSet, accounts: &T, settings: &mut Settings) -> Balance + pub fn from( + title: &str, + txn_set: &TxnSet, + accounts: &T, + settings: &mut Settings, + ) -> Result> where T: BalanceSelector + ?Sized, { - let bal = Balance::balance(&txn_set.txns, settings); + let bal = Balance::balance(&txn_set.txns, settings)?; let filt_bal: Vec<_> = bal.iter().filter(|b| accounts.eval(b)).cloned().collect(); if filt_bal.is_empty() { - Balance { + Ok(Balance { title: title.to_string(), bal: Default::default(), deltas: Default::default(), - } + }) } else { let deltas = filt_bal .iter() @@ -238,11 +259,11 @@ impl Balance { }) .collect(); - Balance { + Ok(Balance { title: title.to_string(), bal: filt_bal, deltas, - } + }) } } } diff --git a/tackler-core/src/kernel/settings.rs b/tackler-core/src/kernel/settings.rs index 5159a5d..cfabbf4 100644 --- a/tackler-core/src/kernel/settings.rs +++ b/tackler-core/src/kernel/settings.rs @@ -334,7 +334,7 @@ impl Settings { }; Ok(InputSettings::Git(i)) } - None => Err("Storage type 'git' is not configure".into()), + None => Err("Storage type 'git' is not configured".into()), }, } } diff --git a/tackler-core/src/report/balance_reporter.rs b/tackler-core/src/report/balance_reporter.rs index d009ed8..e0ae19e 100644 --- a/tackler-core/src/report/balance_reporter.rs +++ b/tackler-core/src/report/balance_reporter.rs @@ -225,7 +225,7 @@ impl Report for BalanceReporter { txn_data, bal_acc_sel.as_ref(), cfg, - ); + )?; BalanceReporter::txt_report(writer, &bal_report, &self.report_settings)?; writeln!(writer, "{}", "#".repeat(82))?; From 55af007d29eaa9488dfa98cf72d7d94610247b72 Mon Sep 17 00:00:00 2001 From: 35V LG84 <35vlg84-x4e6b92@e257.fi> Date: Sat, 16 Nov 2024 23:33:15 +0200 Subject: [PATCH 2/4] releng-next: Update docs, add examples Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi> --- CREDITS.adoc | 2 + README.adoc | 38 +- examples/audit.toml | 34 ++ examples/audit/accounts.toml | 396 ++++++++++++++++++ examples/audit/commodities.toml | 8 + {conf => examples/devel}/test-accs.toml | 0 {conf => examples/devel}/test-comms.toml | 0 {conf => examples/devel}/test-tags.toml | 0 {conf => examples/devel}/test.toml | 0 examples/simple.toml | 34 ++ examples/simple/journal.txn | 19 + {conf => examples}/tackler.toml | 16 +- {conf => examples/tackler/conf}/accounts.toml | 0 .../tackler/conf}/commodities.toml | 0 {conf => examples/tackler/conf}/tags.toml | 0 tackler-cli/CRATES.md | 248 +++++------ 16 files changed, 627 insertions(+), 168 deletions(-) create mode 100644 examples/audit.toml create mode 100644 examples/audit/accounts.toml create mode 100644 examples/audit/commodities.toml rename {conf => examples/devel}/test-accs.toml (100%) rename {conf => examples/devel}/test-comms.toml (100%) rename {conf => examples/devel}/test-tags.toml (100%) rename {conf => examples/devel}/test.toml (100%) create mode 100644 examples/simple.toml create mode 100644 examples/simple/journal.txn rename {conf => examples}/tackler.toml (95%) rename {conf => examples/tackler/conf}/accounts.toml (100%) rename {conf => examples/tackler/conf}/commodities.toml (100%) rename {conf => examples/tackler/conf}/tags.toml (100%) diff --git a/CREDITS.adoc b/CREDITS.adoc index a7bcf4a..f6c115d 100644 --- a/CREDITS.adoc +++ b/CREDITS.adoc @@ -24,8 +24,10 @@ Components (used direclty by Tackler-NG): * https://github.com/serde-rs/json[serde_json] * https://github.com/tailhook/serde-regex[serde_regex] * https://github.com/RustCrypto/hashes[sha2] +* https://github.com/RustCrypto/hashes[sha3] * https://github.com/time-rs/time[time] * https://github.com/Yuri6037/time-tz[time-tz] +* https://github.com/toml-rs/toml/tree/main/crates/toml[toml] * https://github.com/uuid-rs/uuid[uuid] * https://github.com/BurntSushi/walkdir[walkdir] diff --git a/README.adoc b/README.adoc index d546da1..76f144e 100644 --- a/README.adoc +++ b/README.adoc @@ -21,11 +21,16 @@ Why not? -- Because it uses simplified Ledger syntax. == Project Status -The project is in Technology Preview Release phase of the rusty Tackler. +The rusty Tackler-NG is in feature parity with old scala based Tackler CLI. + +Especially the link:https://tackler.e257.fi/docs/journal/format/[Tackler Journal Format] is fully +supported, and also all transaction storage backends are supported. + + * link:https://tackler.e257.fi/docs/usage/#storage-selector[Filesystem] + * link:https://tackler.e257.fi/docs/journal/git-storage/[Git Storage] + +See `tackler --help` and link:examples/tackler.toml[Tackler Configuration] how to use these. -The link:https://tackler.e257.fi/docs/journal/format/[Tackler Journal Format] is fully -supported, as are all transaction backends (link:https://tackler.e257.fi/docs/usage/#storage-selector[Filesystem] -and link:https://tackler.e257.fi/docs/journal/git-storage/[Git Storage]). See `tackler --help` how to use these. All reports and exports are supported: @@ -46,8 +51,8 @@ Other supported notable features are: [IMPORTANT] ==== -**AS THIS IS TECHNOLOGY PREVIEW RELEASE, THERE ARE MISSING FEATURES -AND KNOWN INCONSISTENCIES WITH EXISTING TACKLER IMPLEMENTATION.** +**AS THIS IS TECHNOLOGY PREVIEW RELEASE, THERE COULD BE MISSING FEATURES +AND INCONSISTENCIES WITH EXISTING TACKLER IMPLEMENTATION.** ==== @@ -80,33 +85,25 @@ git tag -l git checkout v24.11.0 # Build tackler -cargo build --release --bin tackler +cargo build --release --locked --bin tackler ---- -The final binary will be located at `target/release/tackler`. +The tackler binary will be located at `target/release/tackler`. You can try it following way: -Optionall, you can also install tackler: ---- -cargo install --path tackler-cli --bin tackler +target/release/tackler --config examples/simple.toml + ---- -You can check that the version of source code and the version of binary match: +You can check the source code and version info of tackler by running: ---- -# Show commit id of source code -git show --oneline --no-patch - -# Print build info target/release/tackler --version - -# Or if you installed tackler -tackler --version ---- -See `tackler --help`, link:docs/examples.adoc[examples] and tackler-cli crate's link:tackler-cli/CRATES.md[README] -how to use the rusty version of tackler. +See `tackler --help`, link:examples/tackler.toml[full Tackler configuration file], example link:docs/examples.adoc[commands] and link:tackler-cli/CRATES.md[Tackler CLI documentation]how to use the rusty version of tackler. link:docs/devel/readme.adoc[Developer's Guides] have technical information about Tackler-NG. @@ -140,4 +137,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .... - diff --git a/examples/audit.toml b/examples/audit.toml new file mode 100644 index 0000000..f82f4b8 --- /dev/null +++ b/examples/audit.toml @@ -0,0 +1,34 @@ +### Configuration settings for Tackler-NG +### +### See tackler.toml file full configuration options +### and documentation. +### +### The format of this file is TOML (https://toml.io/en/) +[kernel] +strict = true +audit = { mode = true, hash = "SHA-256" } +timestamp = { default-time = 00:00:00, timezone = { name = "UTC" } } + +input = { storage = "git", git = { repository = "../suite/audit/audit-repo.git", dir = "txns", ref = "txns-1E1", suffix = "txn" } } + +[transaction] +accounts = { path = "audit/accounts.toml" } +commodities = { path = "audit/commodities.toml" } +tags = { path = "none" } + + +### Report Configuration +[report] +report-timezone = "UTC" +scale = { min = 2, max = 4 } +accounts = [ "^a:.*" ] +targets = [ "balance" ] + +balance = { title = "Balance Report" } +balance-group = { title = "Balance Group Report", group-by = "month" } +register = { title = "Register Report", accounts = [ "^Expenses:", "^Income:" ]} + + +### Export Configuration +[export] +equity = { accounts = [ "^Assets:", ], equity-account = "Equity:Balance" } diff --git a/examples/audit/accounts.toml b/examples/audit/accounts.toml new file mode 100644 index 0000000..943df8a --- /dev/null +++ b/examples/audit/accounts.toml @@ -0,0 +1,396 @@ +accounts = [ + "a", + "a:ay2016", + "a:ay2016:am01", + "a:ay2016:am02", + "a:ay2016:am03", + "a:ay2016:am04", + "a:ay2016:am05", + "a:ay2016:am06", + "a:ay2016:am07", + "a:ay2016:am08", + "a:ay2016:am09", + "a:ay2016:am10", + "a:ay2016:am11", + "a:ay2016:am12", + "e", + "e:ey2016", + "e:ey2016:em01", + "e:ey2016:em02", + "e:ey2016:em03", + "e:ey2016:em04", + "e:ey2016:em05", + "e:ey2016:em06", + "e:ey2016:em07", + "e:ey2016:em08", + "e:ey2016:em09", + "e:ey2016:em10", + "e:ey2016:em11", + "e:ey2016:em12", + "e:ey2016:em01:ed01", + "e:ey2016:em01:ed02", + "e:ey2016:em01:ed03", + "e:ey2016:em01:ed04", + "e:ey2016:em01:ed05", + "e:ey2016:em01:ed06", + "e:ey2016:em01:ed07", + "e:ey2016:em01:ed08", + "e:ey2016:em01:ed09", + "e:ey2016:em01:ed10", + "e:ey2016:em01:ed11", + "e:ey2016:em01:ed12", + "e:ey2016:em01:ed13", + "e:ey2016:em01:ed14", + "e:ey2016:em01:ed15", + "e:ey2016:em01:ed16", + "e:ey2016:em01:ed17", + "e:ey2016:em01:ed18", + "e:ey2016:em01:ed19", + "e:ey2016:em01:ed20", + "e:ey2016:em01:ed21", + "e:ey2016:em01:ed22", + "e:ey2016:em01:ed23", + "e:ey2016:em01:ed24", + "e:ey2016:em01:ed25", + "e:ey2016:em01:ed26", + "e:ey2016:em01:ed27", + "e:ey2016:em01:ed28", + "e:ey2016:em01:ed29", + "e:ey2016:em01:ed30", + "e:ey2016:em01:ed31", + "e:ey2016:em02:ed01", + "e:ey2016:em02:ed02", + "e:ey2016:em02:ed03", + "e:ey2016:em02:ed04", + "e:ey2016:em02:ed05", + "e:ey2016:em02:ed06", + "e:ey2016:em02:ed07", + "e:ey2016:em02:ed08", + "e:ey2016:em02:ed09", + "e:ey2016:em02:ed10", + "e:ey2016:em02:ed11", + "e:ey2016:em02:ed12", + "e:ey2016:em02:ed13", + "e:ey2016:em02:ed14", + "e:ey2016:em02:ed15", + "e:ey2016:em02:ed16", + "e:ey2016:em02:ed17", + "e:ey2016:em02:ed18", + "e:ey2016:em02:ed19", + "e:ey2016:em02:ed20", + "e:ey2016:em02:ed21", + "e:ey2016:em02:ed22", + "e:ey2016:em02:ed23", + "e:ey2016:em02:ed24", + "e:ey2016:em02:ed25", + "e:ey2016:em02:ed26", + "e:ey2016:em02:ed27", + "e:ey2016:em02:ed28", + "e:ey2016:em02:ed29", + "e:ey2016:em03:ed01", + "e:ey2016:em03:ed02", + "e:ey2016:em03:ed03", + "e:ey2016:em03:ed04", + "e:ey2016:em03:ed05", + "e:ey2016:em03:ed06", + "e:ey2016:em03:ed07", + "e:ey2016:em03:ed08", + "e:ey2016:em03:ed09", + "e:ey2016:em03:ed10", + "e:ey2016:em03:ed11", + "e:ey2016:em03:ed12", + "e:ey2016:em03:ed13", + "e:ey2016:em03:ed14", + "e:ey2016:em03:ed15", + "e:ey2016:em03:ed16", + "e:ey2016:em03:ed17", + "e:ey2016:em03:ed18", + "e:ey2016:em03:ed19", + "e:ey2016:em03:ed20", + "e:ey2016:em03:ed21", + "e:ey2016:em03:ed22", + "e:ey2016:em03:ed23", + "e:ey2016:em03:ed24", + "e:ey2016:em03:ed25", + "e:ey2016:em03:ed26", + "e:ey2016:em03:ed27", + "e:ey2016:em03:ed28", + "e:ey2016:em03:ed29", + "e:ey2016:em03:ed30", + "e:ey2016:em03:ed31", + "e:ey2016:em04:ed01", + "e:ey2016:em04:ed02", + "e:ey2016:em04:ed03", + "e:ey2016:em04:ed04", + "e:ey2016:em04:ed05", + "e:ey2016:em04:ed06", + "e:ey2016:em04:ed07", + "e:ey2016:em04:ed08", + "e:ey2016:em04:ed09", + "e:ey2016:em04:ed10", + "e:ey2016:em04:ed11", + "e:ey2016:em04:ed12", + "e:ey2016:em04:ed13", + "e:ey2016:em04:ed14", + "e:ey2016:em04:ed15", + "e:ey2016:em04:ed16", + "e:ey2016:em04:ed17", + "e:ey2016:em04:ed18", + "e:ey2016:em04:ed19", + "e:ey2016:em04:ed20", + "e:ey2016:em04:ed21", + "e:ey2016:em04:ed22", + "e:ey2016:em04:ed23", + "e:ey2016:em04:ed24", + "e:ey2016:em04:ed25", + "e:ey2016:em04:ed26", + "e:ey2016:em04:ed27", + "e:ey2016:em04:ed28", + "e:ey2016:em04:ed29", + "e:ey2016:em04:ed30", + "e:ey2016:em05:ed01", + "e:ey2016:em05:ed02", + "e:ey2016:em05:ed03", + "e:ey2016:em05:ed04", + "e:ey2016:em05:ed05", + "e:ey2016:em05:ed06", + "e:ey2016:em05:ed07", + "e:ey2016:em05:ed08", + "e:ey2016:em05:ed09", + "e:ey2016:em05:ed10", + "e:ey2016:em05:ed11", + "e:ey2016:em05:ed12", + "e:ey2016:em05:ed13", + "e:ey2016:em05:ed14", + "e:ey2016:em05:ed15", + "e:ey2016:em05:ed16", + "e:ey2016:em05:ed17", + "e:ey2016:em05:ed18", + "e:ey2016:em05:ed19", + "e:ey2016:em05:ed20", + "e:ey2016:em05:ed21", + "e:ey2016:em05:ed22", + "e:ey2016:em05:ed23", + "e:ey2016:em05:ed24", + "e:ey2016:em05:ed25", + "e:ey2016:em05:ed26", + "e:ey2016:em05:ed27", + "e:ey2016:em05:ed28", + "e:ey2016:em05:ed29", + "e:ey2016:em05:ed30", + "e:ey2016:em05:ed31", + "e:ey2016:em06:ed01", + "e:ey2016:em06:ed02", + "e:ey2016:em06:ed03", + "e:ey2016:em06:ed04", + "e:ey2016:em06:ed05", + "e:ey2016:em06:ed06", + "e:ey2016:em06:ed07", + "e:ey2016:em06:ed08", + "e:ey2016:em06:ed09", + "e:ey2016:em06:ed10", + "e:ey2016:em06:ed11", + "e:ey2016:em06:ed12", + "e:ey2016:em06:ed13", + "e:ey2016:em06:ed14", + "e:ey2016:em06:ed15", + "e:ey2016:em06:ed16", + "e:ey2016:em06:ed17", + "e:ey2016:em06:ed18", + "e:ey2016:em06:ed19", + "e:ey2016:em06:ed20", + "e:ey2016:em06:ed21", + "e:ey2016:em06:ed22", + "e:ey2016:em06:ed23", + "e:ey2016:em06:ed24", + "e:ey2016:em06:ed25", + "e:ey2016:em06:ed26", + "e:ey2016:em06:ed27", + "e:ey2016:em06:ed28", + "e:ey2016:em06:ed29", + "e:ey2016:em06:ed30", + "e:ey2016:em07:ed01", + "e:ey2016:em07:ed02", + "e:ey2016:em07:ed03", + "e:ey2016:em07:ed04", + "e:ey2016:em07:ed05", + "e:ey2016:em07:ed06", + "e:ey2016:em07:ed07", + "e:ey2016:em07:ed08", + "e:ey2016:em07:ed09", + "e:ey2016:em07:ed10", + "e:ey2016:em07:ed11", + "e:ey2016:em07:ed12", + "e:ey2016:em07:ed13", + "e:ey2016:em07:ed14", + "e:ey2016:em07:ed15", + "e:ey2016:em07:ed16", + "e:ey2016:em07:ed17", + "e:ey2016:em07:ed18", + "e:ey2016:em07:ed19", + "e:ey2016:em07:ed20", + "e:ey2016:em07:ed21", + "e:ey2016:em07:ed22", + "e:ey2016:em07:ed23", + "e:ey2016:em07:ed24", + "e:ey2016:em07:ed25", + "e:ey2016:em07:ed26", + "e:ey2016:em07:ed27", + "e:ey2016:em07:ed28", + "e:ey2016:em07:ed29", + "e:ey2016:em07:ed30", + "e:ey2016:em07:ed31", + "e:ey2016:em08:ed01", + "e:ey2016:em08:ed02", + "e:ey2016:em08:ed03", + "e:ey2016:em08:ed04", + "e:ey2016:em08:ed05", + "e:ey2016:em08:ed06", + "e:ey2016:em08:ed07", + "e:ey2016:em08:ed08", + "e:ey2016:em08:ed09", + "e:ey2016:em08:ed10", + "e:ey2016:em08:ed11", + "e:ey2016:em08:ed12", + "e:ey2016:em08:ed13", + "e:ey2016:em08:ed14", + "e:ey2016:em08:ed15", + "e:ey2016:em08:ed16", + "e:ey2016:em08:ed17", + "e:ey2016:em08:ed18", + "e:ey2016:em08:ed19", + "e:ey2016:em08:ed20", + "e:ey2016:em08:ed21", + "e:ey2016:em08:ed22", + "e:ey2016:em08:ed23", + "e:ey2016:em08:ed24", + "e:ey2016:em08:ed25", + "e:ey2016:em08:ed26", + "e:ey2016:em08:ed27", + "e:ey2016:em08:ed28", + "e:ey2016:em08:ed29", + "e:ey2016:em08:ed30", + "e:ey2016:em08:ed31", + "e:ey2016:em09:ed01", + "e:ey2016:em09:ed02", + "e:ey2016:em09:ed03", + "e:ey2016:em09:ed04", + "e:ey2016:em09:ed05", + "e:ey2016:em09:ed06", + "e:ey2016:em09:ed07", + "e:ey2016:em09:ed08", + "e:ey2016:em09:ed09", + "e:ey2016:em09:ed10", + "e:ey2016:em09:ed11", + "e:ey2016:em09:ed12", + "e:ey2016:em09:ed13", + "e:ey2016:em09:ed14", + "e:ey2016:em09:ed15", + "e:ey2016:em09:ed16", + "e:ey2016:em09:ed17", + "e:ey2016:em09:ed18", + "e:ey2016:em09:ed19", + "e:ey2016:em09:ed20", + "e:ey2016:em09:ed21", + "e:ey2016:em09:ed22", + "e:ey2016:em09:ed23", + "e:ey2016:em09:ed24", + "e:ey2016:em09:ed25", + "e:ey2016:em09:ed26", + "e:ey2016:em09:ed27", + "e:ey2016:em09:ed28", + "e:ey2016:em09:ed29", + "e:ey2016:em09:ed30", + "e:ey2016:em10:ed01", + "e:ey2016:em10:ed02", + "e:ey2016:em10:ed03", + "e:ey2016:em10:ed04", + "e:ey2016:em10:ed05", + "e:ey2016:em10:ed06", + "e:ey2016:em10:ed07", + "e:ey2016:em10:ed08", + "e:ey2016:em10:ed09", + "e:ey2016:em10:ed10", + "e:ey2016:em10:ed11", + "e:ey2016:em10:ed12", + "e:ey2016:em10:ed13", + "e:ey2016:em10:ed14", + "e:ey2016:em10:ed15", + "e:ey2016:em10:ed16", + "e:ey2016:em10:ed17", + "e:ey2016:em10:ed18", + "e:ey2016:em10:ed19", + "e:ey2016:em10:ed20", + "e:ey2016:em10:ed21", + "e:ey2016:em10:ed22", + "e:ey2016:em10:ed23", + "e:ey2016:em10:ed24", + "e:ey2016:em10:ed25", + "e:ey2016:em10:ed26", + "e:ey2016:em10:ed27", + "e:ey2016:em10:ed28", + "e:ey2016:em10:ed29", + "e:ey2016:em10:ed30", + "e:ey2016:em10:ed31", + "e:ey2016:em11:ed01", + "e:ey2016:em11:ed02", + "e:ey2016:em11:ed03", + "e:ey2016:em11:ed04", + "e:ey2016:em11:ed05", + "e:ey2016:em11:ed06", + "e:ey2016:em11:ed07", + "e:ey2016:em11:ed08", + "e:ey2016:em11:ed09", + "e:ey2016:em11:ed10", + "e:ey2016:em11:ed11", + "e:ey2016:em11:ed12", + "e:ey2016:em11:ed13", + "e:ey2016:em11:ed14", + "e:ey2016:em11:ed15", + "e:ey2016:em11:ed16", + "e:ey2016:em11:ed17", + "e:ey2016:em11:ed18", + "e:ey2016:em11:ed19", + "e:ey2016:em11:ed20", + "e:ey2016:em11:ed21", + "e:ey2016:em11:ed22", + "e:ey2016:em11:ed23", + "e:ey2016:em11:ed24", + "e:ey2016:em11:ed25", + "e:ey2016:em11:ed26", + "e:ey2016:em11:ed27", + "e:ey2016:em11:ed28", + "e:ey2016:em11:ed29", + "e:ey2016:em11:ed30", + "e:ey2016:em12:ed01", + "e:ey2016:em12:ed02", + "e:ey2016:em12:ed03", + "e:ey2016:em12:ed04", + "e:ey2016:em12:ed05", + "e:ey2016:em12:ed06", + "e:ey2016:em12:ed07", + "e:ey2016:em12:ed08", + "e:ey2016:em12:ed09", + "e:ey2016:em12:ed10", + "e:ey2016:em12:ed11", + "e:ey2016:em12:ed12", + "e:ey2016:em12:ed13", + "e:ey2016:em12:ed14", + "e:ey2016:em12:ed15", + "e:ey2016:em12:ed16", + "e:ey2016:em12:ed17", + "e:ey2016:em12:ed18", + "e:ey2016:em12:ed19", + "e:ey2016:em12:ed20", + "e:ey2016:em12:ed21", + "e:ey2016:em12:ed22", + "e:ey2016:em12:ed23", + "e:ey2016:em12:ed24", + "e:ey2016:em12:ed25", + "e:ey2016:em12:ed26", + "e:ey2016:em12:ed27", + "e:ey2016:em12:ed28", + "e:ey2016:em12:ed29", + "e:ey2016:em12:ed30", + "e:ey2016:em12:ed31", +] diff --git a/examples/audit/commodities.toml b/examples/audit/commodities.toml new file mode 100644 index 0000000..cf3f865 --- /dev/null +++ b/examples/audit/commodities.toml @@ -0,0 +1,8 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 smarttab expandtab autoindent +# +# This is the Chart of Commodities (and Shares) +# + +permit-empty-commodity = true + +commodities = [ ] diff --git a/conf/test-accs.toml b/examples/devel/test-accs.toml similarity index 100% rename from conf/test-accs.toml rename to examples/devel/test-accs.toml diff --git a/conf/test-comms.toml b/examples/devel/test-comms.toml similarity index 100% rename from conf/test-comms.toml rename to examples/devel/test-comms.toml diff --git a/conf/test-tags.toml b/examples/devel/test-tags.toml similarity index 100% rename from conf/test-tags.toml rename to examples/devel/test-tags.toml diff --git a/conf/test.toml b/examples/devel/test.toml similarity index 100% rename from conf/test.toml rename to examples/devel/test.toml diff --git a/examples/simple.toml b/examples/simple.toml new file mode 100644 index 0000000..172f8b0 --- /dev/null +++ b/examples/simple.toml @@ -0,0 +1,34 @@ +### Configuration settings for Tackler-NG +### +### See tackler.toml file full configuration options +### and documentation. +### +### The format of this file is TOML (https://toml.io/en/) +[kernel] +strict = false +audit = { mode = false, hash = "SHA-256" } +timestamp = { default-time = 00:00:00, timezone = { name = "UTC" } } + +input = { storage = "fs", fs = { dir = "simple", suffix = "txn" } } + +[transaction] +accounts = { path = "none" } +commodities = { path = "none" } +tags = { path = "none" } + + +### Report Configuration +[report] +report-timezone = "UTC" +scale = { min = 2, max = 4 } +accounts = [ "^Expenses:" ] +targets = [ "balance", "balance-group", "register" ] + +balance = { title = "Balance Report" } +balance-group = { title = "Balance Group Report", group-by = "month" } +register = { title = "Register Report", accounts = [ "^Expenses:", "^Income:" ]} + + +### Export Configuration +[export] +equity = { accounts = [ "^Assets:", ], equity-account = "Equity:Balance" } diff --git a/examples/simple/journal.txn b/examples/simple/journal.txn new file mode 100644 index 0000000..e7158a3 --- /dev/null +++ b/examples/simple/journal.txn @@ -0,0 +1,19 @@ +2024-04-01 'Lucky Day! + Assets:Bank:Acme_Inc 420 + Income:Lottery + +2024-04-30 (#123) 'Txn with comments + ; so sad, no ice cream + Expenses:Food:Groceries 12.00 + Assets:Checking + +2024-06-21 'Txn with tags + # tags: cranberry, caramel + Expenses:Sweets:Ice·cream 2.12 + Assets:Cash + +2024-06-24 'Txn with Location + # location: geo:60.167,24.955,5 + Expenses:Sweets:Salmiakki 1.20 + Assets:Cash + diff --git a/conf/tackler.toml b/examples/tackler.toml similarity index 95% rename from conf/tackler.toml rename to examples/tackler.toml index d541f95..bf8902b 100644 --- a/conf/tackler.toml +++ b/examples/tackler.toml @@ -1,6 +1,6 @@ ### Configuration settings for Tackler-NG ### -### The format of this file TOML (https://toml.io/en/) +### The format of this file is TOML (https://toml.io/en/) [kernel] ### Stric mode ### @@ -93,7 +93,7 @@ storage = "fs" ### In case of CLI option, it's relative to the current working directory. ### ### CLI: --input.fs.dir -dir = "txns" +dir = "tackler/txns" ### Filename suffix ### ### This is transaction file extension, e.g. all files with @@ -155,7 +155,7 @@ suffix = "txn" ### If the path is relative, then it's based on this file. ### ### Set the value to string "none", to disable the Chart of Accounts. -path = "accounts.toml" +path = "tackler/conf/accounts.toml" [transaction.commodities] ### Path to commodities data @@ -164,7 +164,7 @@ path = "accounts.toml" ### ### Set the value to string "none", to disable the Chart of Commodities, ### in that case, empty commodities are allowed by default. -path = "commodities.toml" +path = "tackler/conf/commodities.toml" [transaction.tags] ### Path to tags data @@ -172,7 +172,7 @@ path = "commodities.toml" ### If the path is relative, then it's based on this file. ### ### Set the value to string "none", to disable the Chart of Tags -path = "tags.toml" +path = "tackler/conf/tags.toml" ############################################################################ @@ -273,8 +273,10 @@ group-by = "month" title = "Register Report" ### Timestamp style ### -### This set how timestamps are displayed with register report -### See also 'timezone', 'report-timezone' options. +### This optional setting controls how timestamps are +### displayed with register report. Default is "date". +### See also 'kernel.timestamp.timezone' +### and 'report.report-timezone' settings. ### ### Valid values are: date, seconds, full ### date: only date part is displayed (this is default) diff --git a/conf/accounts.toml b/examples/tackler/conf/accounts.toml similarity index 100% rename from conf/accounts.toml rename to examples/tackler/conf/accounts.toml diff --git a/conf/commodities.toml b/examples/tackler/conf/commodities.toml similarity index 100% rename from conf/commodities.toml rename to examples/tackler/conf/commodities.toml diff --git a/conf/tags.toml b/examples/tackler/conf/tags.toml similarity index 100% rename from conf/tags.toml rename to examples/tackler/conf/tags.toml diff --git a/tackler-cli/CRATES.md b/tackler-cli/CRATES.md index a1ca918..3337bf6 100644 --- a/tackler-cli/CRATES.md +++ b/tackler-cli/CRATES.md @@ -1,19 +1,23 @@ # Tackler-NG: Tackler CLI Application +[![Build Status](https://github.com/e257-fi/tackler-ng/actions/workflows/build.yml/badge.svg)](https://github.com/e257-fi/tackler-ng/actions) +[![Github Releases](https://img.shields.io/github/v/release/e257-fi/tackler-ng?include_prereleases&color=%230868da)](https://github.com/e257-fi/tackler-ng/releases) [![Chat on Matrix](https://tackler.e257.fi/img/badge-matrix.svg)](https://matrix.to/#/#tackler:matrix.org) +[![Tackler Docs](https://img.shields.io/badge/tackler-documentation-%23ffcb00)](https://tackler.e257.fi/docs) -This is rusty version of [Tackler](https://tackler.e257.fi/) CLI application. -Tackler is an accounting engine and reporting tool -for text based double-entry accounting. +Tackler-ng is an accounting engine and reporting tool for text based double-entry accounting. ## Project Status -The project is in Technology Preview Release phase. +The rusty Tackler-NG is in feature parity with old scala based [Tackler](https://tackler.e257.fi/) CLI application. -The [Tackler Journal Format](https://tackler.e257.fi/docs/journal/format/) is fully -supported, as are all transaction backends ([Filesystem](https://tackler.e257.fi/docs/usage/#storage-selector) -and [Git Storage](https://tackler.e257.fi/docs/journal/git-storage/)). See `tackler --help` how to use these. +Especially the [Tackler Journal Format](https://tackler.e257.fi/docs/journal/format/) is fully supported, and also all transaction storage backends are supported: + +- [FS backend](https://tackler.e257.fi/docs/usage/#storage-selector) (filesystem based) +- [Git backend](https://tackler.e257.fi/docs/journal/git-storage/) (native [Gitoxide](https://github.com/GitoxideLabs/gitoxide/) based support for [Git SCM](https://git-scm.com/)) + +See `tackler --help` and [Tackler Configuration](https://github.com/e257-fi/tackler-ng/blob/main/examples/tackler.toml) how to use these. All reports and exports are supported: * Reports @@ -30,119 +34,74 @@ Other supported notable features are: * [Transacation Geo Location](https://tackler.e257.fi/docs/gis/txn-geo-location/) and [Transaction Geo Filters](https://tackler.e257.fi/docs/gis/txn-geo-filters/) -**AS THIS IS TECHNOLOGY PREVIEW RELEASE, THERE ARE MISSING FEATURES -AND KNOWN INCONSISTENCIES WITH EXISTING TACKLER IMPLEMENTATION.** - -Major missing features are lack of configuration support -and missing support for Chart of Accounts. - +**AS THIS IS TECHNOLOGY PREVIEW RELEASE, THERE COULD BE MISSING FEATURES +AND INCONSISTENCIES WITH EXISTING TACKLER IMPLEMENTATION.** ## Build and install tackler -You need Rust to build tackler ````bash -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +# Get the source code git clone --recurse-submodules https://github.com/e257-fi/tackler-ng -```` -````bash cd tackler-ng -# Check the latest relase version -git tag -l -# Get the release, e.g. v24.11.0 -git checkout v24.11.0 -# Build and install tacker -cargo install tackler -# check that it works -tackler --version -tackler --help -```` +# Check the latest relase version, format is YY-MM- +git tag -l -## Simple demo +# Select the latest release, e.g. v24.11.0 +git checkout v24.11.0 -### Create a playground +# Build tackler on the workspace root +cargo build --release --locked --bin tackler -````bash -mkdir -p tackler/txns; cd tackler +# Check the version info +target/release/tackler --version ```` -### Let's record some transaction data +## Simple example -````bash -cat > txns/journal.txn << EOF -2023-04-01 'It was warm, sunny day - Expenses:Ice_cream 2 - Assets:Cash - -2023-05-01 'Ice cream 'n soda! - Expenses:BostonCooler 3 - Assets:Cash - -EOF -```` -### Create some reports +This setup doesn't have any check enabled, and it uses filesystem storage as transaction storage. -#### Simple balance +#### Command ````bash -tackler --input.file txns/journal.txn --reports balance +target/release/tackler --config examples/simple.toml ```` - #### Output ```` -BALANCE -------- - 0.00 -5.00 Assets - -5.00 -5.00 Assets:Cash - 0.00 5.00 Expenses - 3.00 3.00 Expenses:BostonCooler - 2.00 2.00 Expenses:Ice_cream -===================== - 0.00 -```` - -#### Balance with account filters - -````bash -tackler --input.file txns/journal.txn --reports balance --accounts '^Expenses' -```` +********************************************************************************** -#### Output -```` -BALANCE -------- - 0.00 5.00 Expenses - 3.00 3.00 Expenses:BostonCooler - 2.00 2.00 Expenses:Ice_cream +Balance Report +-------------- + 0.00 12.00 Expenses:Food + 12.00 12.00 Expenses:Food:Groceries + 0.00 3.32 Expenses:Sweets + 2.12 2.12 Expenses:Sweets:Ice·cream + 1.20 1.20 Expenses:Sweets:Salmiakki ===================== - 5.00 + 15.32 +################################################################################## +********************************************************************************** +... +... +... ```` - - ## Let's play for real -### Get test vectors and full source code of Tackler +Following examples use bare git repository as transaction storage, and also strict and audit mode is activated by configuration. -````bash -git clone --recurse-submodules https://github.com/e257-fi/tackler-ng -```` +The triplet of git commit id, Txn Set Checksum and Account Selector Checksum provides auditable (cryptographic) proof of transactions used by reports. -### Use Git repository as Txn storage +### Use Git repository as Transaction storage #### Reports with Txn Checksum ````bash -tackler \ - --input.git.repo tackler-ng/suite/audit/audit-repo.git \ - --input.git.dir txns \ - --input.git.ref txns-1E1 \ - --reports balance \ - --accounts '^a:.*' \ - --audit.mode true +target/release/tackler \ + --config examples/audit.toml \ ```` #### Output @@ -152,40 +111,43 @@ Git Storage commit : 4aa4e9797501c1aefc92f32dff30ab462dae5545 reference : txns-1E1 directory : txns - suffix : txn + suffix : .txn message : txns-1E1: 2016/12 Txn Set Checksum SHA-256 : 9b29071e1bf228cfbd31ca2b8e7263212e4b86e51cfee1e8002c9b795ab03f76 Set size : 10 -BALANCE -------- - 0.00 -161.00 a:ay2016 - -6.00 -6.00 a:ay2016:am02 - -14.00 -14.00 a:ay2016:am03 - -19.00 -19.00 a:ay2016:am04 - -26.00 -26.00 a:ay2016:am05 - -1.00 -1.00 a:ay2016:am07 - -7.00 -7.00 a:ay2016:am08 - -13.00 -13.00 a:ay2016:am09 - -19.00 -19.00 a:ay2016:am10 - -25.00 -25.00 a:ay2016:am11 - -31.00 -31.00 a:ay2016:am12 +********************************************************************************** +Account Selector Checksum + SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519 + +Balance Report +-------------- + 0.00 -161.0000 a:ay2016 + -6.0000 -6.0000 a:ay2016:am02 + -14.0000 -14.0000 a:ay2016:am03 + -19.0000 -19.0000 a:ay2016:am04 + -26.0000 -26.0000 a:ay2016:am05 + -1.0000 -1.0000 a:ay2016:am07 + -7.0000 -7.0000 a:ay2016:am08 + -13.0000 -13.0000 a:ay2016:am09 + -19.0000 -19.0000 a:ay2016:am10 + -25.0000 -25.0000 a:ay2016:am11 + -31.0000 -31.0000 a:ay2016:am12 ===================== - -161.00 + -161.0000 +################################################################################## ```` #### Report with 100_000 Transactions +There is git ref 'txns-1E5' inside the example audit -repository. + ````bash -tackler \ - --input.git.repo tackler-ng/suite/audit/audit-repo.git \ - --input.git.dir txns \ - --input.git.ref txns-1E5 \ - --reports balance \ - --accounts '^a:.*' \ - --audit.mode true +target/release/tackler \ + --config examples/audit.toml \ + --input.git.ref txns-1E5 ```` #### Output @@ -195,30 +157,35 @@ Git Storage commit : cb56fdcdd2b56d41fc08cc5af4a3b410896f03b5 reference : txns-1E5 directory : txns - suffix : txn + suffix : .txn message : txns-1E5: 2016/12 Txn Set Checksum SHA-256 : 27060dc1ebde35bebd8f7af2fd9815bc9949558d3e3c85919813cd80748c99a7 Set size : 100000 -BALANCE -------- - 0.00 -1574609.01 a:ay2016 - -135600.00 -135600.00 a:ay2016:am01 - -118950.00 -118950.00 a:ay2016:am02 - -135631.00 -135631.00 a:ay2016:am03 - -127137.00 -127137.00 a:ay2016:am04 - -135616.00 -135616.00 a:ay2016:am05 - -127154.00 -127154.00 a:ay2016:am06 - -135600.00 -135600.00 a:ay2016:am07 - -135603.00 -135603.00 a:ay2016:am08 - -127140.00 -127140.00 a:ay2016:am09 - -135619.00 -135619.00 a:ay2016:am10 - -127126.00 -127126.00 a:ay2016:am11 - -133433.00 -133433.00 a:ay2016:am12 +********************************************************************************** +Account Selector Checksum + SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519 + +Balance Report +-------------- + 0.00 -1574609.0100 a:ay2016 + -135600.0008 -135600.0008 a:ay2016:am01 + -118950.0008 -118950.0008 a:ay2016:am02 + -135631.0008 -135631.0008 a:ay2016:am03 + -127137.0008 -127137.0008 a:ay2016:am04 + -135616.0008 -135616.0008 a:ay2016:am05 + -127154.0008 -127154.0008 a:ay2016:am06 + -135600.0008 -135600.0008 a:ay2016:am07 + -135603.0008 -135603.0008 a:ay2016:am08 + -127140.0008 -127140.0008 a:ay2016:am09 + -135619.0008 -135619.0008 a:ay2016:am10 + -127126.0008 -127126.0008 a:ay2016:am11 + -133433.0008 -133433.0008 a:ay2016:am12 ========================= - -1574609.01 + -1574609.0100 +################################################################################## ```` ### Transaction Filters @@ -226,20 +193,17 @@ BALANCE #### Filter definition ````bash -tackler \ - --input.git.repo tackler-ng/suite/audit/audit-repo.git \ - --input.git.dir txns \ +target/release/tackler \ + --config examples/audit.toml \ --input.git.ref txns-1E5 \ - --reports balance \ - --accounts '^a:.*' \ - --audit.mode true \ --api-filter-def '{"txnFilter":{"TxnFilterPostingAccount":{"regex":"^a:ay2016:am12"}}}' ```` The transaction filter definition could be given also as Base64 ascii armored string: ```` ---api-filter-def base64:eyJ0eG5GaWx0ZXIiOnsiVHhuRmlsdGVyUG9zdGluZ0FjY291bnQiOnsicmVnZXgiOiJeYTpheTIwMTY6YW0xMiJ9fX0= +--api-filter-def \ +base64:eyJ0eG5GaWx0ZXIiOnsiVHhuRmlsdGVyUG9zdGluZ0FjY291bnQiOnsicmVnZXgiOiJeYTpheTIwMTY6YW0xMiJ9fX0= ```` @@ -250,23 +214,27 @@ Git Storage commit : cb56fdcdd2b56d41fc08cc5af4a3b410896f03b5 reference : txns-1E5 directory : txns - suffix : txn + suffix : .txn message : txns-1E5: 2016/12 Txn Set Checksum SHA-256 : 51faa6d2133d22d3ff8b60aff57722d1869fc4677911b13161dce558e7498073 Set size : 8406 -Filter: - Posting Account: "^a:ay2016:am12$" +Filter + Posting Account: "^a:ay2016:am12" +********************************************************************************** +Account Selector Checksum + SHA-256 : 19d31a48bf9a8604a1128ccfd281511f961c5469748a97897a21fc0fa2a5f519 -BALANCE -------- - 0.00 -133433.00 a:ay2016 - -133433.00 -133433.00 a:ay2016:am12 +Balance Report +-------------- + 0.00 -133433.0008 a:ay2016 + -133433.0008 -133433.0008 a:ay2016:am12 ======================== - -133433.00 + -133433.0008 +################################################################################## ```` ## Further info From 96c0f57113b1bf04a9df37afe753efabd38e4194 Mon Sep 17 00:00:00 2001 From: 35V LG84 <35vlg84-x4e6b92@e257.fi> Date: Sat, 16 Nov 2024 23:42:38 +0200 Subject: [PATCH 3/4] deps: cargo update Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi> --- Cargo.lock | 408 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 315 insertions(+), 93 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37ddd3f..1719e62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.17" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ "borsh-derive", "cfg_aliases", @@ -184,23 +184,22 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.86", - "syn_derive", + "syn 2.0.87", ] [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "regex-automata", @@ -249,9 +248,9 @@ checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cc" -version = "1.1.31" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "shlex", ] @@ -270,9 +269,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -280,9 +279,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.20" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -299,14 +298,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", ] [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "clru" @@ -322,9 +321,9 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] @@ -383,6 +382,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dunce" version = "1.0.5" @@ -422,15 +432,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "flate2" -version = "1.0.34" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -944,9 +954,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -963,14 +973,143 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -980,7 +1119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", ] [[package]] @@ -1070,9 +1209,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.161" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "linux-raw-sys" @@ -1080,6 +1219,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1275,29 +1420,6 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" version = "1.0.89" @@ -1414,9 +1536,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1485,9 +1607,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.38" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.6.0", "errno", @@ -1525,9 +1647,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -1546,13 +1668,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", ] [[package]] @@ -1637,6 +1759,12 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -1656,9 +1784,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.86" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89275301d38033efb81a6e60e3497e734dfcc62571f2854bf4b16690398824c" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -1666,15 +1794,14 @@ dependencies = [ ] [[package]] -name = "syn_derive" -version = "0.1.8" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", ] [[package]] @@ -1748,9 +1875,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -1761,22 +1888,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d171f59dbaa811dbbb1aee1e73db92ec2b122911a48e1390dfe327a821ddede" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08be0f17bd307950653ce45db00cd31200d82b624b36e181337d9c7d92765b5" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", ] [[package]] @@ -1847,6 +1974,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1917,12 +2054,6 @@ dependencies = [ "arrayvec", ] -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-bom" version = "2.0.3" @@ -1946,15 +2077,27 @@ dependencies = [ [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -2020,7 +2163,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -2042,7 +2185,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2175,6 +2318,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -2186,9 +2341,33 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.22" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" +checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" + +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] [[package]] name = "zerocopy" @@ -2208,5 +2387,48 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.86", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] From 5cdb9745b3e11cde3bd5d4b304c99ee3cc06ddcc Mon Sep 17 00:00:00 2001 From: 35V LG84 <35vlg84-x4e6b92@e257.fi> Date: Sat, 16 Nov 2024 23:43:47 +0200 Subject: [PATCH 4/4] GHA: build in release mode, run tackler examples Test the binary with "simple" and "audit" examples. Signed-off-by: 35V LG84 <35vlg84-x4e6b92@e257.fi> --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8057c95..acb68a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,5 +44,6 @@ jobs: submodules: 'true' - run: rustup show - uses: Swatinem/rust-cache@v2 - - run: cargo build - + - run: cargo build --release + - run: target/release/tackler --config examples/simple.toml + - run: target/release/tackler --config examples/audit.toml