Skip to content

Commit 8c7e726

Browse files
committed
Prepare for first crates.io release
Add MIT LICENSE file, set rust-version and package exclusions in Cargo.toml, fix broken intra-doc links in module documentation, replace is_none_or with map_or for MSRV 1.75 compatibility, and add release-plz GitHub Actions workflow for automated publishing.
1 parent 9654432 commit 8c7e726

7 files changed

Lines changed: 60 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Manage Release PRs and Publish Crates
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
21+
- name: Install Rust toolchain
22+
uses: dtolnay/rust-toolchain@stable
23+
- name: Run release-plz
24+
uses: MarcoIeni/release-plz-action@v0.5
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
27+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ repository = "https://github.com/fulcrumgenomics/ref-solver"
99
readme = "README.md"
1010
keywords = ["bioinformatics", "genomics", "bam", "sam", "reference-genome"]
1111
categories = ["command-line-utilities", "science"]
12+
rust-version = "1.75"
13+
exclude = ["deploy/", ".github/"]
1214

1315
[dependencies]
1416
# CLI

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Fulcrum Genomics
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/catalog/hierarchical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl HierarchicalCatalog {
239239
if match_rate >= min_match_rate {
240240
let is_better = best_match
241241
.as_ref()
242-
.is_none_or(|b| match_rate > b.match_rate);
242+
.map_or(true, |b| match_rate > b.match_rate);
243243

244244
if is_better {
245245
best_match = Some(InferredAssembly {

src/core/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
//!
33
//! This module provides the fundamental types used throughout the library:
44
//!
5-
//! - [`Contig`]: Represents a single sequence/chromosome with name, length, and optional MD5
6-
//! - [`QueryHeader`]: A sequence dictionary extracted from a BAM/SAM/CRAM file
7-
//! - [`KnownReference`]: A reference genome definition from the catalog
8-
//! - [`ReferenceId`], [`Assembly`], [`ReferenceSource`]: Reference metadata types
9-
//! - [`MatchType`], [`Confidence`]: Result classification types
5+
//! - [`contig::Contig`]: Represents a single sequence/chromosome with name, length, and optional MD5
6+
//! - [`header::QueryHeader`]: A sequence dictionary extracted from a BAM/SAM/CRAM file
7+
//! - [`reference::KnownReference`]: A reference genome definition from the catalog
8+
//! - [`types::ReferenceId`], [`types::Assembly`], [`types::ReferenceSource`]: Reference metadata types
9+
//! - [`types::MatchType`], [`types::Confidence`]: Result classification types
1010
//!
1111
//! ## Contig Naming
1212
//!

src/matching/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
//!
33
//! This module provides the core matching functionality:
44
//!
5-
//! - [`MatchingEngine`]: Main entry point for finding reference matches
6-
//! - [`MatchScore`]: Detailed similarity scores between a query and reference
7-
//! - [`MatchDiagnosis`]: Detailed analysis of differences and suggestions
5+
//! - [`engine::MatchingEngine`]: Main entry point for finding reference matches
6+
//! - [`scoring::MatchScore`]: Detailed similarity scores between a query and reference
7+
//! - [`diagnosis::MatchDiagnosis`]: Detailed analysis of differences and suggestions
88
//!
99
//! ## Matching Algorithm
1010
//!

src/parsing/ncbi_report.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl NcbiContigEntry {
238238
/// # Arguments
239239
///
240240
/// * `generate_ucsc_names` - If `true`, generate UCSC-style names for patches
241-
/// that don't have them in the assembly report. See [`all_names_with_options`]
241+
/// that don't have them in the assembly report. See [`Self::all_names_with_options`]
242242
/// for details on the naming convention.
243243
#[must_use]
244244
pub fn to_contig_with_options(&self, generate_ucsc_names: bool) -> Contig {

0 commit comments

Comments
 (0)