diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1a1b27b8fd..b2fb07f08c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -179,6 +179,13 @@ jobs: working-directory: pkg run: npm pack + - name: Publish to NPM + if: startsWith(github.ref, 'refs/tags/r') + working-directory: pkg + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: actions/upload-artifact@v4 with: path: 'pkg/sourmash*.tgz' @@ -216,7 +223,7 @@ jobs: args: test publish: - name: Publish (dry-run) + name: Publish (on tags, dry-run otherwise) runs-on: ubuntu-latest steps: - name: Checkout sources @@ -243,6 +250,22 @@ jobs: command: publish args: --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 }} + + # 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 + minimum_rust_version: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/rust_publish.yml b/.github/workflows/rust_publish.yml deleted file mode 100644 index 734e22ccf0..0000000000 --- a/.github/workflows/rust_publish.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Rust publish - -on: - push: - tags: - - 'r*' - -jobs: - wasm-pack: - name: Check if wasm-pack builds a valid package for the sourmash crate - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - uses: actions-rs/cargo@v1 - with: - command: install - args: --force wasm-pack --version 0.10.0 - - name: run wasm-pack - run: | - wasm-pack build src/core -d ../../pkg - - - name: Prepare node for NPM publishing - uses: actions/setup-node@v4 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - - name: Publish to NPM - working-directory: pkg - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - crates: - name: Publish to crates.io - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - 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 - - # Login to crates.io on tags - - name: login to crates.io - uses: actions-rs/cargo@v1 - with: - command: login - args: ${{ secrets.CRATES_IO_TOKEN }} - - # Publish to crates.io on tags - - name: Publish to crates.io - uses: actions-rs/cargo@v1 - with: - command: publish - args: --manifest-path src/core/Cargo.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49982f7075..076dafd5e3 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.7.2 + rev: v0.7.3 hooks: - id: ruff-format - id: ruff diff --git a/Cargo.lock b/Cargo.lock index 0d35a5a679..931de74a05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -496,9 +496,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -607,7 +607,7 @@ dependencies = [ "rayon", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -698,7 +698,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58cf6b99a250776d813cdf2f0b478a053a822d078e7a2baf5cb36afc88c41a7c" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -822,9 +822,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libloading" @@ -1051,7 +1051,7 @@ checksum = "bd625dd485c2d20bdb98d7ec364f798b256ac09997ef18b4274be2168f53a647" dependencies = [ "cfg-if", "flate2", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1182,7 +1182,7 @@ dependencies = [ "flate2", "log", "memchr", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1521,9 +1521,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" dependencies = [ "bitflags 2.4.1", "errno", @@ -1657,7 +1657,7 @@ checksum = "9f1341053f34bb13b5e9590afb7d94b48b48d4b87467ec28e3c238693bb553de" [[package]] name = "sourmash" -version = "0.17.0" +version = "0.17.1" dependencies = [ "az", "byteorder", @@ -1700,7 +1700,7 @@ dependencies = [ "statrs", "streaming-stats", "tempfile", - "thiserror", + "thiserror 2.0.3", "twox-hash", "typed-builder", "vec-collections", @@ -1766,14 +1766,14 @@ 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", "once_cell", - "rustix 0.38.37", + "rustix 0.38.40", "windows-sys 0.59.0", ] @@ -1788,18 +1788,38 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "thiserror-impl" -version = "1.0.68" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", diff --git a/src/core/CHANGELOG.md b/src/core/CHANGELOG.md index 4c392caf2b..21529a51ba 100644 --- a/src/core/CHANGELOG.md +++ b/src/core/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.17.1] - 2024-11-11 + +Changes/additions: +* fix: Avoid re-calculating md5sum on clone and conversion to KmerMinHashBTree (#3385) +* build: simplify Rust release (#3392) + ## [0.17.0] - 2024-11-05 Changes/additions: diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index ad588cb22b..7167f3916e 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sourmash" -version = "0.17.0" +version = "0.17.1" authors = ["Luiz Irber <luiz@sourmash.bio>", "N. Tessa Pierce-Ward <tessa@sourmash.bio>"] description = "tools for comparing biological sequences with k-mer sketches" repository = "https://github.com/sourmash-bio/sourmash" @@ -32,7 +32,7 @@ byteorder = "1.4.3" camino = { version = "1.1.9", features = ["serde1"] } cfg-if = "1.0" counter = "0.6.0" -csv = "1.3.0" +csv = "1.3.1" enum_dispatch = "0.3.13" finch = { version = "0.6.0", optional = true } fixedbitset = "0.4.0" @@ -59,7 +59,7 @@ serde = { version = "1.0.214", features = ["derive"] } serde_json = "1.0.132" statrs = "0.17.1" streaming-stats = "0.2.3" -thiserror = "1.0" +thiserror = "2.0" twox-hash = "1.6.0" typed-builder = "0.18.0" vec-collections = "0.4.3" @@ -68,7 +68,7 @@ vec-collections = "0.4.3" codspeed-criterion-compat = "2.7.2" proptest = { version = "1.5.0", default-features = false, features = ["std"]} rand = "0.8.2" -tempfile = "3.13.0" +tempfile = "3.14.0" [[bench]] name = "compute"