From c7363154b546058eb417b78bb77aca6523591cb1 Mon Sep 17 00:00:00 2001 From: Luiz Irber Date: Mon, 11 Nov 2024 21:26:31 +0000 Subject: [PATCH 1/6] build: simplify Rust release (#3392) Avoid duplicating actions between two workflows, prefer to only run actual publishing steps if tag matches Rust releases --- .github/workflows/rust.yml | 25 ++++++++++- .github/workflows/rust_publish.yml | 70 ------------------------------ 2 files changed, 24 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/rust_publish.yml 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 From c8b8f4e15d90dd64a6e6abd2bdfa122891e9b7f1 Mon Sep 17 00:00:00 2001 From: "C. Titus Brown" Date: Mon, 11 Nov 2024 13:54:49 -0800 Subject: [PATCH 2/6] MRG: release core r0.17.1 (#3388) ## [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) --- Cargo.lock | 2 +- src/core/CHANGELOG.md | 6 ++++++ src/core/Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d35a5a679..5b5aac0e0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1657,7 +1657,7 @@ checksum = "9f1341053f34bb13b5e9590afb7d94b48b48d4b87467ec28e3c238693bb553de" [[package]] name = "sourmash" -version = "0.17.0" +version = "0.17.1" dependencies = [ "az", "byteorder", 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..c861880c86 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 ", "N. Tessa Pierce-Ward "] description = "tools for comparing biological sequences with k-mer sketches" repository = "https://github.com/sourmash-bio/sourmash" From 864064895bd8899b9efedadbcb6a22c3ea6acc83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:55:54 -0800 Subject: [PATCH 3/6] [pre-commit.ci] pre-commit autoupdate (#3393) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.7.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.7.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: C. Titus Brown --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From db9e77a11139019f26c18a62347732e49c9e4b56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:36:50 -0800 Subject: [PATCH 4/6] Bump tempfile from 3.13.0 to 3.14.0 (#3391) Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.13.0 to 3.14.0.
Changelog

Sourced from tempfile's changelog.

3.14.0

  • Make the wasip2 target work (requires tempfile's "nightly" feature to be enabled). #305.
  • Allow older windows-sys versions #304.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tempfile&package-manager=cargo&previous-version=3.13.0&new-version=3.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 14 +++++++------- src/core/Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5b5aac0e0c..1a05c5f319 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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" @@ -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", @@ -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", ] diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index c861880c86..7d03eaf7e0 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -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" From 11cab800ecc3c2e28586587d1063b9d885cd3080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 16:26:27 -0800 Subject: [PATCH 5/6] Bump csv from 1.3.0 to 1.3.1 (#3390) Bumps [csv](https://github.com/BurntSushi/rust-csv) from 1.3.0 to 1.3.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=csv&package-manager=cargo&previous-version=1.3.0&new-version=1.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- src/core/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a05c5f319..8b0547eae2 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", diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index 7d03eaf7e0..60a6be5a14 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -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" From de1a5979b847d1ab1cea726711f7514b5ab69744 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:52:44 -0800 Subject: [PATCH 6/6] Bump thiserror from 1.0.68 to 2.0.3 (#3389) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.68 to 2.0.3.
Release notes

Sourced from thiserror's releases.

2.0.3

  • Support the same Path field being repeated in both Debug and Display representation in error message (#383)
  • Improve error message when a format trait used in error message is not implemented by some field (#384)

2.0.2

  • Fix hang on invalid input inside #[error(...)] attribute (#382)

2.0.1

  • Support errors that contain a dynamically sized final field (#375)
  • Improve inference of trait bounds for fields that are interpolated multiple times in an error message (#377)

2.0.0

Breaking changes

  • Referencing keyword-named fields by a raw identifier like {r#type} inside a format string is no longer accepted; simply use the unraw name like {type} (#347)

    This aligns thiserror with the standard library's formatting macros, which gained support for implicit argument capture later than the release of this feature in thiserror 1.x.

    #[derive(Error, Debug)]
    #[error("... {type} ...")]  // Before: {r#type}
    pub struct Error {
        pub r#type: Type,
    }
    
  • Trait bounds are no longer inferred on fields whose value is shadowed by an explicit named argument in a format message (#345)

    // Before: impl<T: Octal> Display for
    Error<T>
    // After: impl<T> Display for Error<T>
    #[derive(Error, Debug)]
    #[error("{thing:o}", thing = "...")]
    pub struct Error<T> {
        thing: T,
    }
    
  • Tuple structs and tuple variants can no longer use numerical {0} {1} access at the same time as supplying extra positional arguments for a format message, as this makes it ambiguous whether the number refers to a tuple field vs a different positional arg (#354)

    #[derive(Error, Debug)]
    #[error("ambiguous: {0} {}", $N)]
    // ^^^ Not allowed, use #[error("... {0} {n}", n = $N)]
    pub struct TupleError(i32);
    
  • Code containing invocations of thiserror's derive(Error) must now have a direct dependency on the thiserror crate regardless of the error data structure's contents (#368, #369, #370, #372)

Features

... (truncated)

Commits
  • 15fd26e Release 2.0.3
  • 7046023 Simplify how has_bonus_display is accumulated
  • 9cc1d0b Merge pull request #384 from dtolnay/nowrap
  • 1d040f3 Use Var wrapper only for Pointer formatting
  • 6a6132d Extend no-display ui test to cover another fmt trait
  • a061beb Merge pull request #383 from dtolnay/both
  • 6388293 Support Display and Debug of same path in error message
  • dc0359e Defer binding_value construction
  • 520343e Add test of Debug and Display of paths
  • 49be39d Release 2.0.2
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=thiserror&package-manager=cargo&previous-version=1.0.68&new-version=2.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 40 ++++++++++++++++++++++++++++++---------- src/core/Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b0547eae2..931de74a05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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]] @@ -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]] @@ -1700,7 +1700,7 @@ dependencies = [ "statrs", "streaming-stats", "tempfile", - "thiserror", + "thiserror 2.0.3", "twox-hash", "typed-builder", "vec-collections", @@ -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/Cargo.toml b/src/core/Cargo.toml index 60a6be5a14..7167f3916e 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -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"