Skip to content

Commit cb75923

Browse files
authored
Merge pull request #303 from umccr/build/deps-update
build: deps update
2 parents a0a78cd + 3718257 commit cb75923

File tree

14 files changed

+468
-574
lines changed

14 files changed

+468
-574
lines changed

Cargo.lock

+427-485
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

htsget-actix/Cargo.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ rustls = "0.23"
2828
actix-cors = "0.7"
2929
http_1 = { package = "http", version = "1" }
3030
http = "0.2"
31-
rustls-pemfile = "2"
3231
serde = { version = "1", features = ["derive"] }
3332
serde_json = "1"
34-
futures-util = { version = "0.3" }
35-
futures = { version = "0.3" }
3633
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
3734

3835
tracing-actix-web = "0.7"
@@ -41,10 +38,11 @@ tracing = "0.1"
4138
htsget-http = { version = "0.5.2", path = "../htsget-http", default-features = false }
4239
htsget-search = { version = "0.10.0", path = "../htsget-search", default-features = false }
4340
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
44-
htsget-test = { version = "0.7.2", path = "../htsget-test", features = ["http"], default-features = false }
4541
htsget-axum = { version = "0.3.0", path = "../htsget-axum", default-features = false }
4642

4743
[dev-dependencies]
44+
htsget-test = { path = "../htsget-test", features = ["http"], default-features = false }
45+
4846
async-trait = "0.1"
4947

5048
criterion = { version = "0.5", features = ["async_tokio"] }

htsget-axum/Cargo.toml

+5-7
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,25 @@ rustls = "0.23"
3939
hyper-util = "0.1"
4040
tower-http = { version = "0.6", features = ["trace", "cors", "fs"] }
4141
http = "1"
42-
axum = { version = "0.7", features = ["http2"] }
43-
axum-extra = { version = "0.9", features = ["erased-json"] }
42+
axum = { version = "0.8", features = ["http2"] }
43+
axum-extra = { version = "0.10", features = ["erased-json"] }
4444
tower = { version = "0.5", features = ["make", "util"] }
4545

4646
# Async
4747
tokio-rustls = "0.26"
4848
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
49-
futures = { version = "0.3" }
5049
async-trait = "0.1"
5150

5251
# Tracing and error
53-
thiserror = "1"
52+
thiserror = "2"
5453
tracing = "0.1"
5554

5655
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
57-
htsget-test = { version = "0.7.2", path = "../htsget-test", features = ["http"], default-features = false }
5856
htsget-search = { version = "0.10.0", path = "../htsget-search", default-features = false }
5957
htsget-http = { version = "0.5.2", path = "../htsget-http", default-features = false }
6058

6159
[dev-dependencies]
62-
tempfile = "3"
63-
data-url = "0.3"
60+
htsget-test = { path = "../htsget-test", features = ["http"], default-features = false }
6461

62+
tempfile = "3"
6563
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls"] }

htsget-axum/src/server/data.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl DataServer {
3434
/// Create the router for the data server.
3535
pub fn router<P: AsRef<Path>>(cors: CorsConfig, path: P) -> Router {
3636
Router::new()
37-
.nest_service("/", ServeDir::new(path))
37+
.fallback_service(ServeDir::new(path))
3838
.layer(configure_cors(cors))
3939
.layer(TraceLayer::new_for_http())
4040
}

htsget-axum/src/server/ticket.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use htsget_config::config::service_info::ServiceInfo;
1111
use htsget_config::config::ticket_server::TicketServerConfig;
1212
use htsget_config::config::Config;
1313
use htsget_search::HtsGet;
14+
use http::{StatusCode, Uri};
1415
use std::net::SocketAddr;
1516
use tokio::task::JoinHandle;
1617
use tower::ServiceBuilder;
@@ -69,12 +70,13 @@ where
6970
"/reads/service-info",
7071
get(reads_service_info::<H>).post(reads_service_info::<H>),
7172
)
72-
.route("/reads/*id", get(get::reads).post(post::reads))
73+
.route("/reads/{*id}", get(get::reads).post(post::reads))
7374
.route(
7475
"/variants/service-info",
7576
get(variants_service_info::<H>).post(variants_service_info::<H>),
7677
)
77-
.route("/variants/*id", get(get::variants).post(post::variants))
78+
.route("/variants/{*id}", get(get::variants).post(post::variants))
79+
.fallback(Self::fallback)
7880
.layer(
7981
ServiceBuilder::new()
8082
.layer(TraceLayer::new_for_http())
@@ -87,6 +89,11 @@ where
8789
pub fn local_addr(&self) -> Result<SocketAddr> {
8890
self.server.local_addr()
8991
}
92+
93+
/// A handler for when a route is not found.
94+
async fn fallback(uri: Uri) -> (StatusCode, String) {
95+
(StatusCode::NOT_FOUND, format!("No route for {uri}"))
96+
}
9097
}
9198

9299
/// Spawn a task to run the ticket server.

htsget-config/Cargo.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ experimental = ["dep:crypt4gh", "dep:tokio", "dep:futures-util"]
1717
default = []
1818

1919
[dependencies]
20-
thiserror = "1"
20+
thiserror = "2"
2121
async-trait = "0.1"
22-
noodles = { version = "0.83", features = ["core"] }
22+
noodles = { version = "0.87", features = ["core"] }
2323
serde = { version = "1", features = ["derive"] }
24-
serde_with = "3"
2524
serde_json = "1"
2625
serde_regex = "1"
2726
regex = "1"

htsget-http/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ experimental = ["htsget-config/experimental", "htsget-search/experimental", "hts
1717
default = []
1818

1919
[dependencies]
20-
thiserror = "1"
20+
thiserror = "2"
2121
serde = { version = "1", features = ["derive"] }
2222
serde_json = "1"
2323
http = "1"
2424
htsget-search = { version = "0.10.0", path = "../htsget-search", default-features = false }
2525
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
26-
htsget-test = { version = "0.7.2", path = "../htsget-test", default-features = false }
2726
futures = { version = "0.3" }
2827
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
2928
tracing = "0.1"
3029
cfg-if = "1"
30+
31+
[dev-dependencies]
32+
htsget-test = { path = "../htsget-test", default-features = false }

htsget-lambda/Cargo.toml

+4-21
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,21 @@ homepage = "https://github.com/umccr/htsget-rs/blob/main/htsget-lambda/README.md
1111
repository = "https://github.com/umccr/htsget-rs"
1212

1313
[features]
14-
aws = ["htsget-axum/aws", "htsget-config/aws", "htsget-search/aws", "htsget-http/aws", "htsget-test/aws"]
15-
url = ["htsget-axum/url", "htsget-config/url", "htsget-search/url", "htsget-http/url", "htsget-test/url"]
14+
aws = ["htsget-axum/aws", "htsget-config/aws", "htsget-http/aws"]
15+
url = ["htsget-axum/url", "htsget-config/url", "htsget-http/url"]
1616
experimental = [
1717
"htsget-axum/experimental",
1818
"htsget-config/experimental",
19-
"htsget-search/experimental",
20-
"htsget-http/experimental",
21-
"htsget-test/experimental"
19+
"htsget-http/experimental"
2220
]
2321
default = []
2422

2523
[dependencies]
2624
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
27-
tower-http = { version = "0.6", features = ["cors"] }
2825
rustls = "0.23"
29-
lambda_http = { version = "0.13" }
30-
lambda_runtime = { version = "0.13" }
31-
serde = { version = "1" }
32-
serde_json = "1"
33-
mime = "0.3"
34-
regex = "1"
26+
lambda_http = { version = "0.14" }
3527
tracing = "0.1"
36-
tracing-subscriber = "0.3"
37-
bytes = "1"
3828

3929
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
40-
htsget-search = { version = "0.10.0", path = "../htsget-search", default-features = false }
4130
htsget-http = { version = "0.5.2", path = "../htsget-http", default-features = false }
42-
htsget-test = { version = "0.7.2", path = "../htsget-test", features = ["http"], default-features = false }
4331
htsget-axum = { version = "0.3.0", path = "../htsget-axum", default-features = false }
44-
45-
[dev-dependencies]
46-
async-trait = "0.1"
47-
query_map = { version = "0.7", features = ["url-query"] }
48-
tempfile = "3"

htsget-search/Cargo.toml

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,20 @@ futures-util = "0.3"
3737
async-trait = "0.1"
3838

3939
# Noodles
40-
noodles = { version = "0.83", features = ["async", "core", "bgzf", "bam", "bcf", "cram", "csi", "sam", "tabix", "vcf"] }
40+
noodles = { version = "0.87", features = ["async", "core", "bgzf", "bam", "bcf", "cram", "csi", "sam", "tabix", "vcf"] }
4141

4242
# Error control, tracing, config
43-
thiserror = "1"
43+
http = "1"
4444
tracing = "0.1"
4545

4646
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
4747
htsget-storage = { version = "0.3.0", path = "../htsget-storage", default-features = false }
48-
htsget-test = { version = "0.7.2", path = "../htsget-test", features = ["http"], default-features = false }
4948

5049
[dev-dependencies]
5150
tempfile = "3"
52-
http = "1"
5351

5452
criterion = { version = "0.5", features = ["async_tokio"] }
53+
htsget-test = { path = "../htsget-test", features = ["http"], default-features = false }
5554

5655
[[bench]]
5756
name = "search-benchmarks"

htsget-search/src/cram_search.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use htsget_config::types::Interval;
2121

2222
use crate::search::{Search, SearchAll, SearchReads};
2323
use crate::Class::Body;
24-
use crate::{ConcurrencyError, ParsedHeader};
24+
use crate::ConcurrencyError;
2525
use crate::{Format, HtsGetError, Query, Result};
2626
use htsget_storage::types::{BytesPosition, DataBlock};
2727
use htsget_storage::{Storage, Streamable};
@@ -137,15 +137,7 @@ impl Search<PhantomData<Self>, Index, AsyncReader, Header> for CramSearch {
137137
}
138138

139139
async fn read_header(reader: &mut AsyncReader) -> io::Result<Header> {
140-
reader.read_file_definition().await?;
141-
142-
Ok(
143-
reader
144-
.read_file_header()
145-
.await?
146-
.parse::<ParsedHeader<Header>>()?
147-
.into_inner(),
148-
)
140+
reader.read_header().await
149141
}
150142

151143
async fn read_index_inner<T: AsyncRead + Send + Unpin>(inner: T) -> io::Result<Index> {

htsget-search/src/lib.rs

-27
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ pub use htsget_storage::Storage;
1212

1313
pub use htsget_storage::local::FileStorage;
1414

15-
use std::fmt::Display;
16-
use std::str::FromStr;
17-
1815
use async_trait::async_trait;
1916
use tokio::task::JoinError;
2017

@@ -43,30 +40,6 @@ pub trait HtsGet {
4340
}
4441
}
4542

46-
/// A struct to represent a parsed header
47-
pub struct ParsedHeader<T>(T);
48-
49-
impl<T> ParsedHeader<T> {
50-
/// Get the inner header value.
51-
pub fn into_inner(self) -> T {
52-
self.0
53-
}
54-
}
55-
56-
impl<T> FromStr for ParsedHeader<T>
57-
where
58-
T: FromStr,
59-
<T as FromStr>::Err: Display,
60-
{
61-
type Err = HtsGetError;
62-
63-
fn from_str(header: &str) -> Result<Self> {
64-
Ok(ParsedHeader(header.parse::<T>().map_err(|err| {
65-
HtsGetError::parse_error(format!("parsing header: {}", err))
66-
})?))
67-
}
68-
}
69-
7043
pub(crate) struct ConcurrencyError(JoinError);
7144

7245
impl ConcurrencyError {

htsget-storage/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ http = "1"
3434
cfg-if = "1"
3535

3636
# Async
37-
tokio = { version = "1", features = ["macros", "rt-multi-thread", "io-util"] }
37+
tokio = { version = "1", features = ["macros", "rt-multi-thread", "io-util", "fs"] }
3838
tokio-util = { version = "0.7", features = ["io", "compat"] }
3939
futures = { version = "0.3" }
4040
futures-util = "0.3"
@@ -54,20 +54,18 @@ crypt4gh = { version = "0.4", git = "https://github.com/EGA-archive/crypt4gh-rus
5454
bincode = { version = "1", optional = true }
5555

5656
# Error control, tracing, config
57-
thiserror = "1"
57+
thiserror = "2"
5858
tracing = "0.1"
5959
base64 = "0.22"
6060

6161
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false }
62-
htsget-test = { version = "0.7.2", path = "../htsget-test", features = ["http"], default-features = false }
6362

6463
[dev-dependencies]
6564
tower-http = { version = "0.6", features = ["fs"] }
66-
axum = "0.7"
65+
axum = "0.8"
6766
tempfile = "3"
6867
data-url = "0.3"
6968

7069
# Axum server
7170
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
72-
73-
criterion = { version = "0.5", features = ["async_tokio"] }
71+
htsget-test = { path = "../htsget-test", features = ["http"], default-features = false }

htsget-test/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ default = []
4242
# Server tests dependencies
4343
htsget-config = { version = "0.13.0", path = "../htsget-config", default-features = false, optional = true }
4444

45-
noodles = { version = "0.83", optional = true, features = ["async", "bgzf", "vcf", "cram", "bcf", "bam", "fasta"] }
45+
noodles = { version = "0.87", optional = true, features = ["async", "bgzf", "vcf", "cram", "bcf", "bam", "fasta"] }
4646

4747
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"], optional = true }
4848
tokio = { version = "1", features = ["rt-multi-thread", "fs"], optional = true }
@@ -67,4 +67,4 @@ crypt4gh = { version = "0.4", git = "https://github.com/EGA-archive/crypt4gh-rus
6767

6868
# Default dependencies
6969
rcgen = "0.13"
70-
thiserror = "1"
70+
thiserror = "2"

release-plz.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[package]]
2+
name = "htsget-test"
3+
release = false

0 commit comments

Comments
 (0)