Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ jobs:
- name: Verify the workspace builds before releasing
run: cargo build --release --workspace --all-targets --exclude timsrust-sdk

- name: Bump shared version, commit, tag and push
- name: Bump shared version, publish to crates.io, commit, tag and push
env:
# Token used by `cargo publish`; create it on crates.io and store it as
# a repository Actions secret (Settings > Secrets and variables > Actions).
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release patch --workspace --no-publish --no-confirm
cargo release patch --workspace --no-publish --no-confirm --execute
if [ -z "${CARGO_REGISTRY_TOKEN}" ]; then
echo "Missing CARGO_REGISTRY_TOKEN secret; required to publish to crates.io." >&2
exit 1
fi
# Dry-run first to surface problems before anything is published or pushed.
cargo release patch --workspace --no-confirm
cargo release patch --workspace --no-confirm --execute
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ resolver = "3"
[workspace.package]
version = "0.6.1"
edition = "2024"
repository = "https://github.com/MannLabs/timsrust"

[workspace.metadata.release]
# Bump every crate together to one shared version and emit a single tag.
shared-version = true
Expand Down
1 change: 1 addition & 0 deletions clis/timsrust-centroid-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-centroid-cli"
version.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions clis/timsrust-cli-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-cli-core"
version.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions clis/timsrust-mgf-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-mgf-cli"
version.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions clis/timsrust-parquet-spectra-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-parquet-spectra-cli"
version.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions crates/filemanager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "filemanager"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Unified file abstraction for local and cloud files with caching options and support for multiple formats."
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-centroid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-centroid"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Centroiding algorithms for timsTOF ion mobility spectra"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-core"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Core data types and abstractions for timsTOF data"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-mgf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-mgf"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "MGF (Mascot Generic Format) writer for timsTOF spectra"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-minitdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-minitdf"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Reader for the ProteoScape miniTDF timsTOF file format"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-parquet-spectra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-parquet-spectra"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Parquet-backed spectrum and precursor reader for timsTOF data"
license = "Apache-2.0"

Expand Down
9 changes: 9 additions & 0 deletions crates/timsrust-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
name = "timsrust-sdk"
version.workspace = true
edition.workspace = true
repository.workspace = true
build = "build.rs"
description = "Bruker TimsData SDK bindings for native timsTOF data access"
license = "Apache-2.0"

[package.metadata.release]
# The proprietary Bruker native SDK is not available on the CI runners, so this
# crate cannot be built there. Publish the source without a verification build
# (`cargo publish --no-verify`). Consumers link the real library themselves via
# the crate's `lib/` directory or the TIMSDATA_LIB_DIR env var; build.rs
# tolerates a missing library so docs.rs and plain `cargo build` still succeed.
verify = false

[dependencies]
timsrust-core = { workspace = true, features = ["io"] }
serde = { workspace = true, features = ["derive"] }
Expand Down
38 changes: 27 additions & 11 deletions crates/timsrust-sdk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,34 @@ fn main() {

// Source file you want to copy
let source = lib_path.join(&runtime_lib_name);
// Destination in the target folder
let destination = target_dir.join(&runtime_lib_name);
// Create directory if missing
fs::create_dir_all(&target_dir).unwrap();
// Copy the file
fs::copy(&source, &destination).unwrap_or_else(|e| {
panic!("Failed to copy {:?} to {:?}: {}", source, destination, e)
});

// Logging
println!("cargo:warning=Target dir: {}", target_dir.display());
println!("cargo:warning=Source dir: {}", source.display());
// The runtime library is gitignored and absent when the crate is built
// without the proprietary Bruker SDK (e.g. `cargo publish --no-verify`,
// docs.rs, or a plain `cargo build` by a downstream user). Skip the copy
// instead of failing; real usage requires the library to be present in
// `lib/` or pointed at by TIMSDATA_LIB_DIR.
if source.exists() {
// Destination in the target folder
let destination = target_dir.join(&runtime_lib_name);
// Create directory if missing
fs::create_dir_all(&target_dir).unwrap();
// Copy the file
fs::copy(&source, &destination).unwrap_or_else(|e| {
panic!("Failed to copy {:?} to {:?}: {}", source, destination, e)
});

// Logging
println!("cargo:warning=Target dir: {}", target_dir.display());
println!("cargo:warning=Source dir: {}", source.display());
} else {
println!(
"cargo:warning=timsrust-sdk: {} not found in {}; skipping runtime library copy. \
Set TIMSDATA_LIB_DIR to the directory containing the Bruker timsdata library to link against it.",
runtime_lib_name,
lib_path.display()
);
}

// Re-run this script if the file changes
println!("cargo:rerun-if-changed={}", source.display());
println!("cargo:rerun-if-env-changed=TIMSDATA_LIB_DIR");
Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-tdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-tdf"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Reader for the Bruker TDF timsTOF file format (.d folders)"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-tsf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-tsf"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Reader for the Bruker TSF timsTOF file format (MALDI/MS imaging)"
license = "Apache-2.0"

Expand Down
1 change: 1 addition & 0 deletions crates/timsrust-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-utils"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "Shared utilities for the timsrust crate family (readers, buffers, threading helpers)"
license = "Apache-2.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/timsrust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
name = "timsrust"
version.workspace = true
edition.workspace = true
repository.workspace = true
description = "A crate to read Bruker timsTOF data"
license = "Apache-2.0"
readme = "README.md"
documentation = "https://docs.rs/timsrust"
repository = "https://github.com/mannlabs/timsrust"
homepage = "https://github.com/mannlabs/timsrust"
categories = ["accessibility", "data-structures", "parsing", "science"]
keywords = ["MS", "LC-TIMS-TOF", "PASEF"]
Expand Down
1 change: 1 addition & 0 deletions python/timsrust-pyo3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "timsrust-pyo3"
version.workspace = true
edition.workspace = true
repository.workspace = true
publish = false

[lib]
Expand Down
Loading