diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml
index aca239e935..3b3167a6c4 100644
--- a/.github/workflows/asv.yml
+++ b/.github/workflows/asv.yml
@@ -27,10 +27,9 @@ jobs:
with:
python-version: "3.10"
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
diff --git a/.github/workflows/dev_envs.yml b/.github/workflows/dev_envs.yml
index 24ef7112e8..11371ae3ce 100644
--- a/.github/workflows/dev_envs.yml
+++ b/.github/workflows/dev_envs.yml
@@ -24,7 +24,7 @@ jobs:
- run: nix run .# -- --version
- - run: nix develop --command bash -c "tox -e py310"
+ - run: nix develop --command bash -c "tox -e py311"
pixi:
runs-on: ${{ matrix.os }}
@@ -39,7 +39,7 @@ jobs:
- name: set up pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
- pixi-version: v0.26.1
+ pixi-version: v0.39.5
cache: true
frozen: true
@@ -67,7 +67,7 @@ jobs:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: setup conda
- uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d
+ uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830
with:
python-version: "3.10"
miniforge-version: latest
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 0805449e48..055e804da1 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -40,6 +40,9 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-v4-
+ - uses: dtolnay/rust-toolchain@stable
+ - uses: Swatinem/rust-cache@v2
+
- name: Install dependencies
run: |
python -m pip install --upgrade pip
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 459f29ece2..9324699e67 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -15,17 +15,13 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
- name: Run cargo check
- uses: actions-rs/cargo@v1
- with:
- command: check
+ run: |
+ cargo check
test:
runs-on: ${{ matrix.os }}
@@ -53,32 +49,30 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
+ - uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- override: true
+
+ - uses: Swatinem/rust-cache@v2
+
+ - uses: taiki-e/install-action@nextest
- name: Run tests
- uses: actions-rs/cargo@v1
- with:
- command: test
- args: --no-fail-fast
+ run: |
+ cargo nextest run
test_all_features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
- - uses: actions-rs/install@v0.1
+ - uses: taiki-e/install-action@v2
with:
- crate: cargo-all-features
- version: latest
- use-tool-cache: true
+ tool: cargo-all-features
- name: Run tests for all feature combinations
run: cargo test-all-features --no-fail-fast --all
@@ -88,29 +82,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
+ - uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- override: true
+ components: llvm-tools-preview
+ - uses: Swatinem/rust-cache@v2
- - name: Install cargo-binstall
- run: |
- wget https://github.com/ryankurte/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-gnu.tgz
- tar xf cargo-binstall-x86_64-unknown-linux-gnu.tgz
- chmod +x cargo-binstall
- mv cargo-binstall "$HOME/.cargo/bin"
-
- - name: Install cargo-tarpaulin
- run: cargo binstall --no-confirm cargo-tarpaulin
+ - uses: taiki-e/install-action@cargo-llvm-cov
+ - uses: taiki-e/install-action@nextest
- - name: Coverage with tarpaulin
- run: cargo tarpaulin --all --all-features --timeout 600 --out xml -- --test-threads 1
+ - name: Collect coverage data
+ run: cargo llvm-cov nextest --all-features --lcov --output-path lcov.info
- name: Upload Rust coverage to codecov
uses: codecov/codecov-action@v3
with:
flags: rust
fail_ci_if_error: true
+ files: lcov.info
lints:
name: Lints
@@ -129,24 +117,20 @@ jobs:
uses: actions/checkout@v4
- name: Install Rust toolchain
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@master
with:
- profile: minimal
toolchain: ${{ matrix.rust }}
- override: true
- components: rustfmt, clippy
+ components: "clippy, rustfmt"
+
+ - uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --all -- --check
+ run: |
+ cargo fmt --all -- --check
- name: Run cargo clippy
- uses: actions-rs/cargo@v1
- with:
- command: clippy
- args: --all -- -D warnings
+ run: |
+ cargo clippy --all -- -D warnings
wasm-pack:
name: Check if wasm-pack builds a valid package for the sourmash crate
@@ -154,11 +138,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
+ - uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
target: wasm32-unknown-unknown
+ - uses: Swatinem/rust-cache@v2
+
- name: Install wasm-pack
run: "curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh"
@@ -190,38 +175,6 @@ jobs:
with:
path: 'pkg/sourmash*.tgz'
- wasm32-wasi:
- name: Run tests under wasm32-wasi
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Install wasm32-wasi target
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- target: wasm32-wasi
- - name: Install wasmtime
- run: "curl https://wasmtime.dev/install.sh -sSf | bash"
- - name: Add wasmtime to PATH
- run: echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- - name: Install cargo-wasi command
- uses: actions-rs/cargo@v1
- with:
- command: install
- args: --force cargo-wasi
- - name: Build code with cargo-wasi
- uses: actions-rs/cargo@v1
- continue-on-error: true ## TODO: remove this when build works...
- with:
- command: wasi
- args: build
- - name: Run tests under wasm32-wasi
- uses: actions-rs/cargo@v1
- continue-on-error: true ## TODO: remove this when tests work...
- with:
- command: wasi
- args: test
-
publish:
name: Publish (on tags, dry-run otherwise)
runs-on: ubuntu-latest
@@ -229,12 +182,9 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4
- - name: Install stable toolchain
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
@@ -245,45 +195,38 @@ jobs:
features: branchwater
- name: Make sure we can publish the sourmash crate
- uses: actions-rs/cargo@v1
- with:
- command: publish
- args: --dry-run --manifest-path src/core/Cargo.toml
+ run: |
+ cargo publish --dry-run --manifest-path src/core/Cargo.toml
# Login to crates.io on tags
- name: login to crates.io
- uses: actions-rs/cargo@v1
if: startsWith(github.ref, 'refs/tags/r')
- with:
- command: login
- args: ${{ secrets.CRATES_IO_TOKEN }}
+ run: |
+ cargo login ${{ secrets.CRATES_IO_TOKEN }}
# Publish to crates.io on tags
- name: Publish to crates.io
if: startsWith(github.ref, 'refs/tags/r')
- uses: actions-rs/cargo@v1
- with:
- command: publish
- args: --manifest-path src/core/Cargo.toml
+ run: |
+ cargo publish --manifest-path src/core/Cargo.toml
minimum_rust_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
+ - uses: dtolnay/rust-toolchain@master
with:
- toolchain: "1.66.0"
- override: true
+ toolchain: "1.71.1"
+
+ - uses: Swatinem/rust-cache@v2
- name: check if README matches MSRV defined here
- run: grep '1.66.0' src/core/README.md
+ run: grep '1.71.1' src/core/README.md
- name: Check if it builds properly
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --all-features
+ run: |
+ cargo build --all-features
check_cbindgen:
name: "Check if cbindgen runs cleanly for generating the C headers"
@@ -291,16 +234,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- override: true
+ - uses: dtolnay/rust-toolchain@stable
+
+ - uses: Swatinem/rust-cache@v2
- - uses: actions-rs/install@v0.1
+ - uses: taiki-e/install-action@v2
with:
- crate: cbindgen
- version: 0.20.0
- use-tool-cache: true
+ tool: cbindgen@0.26.0
- run: make include/sourmash.h
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3aec96f877..fdc2bd5453 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,7 +10,7 @@ repos:
- id: check-toml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.8.4
+ rev: v0.9.3
hooks:
- id: ruff-format
- id: ruff
diff --git a/.readthedocs.yml b/.readthedocs.yml
index e5d525f014..f36f0afdad 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -8,7 +8,7 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
- rust: "1.70"
+ rust: "1.75"
apt_packages:
- llvm-dev
- libclang-dev
diff --git a/Cargo.lock b/Cargo.lock
index a98f3c87d3..9cd80dbfad 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14,7 +14,7 @@ version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9"
dependencies = [
- "getrandom",
+ "getrandom 0.2.15",
"once_cell",
"version_check",
]
@@ -178,9 +178,9 @@ checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205"
[[package]]
name = "bytemuck"
-version = "1.16.1"
+version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e"
+checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
[[package]]
name = "byteorder"
@@ -642,15 +642,27 @@ dependencies = [
"cfg-if",
"js-sys",
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
"wasm-bindgen",
]
+[[package]]
+name = "getrandom"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.13.3+wasi-0.2.2",
+ "windows-targets 0.52.6",
+]
+
[[package]]
name = "getset"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f636605b743120a8d32ed92fc27b6cde1a769f8f936c065151eb66f88ded513c"
+checksum = "eded738faa0e88d3abc9d1a13cb11adc2073c400969eeb8793cf7132589959fc"
dependencies = [
"proc-macro-error2",
"proc-macro2",
@@ -693,9 +705,9 @@ checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b"
[[package]]
name = "histogram"
-version = "0.11.1"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58cf6b99a250776d813cdf2f0b478a053a822d078e7a2baf5cb36afc88c41a7c"
+checksum = "e1afb38a8df06a3145793cc0bd7d7b929211de1fcee50a89fa4bc0f5cd9bf0ca"
dependencies = [
"thiserror 1.0.69",
]
@@ -776,9 +788,9 @@ dependencies = [
[[package]]
name = "itertools"
-version = "0.13.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
dependencies = [
"either",
]
@@ -844,17 +856,15 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
[[package]]
name = "librocksdb-sys"
-version = "0.16.0+8.10.0"
+version = "0.17.1+9.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c"
+checksum = "2b7869a512ae9982f4d46ba482c2a304f1efd80c6412a3d4bf57bb79a619679f"
dependencies = [
"bindgen",
"bzip2-sys",
"cc",
- "glob",
"libc",
"libz-sys",
- "lz4-sys",
"zstd-sys",
]
@@ -892,19 +902,9 @@ checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "log"
-version = "0.4.22"
+version = "0.4.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
-
-[[package]]
-name = "lz4-sys"
-version = "1.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
-dependencies = [
- "cc",
- "libc",
-]
+checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
[[package]]
name = "lzma-sys"
@@ -1000,7 +1000,7 @@ dependencies = [
"num-complex",
"num-rational",
"num-traits",
- "rand",
+ "rand 0.8.5",
"rand_distr",
"simba",
"typenum",
@@ -1122,9 +1122,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]]
name = "ouroboros"
-version = "0.18.4"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67"
+checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59"
dependencies = [
"aliasable",
"ouroboros_macro",
@@ -1133,12 +1133,11 @@ dependencies = [
[[package]]
name = "ouroboros_macro"
-version = "0.18.4"
+version = "0.18.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd"
+checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0"
dependencies = [
"heck",
- "itertools 0.12.1",
"proc-macro2",
"proc-macro2-diagnostics",
"quote",
@@ -1269,8 +1268,8 @@ dependencies = [
"bitflags 2.4.1",
"lazy_static",
"num-traits",
- "rand",
- "rand_chacha",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
"rand_xorshift",
"regex-syntax 0.8.2",
"unarray",
@@ -1318,8 +1317,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha",
- "rand_core",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "rand"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
+dependencies = [
+ "rand_chacha 0.9.0",
+ "rand_core 0.9.0",
+ "zerocopy",
]
[[package]]
@@ -1329,7 +1339,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core",
+ "rand_core 0.6.3",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.9.0",
]
[[package]]
@@ -1338,7 +1358,17 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom",
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
+dependencies = [
+ "getrandom 0.3.1",
+ "zerocopy",
]
[[package]]
@@ -1348,7 +1378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
dependencies = [
"num-traits",
- "rand",
+ "rand 0.8.5",
]
[[package]]
@@ -1357,7 +1387,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
dependencies = [
- "rand_core",
+ "rand_core 0.6.3",
]
[[package]]
@@ -1447,9 +1477,9 @@ dependencies = [
[[package]]
name = "roaring"
-version = "0.10.9"
+version = "0.10.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41589aba99537475bf697f2118357cad1c31590c5a1b9f6d9fc4ad6d07503661"
+checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2"
dependencies = [
"bytemuck",
"byteorder",
@@ -1457,9 +1487,9 @@ dependencies = [
[[package]]
name = "rocksdb"
-version = "0.22.0"
+version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6bd13e55d6d7b8cd0ea569161127567cd587676c99f4472f779a0279aa60a7a7"
+checksum = "26ec73b20525cb235bad420f911473b69f9fe27cc856c5461bccd7e4af037f43"
dependencies = [
"libc",
"librocksdb-sys",
@@ -1580,9 +1610,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.134"
+version = "1.0.137"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d"
+checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
dependencies = [
"itoa",
"memchr",
@@ -1643,10 +1673,10 @@ dependencies = [
"enum_dispatch",
"finch",
"fixedbitset",
- "getrandom",
+ "getrandom 0.2.15",
"getset",
"histogram",
- "itertools 0.13.0",
+ "itertools 0.14.0",
"js-sys",
"log",
"md5",
@@ -1661,7 +1691,7 @@ dependencies = [
"piz",
"primal-check",
"proptest",
- "rand",
+ "rand 0.9.0",
"rayon",
"rkyv",
"roaring",
@@ -1672,7 +1702,7 @@ dependencies = [
"statrs",
"streaming-stats",
"tempfile",
- "thiserror 2.0.9",
+ "thiserror 2.0.11",
"twox-hash",
"typed-builder",
"vec-collections",
@@ -1696,7 +1726,7 @@ dependencies = [
"approx",
"nalgebra",
"num-traits",
- "rand",
+ "rand 0.8.5",
]
[[package]]
@@ -1738,12 +1768,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
-version = "3.14.0"
+version = "3.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
+checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
dependencies = [
"cfg-if",
"fastrand",
+ "getrandom 0.2.15",
"once_cell",
"rustix 0.38.40",
"windows-sys 0.59.0",
@@ -1769,11 +1800,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.9"
+version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
+checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
dependencies = [
- "thiserror-impl 2.0.9",
+ "thiserror-impl 2.0.11",
]
[[package]]
@@ -1789,9 +1820,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
-version = "2.0.9"
+version = "2.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
+checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
dependencies = [
"proc-macro2",
"quote",
@@ -1830,7 +1861,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if",
- "rand",
+ "rand 0.8.5",
"static_assertions",
]
@@ -1928,6 +1959,15 @@ version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+[[package]]
+name = "wasi"
+version = "0.13.3+wasi-0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
+dependencies = [
+ "wit-bindgen-rt",
+]
+
[[package]]
name = "wasm-bindgen"
version = "0.2.97"
@@ -2219,6 +2259,15 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+[[package]]
+name = "wit-bindgen-rt"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
+dependencies = [
+ "bitflags 2.4.1",
+]
+
[[package]]
name = "wyz"
version = "0.5.1"
@@ -2243,6 +2292,26 @@ version = "1.0.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377"
+[[package]]
+name = "zerocopy"
+version = "0.8.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
[[package]]
name = "zstd-sys"
version = "2.0.7+zstd.1.5.4"
diff --git a/README.md b/README.md
index b62f0534fa..6244a56df2 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@ Quickly search, compare, and analyze genomic and metagenomic data sets.
[![Bioconda install](https://img.shields.io/conda/dn/bioconda/sourmash.svg?style=flag&label=Bioconda)](https://anaconda.org/bioconda/sourmash)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/sourmash-minimal.svg)](https://anaconda.org/conda-forge/sourmash-minimal)
+[![Debian Testing](https://badges.debian.net/badges/debian/testing/sourmash/version.svg)](https://packages.debian.org/testing/sourmash) [![Debian Unstable](https://badges.debian.net/badges/debian/unstable/sourmash/version.svg)](https://packages.debian.org/unstable/sourmash)
![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)
![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)
diff --git a/doc/release.md b/doc/release.md
index f3f19dcec9..b2cf777ee1 100644
--- a/doc/release.md
+++ b/doc/release.md
@@ -11,14 +11,14 @@ Here's a checklist to copy/paste into an issue:
Release candidate testing:
- [ ] Command line tests pass for a release candidate
-- [ ] All eight release candidate wheels are built
+- [ ] All six release candidate wheels are built
Releasing to PyPI:
- [ ] RC tag(s)s deleted on github
- [ ] Release tag cut
- [ ] Release notes written
-- [ ] All eight release wheels built
+- [ ] All six release wheels built
- [ ] Release wheels uploaded to pypi
- [ ] tar.gz distribution uploaded to pypi
@@ -46,7 +46,7 @@ conda version with `conda --version` and update with `conda update conda`.
Create the basic build environment:
```
-mamba create -y -n sourmash-rc python=3.10 pip \
+mamba create -y -n sourmash-rc python=3.12 pip \
cxx-compiler make twine tox tox-conda rust
```
diff --git a/flake.lock b/flake.lock
index 41f929d8e7..eb0632cfe2 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1728979988,
- "narHash": "sha256-GBJRnbFLDg0y7ridWJHAP4Nn7oss50/VNgqoXaf/RVk=",
+ "lastModified": 1736241350,
+ "narHash": "sha256-CHd7yhaDigUuJyDeX0SADbTM9FXfiWaeNyY34FL1wQU=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "7881fbfd2e3ed1dfa315fca889b2cfd94be39337",
+ "rev": "8c9fd3e564728e90829ee7dbac6edc972971cd0f",
"type": "github"
},
"original": {
@@ -30,11 +30,11 @@
]
},
"locked": {
- "lastModified": 1729184663,
- "narHash": "sha256-uNyi5vQrzaLkt4jj6ZEOs4+4UqOAwP6jFG2s7LIDwIk=",
+ "lastModified": 1736303309,
+ "narHash": "sha256-IKrk7RL+Q/2NC6+Ql6dwwCNZI6T6JH2grTdJaVWHF0A=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "16fb78d443c1970dda9a0bbb93070c9d8598a925",
+ "rev": "a0b81d4fa349d9af1765b0f0b4a899c13776f706",
"type": "github"
},
"original": {
@@ -63,11 +63,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1726560853,
- "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 732f4b59de..0a254e1016 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,8 +21,9 @@
};
rustVersion = pkgs.rust-bin.stable.latest.default.override {
#extensions = [ "rust-src" ];
+ extensions = [ "llvm-tools-preview" ];
#targets = [ "x86_64-unknown-linux-musl" ];
- targets = [ "wasm32-wasi" "wasm32-unknown-unknown" "wasm32-unknown-emscripten" ];
+ targets = [ "wasm32-unknown-unknown" "wasm32-unknown-emscripten" ];
};
rustPlatform = pkgs.makeRustPlatform {
cargo = rustVersion;
@@ -62,7 +63,7 @@
sourmash = python.buildPythonPackage ( commonArgs // rec {
pname = "sourmash";
- version = "4.8.12";
+ version = "4.8.14";
format = "pyproject";
cargoDeps = rustPlatform.importCargoLock {
@@ -106,7 +107,7 @@
(python311.withPackages (ps: with ps; [ virtualenv tox cffi ]))
(python310.withPackages (ps: with ps; [ virtualenv ]))
- rust-cbindgen
+ #rust-cbindgen
maturin
wasmtime
@@ -122,9 +123,11 @@
cargo-outdated
cargo-udeps
cargo-deny
- cargo-wasi
+ cargo-nextest
+ #cargo-llvm-cov
+ cargo-component
cargo-codspeed
- cargo-semver-checks
+ #cargo-semver-checks
nixpkgs-fmt
];
diff --git a/pyproject.toml b/pyproject.toml
index c9d5c84615..54555b8aa7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,7 +9,7 @@ build-backend = 'maturin'
name = "sourmash"
description = "tools for comparing biological sequences with k-mer sketches"
readme = "README.md"
-version = "4.8.12"
+version = "4.8.15-dev"
authors = [
{ name="Luiz Irber" },
diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml
index 5bf4bf6fa1..7802b137d5 100644
--- a/src/core/Cargo.toml
+++ b/src/core/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2021"
readme = "README.md"
autoexamples = false
autobins = false
-rust-version = "1.66.0"
+rust-version = "1.71.1"
[lib]
name = "sourmash"
@@ -36,10 +36,10 @@ csv = "1.3.1"
enum_dispatch = "0.3.13"
finch = { version = "0.6.0", optional = true }
fixedbitset = "0.4.0"
-getset = "0.1.3"
-histogram = "0.11.1"
-itertools = "0.13.0"
-log = "0.4.22"
+getset = "0.1.4"
+histogram = "0.11.2"
+itertools = "0.14.0"
+log = "0.4.25"
md5 = "0.7.0"
memmap2 = "0.9.5"
murmurhash3 = "0.0.5"
@@ -48,15 +48,15 @@ niffler = { version = "2.4.0", default-features = false, features = [ "gz" ] }
nohash-hasher = "0.2.0"
num-iter = "0.1.45"
once_cell = "1.18.0"
-ouroboros = "0.18.4"
+ouroboros = "0.18.5"
piz = "0.5.0"
primal-check = "0.3.4"
rayon = { version = "1.10.0", optional = true }
rkyv = { version = "0.7.44", optional = true }
-roaring = "0.10.9"
+roaring = "0.10.10"
roots = "0.0.8"
serde = { version = "1.0.217", features = ["derive"] }
-serde_json = "1.0.134"
+serde_json = "1.0.137"
statrs = "0.18.0"
streaming-stats = "0.2.3"
thiserror = "2.0"
@@ -67,8 +67,8 @@ vec-collections = "0.4.3"
[dev-dependencies]
codspeed-criterion-compat = "2.7.2"
proptest = { version = "1.6.0", default-features = false, features = ["std"]}
-rand = "0.8.2"
-tempfile = "3.14.0"
+rand = "0.9.0"
+tempfile = "3.15.0"
[[bench]]
name = "compute"
@@ -108,7 +108,11 @@ chrono = { version = "0.4.32", features = ["wasmbind"] }
wasm-bindgen-test = "0.3.42"
### These crates don't compile on wasm
-[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
-rocksdb = { version = "0.22.0", optional = true }
+[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rocksdb]
+version = "0.23.0"
+optional = true
+default-features = false
+features = [ "bindgen-runtime", "snappy", "zstd" ]
+
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.5.1"
diff --git a/src/core/README.md b/src/core/README.md
index 0fa56ad29b..64594342f5 100644
--- a/src/core/README.md
+++ b/src/core/README.md
@@ -38,4 +38,4 @@ Development happens on github at
## Minimum supported Rust version
-Currently the minimum supported Rust version is 1.66.0.
+Currently the minimum supported Rust version is 1.71.1.
diff --git a/src/core/src/encodings.rs b/src/core/src/encodings.rs
index 06af5d03c1..e55977c5bc 100644
--- a/src/core/src/encodings.rs
+++ b/src/core/src/encodings.rs
@@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
-use std::hash::{BuildHasher, BuildHasherDefault, Hash, Hasher};
+use std::hash::{BuildHasher, BuildHasherDefault, Hash};
use std::str;
use nohash_hasher::BuildNoHashHasher;
@@ -469,9 +469,7 @@ impl Colors {
fn compute_color(idxs: &IdxTracker) -> Color {
let s = BuildHasherDefault::::default();
- let mut hasher = s.build_hasher();
- idxs.0.hash(&mut hasher);
- hasher.finish()
+ s.hash_one(&idxs.0)
}
pub fn len(&self) -> usize {
diff --git a/src/core/src/index/revindex/disk_revindex.rs b/src/core/src/index/revindex/disk_revindex.rs
index dbc2b50ba7..e534a4f636 100644
--- a/src/core/src/index/revindex/disk_revindex.rs
+++ b/src/core/src/index/revindex/disk_revindex.rs
@@ -1,5 +1,5 @@
use std::cmp::max;
-use std::hash::{BuildHasher, BuildHasherDefault, Hash, Hasher};
+use std::hash::{BuildHasher, BuildHasherDefault};
use std::path::Path;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, RwLock};
@@ -30,9 +30,7 @@ const DB_VERSION: u8 = 1;
fn compute_color(idxs: &Datasets) -> Color {
let s = BuildHasherDefault::::default();
- let mut hasher = s.build_hasher();
- idxs.hash(&mut hasher);
- hasher.finish()
+ s.hash_one(idxs)
}
#[derive(Clone)]
@@ -354,8 +352,7 @@ impl RevIndexOps for RevIndex {
let name = [row.name(), row.filename(), row.md5()]
.into_iter()
- .skip_while(|v| v.is_empty())
- .next()
+ .find(|v| !v.is_empty())
.unwrap(); // guaranteed to succeed because `md5` always exists
Some((name.into(), size))
diff --git a/src/sourmash/cli/compare.py b/src/sourmash/cli/compare.py
index 45844aaa1d..aca5863c78 100644
--- a/src/sourmash/cli/compare.py
+++ b/src/sourmash/cli/compare.py
@@ -92,7 +92,7 @@ def subparser(subparsers):
subparser.add_argument(
"--csv",
metavar="F",
- help="write matrix to specified file in CSV format (with column " "headers)",
+ help="write matrix to specified file in CSV format (with column headers)",
)
subparser.add_argument(
"--labels-to",
diff --git a/src/sourmash/cli/compute.py b/src/sourmash/cli/compute.py
index cfdb48f42a..f5f20647c1 100644
--- a/src/sourmash/cli/compute.py
+++ b/src/sourmash/cli/compute.py
@@ -105,7 +105,7 @@ def subparser(subparsers):
type=str,
default="",
metavar="FILE",
- help="merge all input files into one signature file with the " "specified name",
+ help="merge all input files into one signature file with the specified name",
)
file_args.add_argument(
"--name-from-first",
diff --git a/src/sourmash/cli/gather.py b/src/sourmash/cli/gather.py
index 159d8c2c0e..2f449aca7f 100644
--- a/src/sourmash/cli/gather.py
+++ b/src/sourmash/cli/gather.py
@@ -100,8 +100,7 @@ def subparser(subparsers):
subparser.add_argument(
"--save-matches",
metavar="FILE",
- help="save gather matched signatures from the database to the "
- "specified file",
+ help="save gather matched signatures from the database to the specified file",
)
subparser.add_argument(
"--save-prefetch",
diff --git a/src/sourmash/cli/prefetch.py b/src/sourmash/cli/prefetch.py
index 55ee063d0b..30d7fcc96d 100644
--- a/src/sourmash/cli/prefetch.py
+++ b/src/sourmash/cli/prefetch.py
@@ -58,12 +58,12 @@ def subparser(subparsers):
subparser.add_argument(
"--save-unmatched-hashes",
metavar="FILE",
- help="output unmatched query hashes as a signature to the " "specified file",
+ help="output unmatched query hashes as a signature to the specified file",
)
subparser.add_argument(
"--save-matching-hashes",
metavar="FILE",
- help="output matching query hashes as a signature to the " "specified file",
+ help="output matching query hashes as a signature to the specified file",
)
subparser.add_argument(
"--md5", default=None, help="select the signature with this md5 as query"
diff --git a/src/sourmash/command_compute.py b/src/sourmash/command_compute.py
index 78edc8dcaa..e3eede0715 100644
--- a/src/sourmash/command_compute.py
+++ b/src/sourmash/command_compute.py
@@ -78,10 +78,10 @@ def compute(args):
notify("Computing both nucleotide and protein signatures.")
num_sigs = 2 * len(ksizes)
elif args.dna and args.dayhoff:
- notify("Computing both nucleotide and Dayhoff-encoded protein " "signatures.")
+ notify("Computing both nucleotide and Dayhoff-encoded protein signatures.")
num_sigs = 2 * len(ksizes)
elif args.dna and args.hp:
- notify("Computing both nucleotide and hp-encoded protein " "signatures.")
+ notify("Computing both nucleotide and hp-encoded protein signatures.")
num_sigs = 2 * len(ksizes)
elif args.dna:
notify("Computing only nucleotide (and not protein) signatures.")
@@ -91,11 +91,11 @@ def compute(args):
num_sigs = len(ksizes)
elif args.dayhoff:
notify(
- "Computing only Dayhoff-encoded protein (and not nucleotide) " "signatures."
+ "Computing only Dayhoff-encoded protein (and not nucleotide) signatures."
)
num_sigs = len(ksizes)
elif args.hp:
- notify("Computing only hp-encoded protein (and not nucleotide) " "signatures.")
+ notify("Computing only hp-encoded protein (and not nucleotide) signatures.")
num_sigs = len(ksizes)
if args.protein or args.dayhoff or args.hp:
@@ -269,7 +269,7 @@ def _compute_individual(args, signatures_factory):
save_sigs_to_location(sigs, save_sigs)
notify(
- f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
+ f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
)
# if not args.output, close output for every input filename.
@@ -443,7 +443,7 @@ def to_param_str(self):
kstr = [f"k={k}" for k in self.ksizes]
else:
# for protein, divide ksize by three.
- kstr = [f"k={k//3}" for k in self.ksizes]
+ kstr = [f"k={k // 3}" for k in self.ksizes]
assert kstr
pi.extend(kstr)
diff --git a/src/sourmash/command_sketch.py b/src/sourmash/command_sketch.py
index d962d2ec77..d7aeba3588 100644
--- a/src/sourmash/command_sketch.py
+++ b/src/sourmash/command_sketch.py
@@ -207,7 +207,7 @@ def _execute_sketch(args, signatures_factory):
error("error: sourmash only supports CC0-licensed signatures. sorry!")
sys.exit(-1)
- notify(f'computing signatures for files: {", ".join(args.filenames)}')
+ notify(f"computing signatures for files: {', '.join(args.filenames)}")
if args.merge and not args.output:
error("ERROR: must specify -o with --merge")
@@ -353,7 +353,7 @@ def _compute_sigs(to_build, output, *, check_sequence=False):
save_sigs.add(sig)
notify(
- f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
+ f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
)
save_sigs.close()
@@ -768,7 +768,7 @@ def _compute_individual(args, signatures_factory):
save_sigs_to_location(sigs, save_sigs)
notify(
- f"calculated {len(sigs)} signatures for {n+1} sequences in {filename}"
+ f"calculated {len(sigs)} signatures for {n + 1} sequences in {filename}"
)
# if not args.output, close output for every input filename.
@@ -942,7 +942,7 @@ def to_param_str(self):
kstr = [f"k={k}" for k in self.ksizes]
else:
# for protein, divide ksize by three.
- kstr = [f"k={k//3}" for k in self.ksizes]
+ kstr = [f"k={k // 3}" for k in self.ksizes]
assert kstr
pi.extend(kstr)
diff --git a/src/sourmash/commands.py b/src/sourmash/commands.py
index 26661f4317..147de9fb3f 100644
--- a/src/sourmash/commands.py
+++ b/src/sourmash/commands.py
@@ -1077,7 +1077,7 @@ def gather(args):
)
print_results(
- f"the recovered matches hit {sum_f_uniq_found*100:.1f}% of the query k-mers (unweighted)."
+ f"the recovered matches hit {sum_f_uniq_found * 100:.1f}% of the query k-mers (unweighted)."
)
print_results("")
@@ -1345,7 +1345,7 @@ def multigather(args):
)
print_results(
- f"the recovered matches hit {sum_f_uniq_found*100:.1f}% of the query k-mers (unweighted)."
+ f"the recovered matches hit {sum_f_uniq_found * 100:.1f}% of the query k-mers (unweighted)."
)
print_results("")
diff --git a/src/sourmash/distance_utils.py b/src/sourmash/distance_utils.py
index ad267bd0fe..41c325ccfa 100644
--- a/src/sourmash/distance_utils.py
+++ b/src/sourmash/distance_utils.py
@@ -16,7 +16,7 @@
def check_distance(dist):
if not 0 <= dist <= 1:
- raise ValueError(f"Error: distance value {dist :.4f} is not between 0 and 1!")
+ raise ValueError(f"Error: distance value {dist:.4f} is not between 0 and 1!")
else:
return dist
diff --git a/src/sourmash/minhash.py b/src/sourmash/minhash.py
index c036fa6c3d..448f64c00d 100644
--- a/src/sourmash/minhash.py
+++ b/src/sourmash/minhash.py
@@ -742,6 +742,8 @@ def downsample(self, *, num=None, scaled=None):
is_protein=self.is_protein,
dayhoff=self.dayhoff,
hp=self.hp,
+ skipm1n3=self.skipm1n3,
+ skipm2n3=self.skipm2n3,
track_abundance=self.track_abundance,
seed=self.seed,
max_hash=max_hash,
@@ -764,6 +766,8 @@ def flatten(self):
is_protein=self.is_protein,
dayhoff=self.dayhoff,
hp=self.hp,
+ skipm1n3=self.skipm1n3,
+ skipm2n3=self.skipm2n3,
track_abundance=False,
seed=self.seed,
max_hash=self._max_hash,
diff --git a/src/sourmash/plugins.py b/src/sourmash/plugins.py
index 0871154f2d..fe9b073563 100644
--- a/src/sourmash/plugins.py
+++ b/src/sourmash/plugins.py
@@ -198,7 +198,7 @@ def list_all_plugins():
notify(
f"{'plugin type':<20s} {'from python module':<30s} {'v':<5s} {'entry point name':<20s}"
)
- notify(f"{'-'*20} {'-'*30} {'-'*5} {'-'*20}")
+ notify(f"{'-' * 20} {'-' * 30} {'-' * 5} {'-' * 20}")
for plugin in plugins:
name = plugin.name
diff --git a/src/sourmash/sbt.py b/src/sourmash/sbt.py
index 21e6b25c16..6ca4a746d7 100644
--- a/src/sourmash/sbt.py
+++ b/src/sourmash/sbt.py
@@ -763,7 +763,9 @@ def save(self, path, storage=None, sparseness=0.0, structure_only=False):
manifest_rows.append(row)
if n % 100 == 0:
- notify(f"{format(n+1)} of {format(total_nodes)} nodes saved", end="\r")
+ notify(
+ f"{format(n + 1)} of {format(total_nodes)} nodes saved", end="\r"
+ )
# now, save the index file and manifests.
#
diff --git a/src/sourmash/sig/__main__.py b/src/sourmash/sig/__main__.py
index e63fc433a4..dcc166f701 100644
--- a/src/sourmash/sig/__main__.py
+++ b/src/sourmash/sig/__main__.py
@@ -1298,7 +1298,7 @@ def kmers(args):
found_hashes = set(found_mh.hashes)
cont = len(query_hashes.intersection(found_hashes)) / len(query_hashes)
- notify(f"found {len(found_mh)} distinct matching hashes ({cont*100:.1f}%)")
+ notify(f"found {len(found_mh)} distinct matching hashes ({cont * 100:.1f}%)")
if not kmer_w and not save_seqs:
notify("NOTE: see --save-kmers or --save-sequences for output options.")
diff --git a/src/sourmash/tax/__main__.py b/src/sourmash/tax/__main__.py
index c4e22d07fa..8d3692011e 100644
--- a/src/sourmash/tax/__main__.py
+++ b/src/sourmash/tax/__main__.py
@@ -93,7 +93,7 @@ def metagenome(args):
if not tax_assign:
error(
- f'ERROR: No taxonomic assignments loaded from {",".join(args.taxonomy_csv)}. Exiting.'
+ f"ERROR: No taxonomic assignments loaded from {','.join(args.taxonomy_csv)}. Exiting."
)
sys.exit(-1)
@@ -284,7 +284,7 @@ def genome(args):
if not tax_assign:
error(
- f'ERROR: No taxonomic assignments loaded from {",".join(args.taxonomy_csv)}. Exiting.'
+ f"ERROR: No taxonomic assignments loaded from {','.join(args.taxonomy_csv)}. Exiting."
)
sys.exit(-1)
@@ -345,7 +345,7 @@ def genome(args):
else:
classif_perc = (float(n_classified) / float(n_total)) * 100
notify(
- f"classified {n_classified}/{n_total} queries ({classif_perc :.2f}%). Writing results"
+ f"classified {n_classified}/{n_total} queries ({classif_perc:.2f}%). Writing results"
)
# write outputs
@@ -442,7 +442,7 @@ def annotate(args):
if not tax_assign:
error(
- f'ERROR: No taxonomic assignments loaded from {",".join(args.taxonomy_csv)}. Exiting.'
+ f"ERROR: No taxonomic assignments loaded from {','.join(args.taxonomy_csv)}. Exiting."
)
sys.exit(-1)
@@ -518,7 +518,7 @@ def annotate(args):
)
else:
notify(
- f"Annotated {rows_annotated} of {n+1} total rows from '{in_csv}'."
+ f"Annotated {rows_annotated} of {n + 1} total rows from '{in_csv}'."
)
except ValueError as exc:
diff --git a/src/sourmash/tax/tax_utils.py b/src/sourmash/tax/tax_utils.py
index 60a967c6b4..8ad43c3b36 100644
--- a/src/sourmash/tax/tax_utils.py
+++ b/src/sourmash/tax/tax_utils.py
@@ -22,8 +22,8 @@
"ascending_taxlist",
"collect_gather_csvs",
"load_gather_results",
- "check_and_load_gather_csvs" "report_missing_and_skipped_identities",
- "aggregate_by_lineage_at_rank" "format_for_krona",
+ "check_and_load_gather_csvsreport_missing_and_skipped_identities",
+ "aggregate_by_lineage_at_rankformat_for_krona",
"write_output",
"write_bioboxes",
"parse_lingroups",
@@ -793,7 +793,7 @@ def read_lingroups(lingroup_csv):
if n is None:
raise ValueError(f"No lingroups loaded from {lingroup_csv}.")
n_lg = len(lingroupD.keys())
- notify(f"Read {n+1} lingroup rows and found {n_lg} distinct lingroup prefixes.")
+ notify(f"Read {n + 1} lingroup rows and found {n_lg} distinct lingroup prefixes.")
return lingroupD
@@ -978,7 +978,7 @@ def report_missing_and_skipped_identities(gather_results):
f"of {total_taxresults} gather results, lineage assignments for {total_n_missed} results were missed."
)
notify(
- f'The following are missing from the taxonomy information: {", ".join(ident_missed)}'
+ f"The following are missing from the taxonomy information: {', '.join(ident_missed)}"
)
@@ -2106,9 +2106,9 @@ def as_summary_dict(self, query_info, limit_float=False, lingroups=None):
def as_human_friendly_dict(self, query_info):
sD = self.as_summary_dict(query_info=query_info, limit_float=True)
- sD["f_weighted_at_rank"] = f"{self.f_weighted_at_rank*100:>4.1f}%"
+ sD["f_weighted_at_rank"] = f"{self.f_weighted_at_rank * 100:>4.1f}%"
if self.query_ani_at_rank is not None:
- sD["query_ani_at_rank"] = f"{self.query_ani_at_rank*100:>3.1f}%"
+ sD["query_ani_at_rank"] = f"{self.query_ani_at_rank * 100:>3.1f}%"
else:
sD["query_ani_at_rank"] = "- "
return sD
diff --git a/tests/test_sourmash_compute.py b/tests/test_sourmash_compute.py
index 35f5635237..172b520d07 100644
--- a/tests/test_sourmash_compute.py
+++ b/tests/test_sourmash_compute.py
@@ -453,8 +453,7 @@ def test_do_sourmash_compute_multik_with_hp():
in_directory=location,
)
assert (
- "Computing only hp-encoded protein (and not nucleotide) "
- "signatures." in err
+ "Computing only hp-encoded protein (and not nucleotide) signatures." in err
)
outfile = os.path.join(location, "short.fa.sig")
assert os.path.exists(outfile)
diff --git a/tests/test_tax_utils.py b/tests/test_tax_utils.py
index dfca20628a..34c4743b7c 100644
--- a/tests/test_tax_utils.py
+++ b/tests/test_tax_utils.py
@@ -2221,7 +2221,7 @@ def test_RankLineageInfo_init_lineage_str_2():
taxinf = RankLineageInfo(lineage_str=x)
print(taxinf.lineage)
print(taxinf.lineage_str)
- assert taxinf.zip_lineage() == ["a", "b", "", "c" "", "", "", "", ""]
+ assert taxinf.zip_lineage() == ["a", "b", "", "c", "", "", "", ""]
def test_RankLineageInfo_init_lineage_str_2_truncate():