From e4894e4e0a1786318235b35bd4af84b91b718ce9 Mon Sep 17 00:00:00 2001 From: mholt Date: Tue, 3 Dec 2024 07:15:21 -0800 Subject: [PATCH] enable log checks, this should fail --- .github/workflows/test-ci.yml | 2 +- Cargo.toml | 4 ++-- src/dual_consensus.rs | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 1e2f14e..57a9c83 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -10,5 +10,5 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy - - run: cargo test --all-features --release + - run: RUST_LOG=trace cargo test --all-features --release - run: cargo clippy -- -D warnings \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 6628dea..22e79f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,12 @@ [package] name = "waffle_con" -version = "0.4.2" +version = "0.4.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] derive_builder = "0.13.0" -env_logger = "0.11.1" itertools = "0.12.1" log = "0.4.20" priority-queue = "1.3.2" @@ -19,6 +18,7 @@ rand = "0.8.5" criterion = "0.5.1" csv = "1.3.0" serde = "1.0.197" +test-log = "0.2.16" [[bench]] name = "consensus_bench" diff --git a/src/dual_consensus.rs b/src/dual_consensus.rs index fd4bc50..16fdee5 100644 --- a/src/dual_consensus.rs +++ b/src/dual_consensus.rs @@ -478,6 +478,13 @@ impl<'a> DualConsensusDWFA<'a> { trace!("\tadding to ret");//: {dual_con_result:?}"); trace!("\tcon1: {}", std::str::from_utf8(dual_con_result.consensus1().sequence())?); trace!("\tcon2: {}", std::str::from_utf8(dual_con_result.consensus2().unwrap().sequence())?); + /* + if let Some(c2) = dual_con_result.consensus2() { + trace!("\tcon2: {}", std::str::from_utf8(c2.sequence())?); + } else { + trace!("\tcon2: None"); + } + */ ret.push(dual_con_result); } } else { @@ -1481,8 +1488,9 @@ mod tests { assert_eq!(consensus, vec![expected_consensus]); } - #[test] + #[test_log::test] fn test_single_sequence() { + // the sequence let sequence = b"ACGTACGTACGT"; let mut consensus_dwfa = DualConsensusDWFA::default(); consensus_dwfa.add_sequence(sequence).unwrap();