Compare commits

..
Author SHA1 Message Date
phoenix c2fad59cac bump: icarus_models
Rust Build / Check (pull_request) Successful in 1m9s
Release Tagging / release (pull_request) Successful in 1m15s
Rust Build / Test Suite (pull_request) Successful in 1m20s
Rust Build / Rustfmt (pull_request) Successful in 43s
Rust Build / build (pull_request) Successful in 53s
Rust Build / Clippy (pull_request) Successful in 2m1s
2026-07-06 23:36:09 -04:00
phoenix 1d2dd5ebe9 cargo update 2026-07-06 23:35:46 -04:00
phoenix c2f2c210fe bump: utoipa 2026-07-06 23:34:41 -04:00
phoenix 92fd492be4 bump: uuid 2026-07-06 23:33:41 -04:00
phoenix 71544eed2f bump: time 2026-07-06 23:33:09 -04:00
phoenix da52603d06 bump: rand 2026-07-06 23:32:37 -04:00
phoenix 56f1546292 bump: serde_json 2026-07-06 23:31:41 -04:00
phoenix e7667b8f80 bump: rust ci 2026-07-06 23:30:39 -04:00
9 changed files with 47 additions and 105 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
components: cargo components: cargo
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
+6 -6
View File
@@ -1,4 +1,4 @@
name: simodels Build name: Rust Build
on: on:
push: push:
@@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo check - run: cargo check
@@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo test - run: cargo test
@@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt - run: rustup component add rustfmt
- run: cargo fmt --all -- --check - run: cargo fmt --all -- --check
@@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add clippy - run: rustup component add clippy
- run: cargo clippy -- -D warnings - run: cargo clippy -- -D warnings
@@ -67,6 +67,6 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.97 toolchain: 1.96.1
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo build - run: cargo build
Generated
+28 -28
View File
@@ -43,9 +43,9 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.2.67" version = "1.2.66"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38" checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
dependencies = [ dependencies = [
"find-msvc-tools", "find-msvc-tools",
"shlex", "shlex",
@@ -190,6 +190,20 @@ version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
[[package]]
name = "icarus_models"
version = "0.11.2"
dependencies = [
"josekit",
"rand",
"serde",
"serde_json",
"tempfile",
"time",
"utoipa",
"uuid",
]
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "2.14.0" version = "2.14.0"
@@ -250,9 +264,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.8.3" version = "2.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
@@ -374,9 +388,9 @@ checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.13.0" version = "1.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2" checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -386,9 +400,9 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.4.15" version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db" checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -472,23 +486,9 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
[[package]] [[package]]
name = "simd-adler32" name = "simd-adler32"
version = "0.3.10" version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
[[package]]
name = "simodels"
version = "0.11.3"
dependencies = [
"josekit",
"rand",
"serde",
"serde_json",
"tempfile",
"time",
"utoipa",
"uuid",
]
[[package]] [[package]]
name = "slab" name = "slab"
@@ -602,9 +602,9 @@ dependencies = [
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.23.5" version = "1.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a" checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53"
dependencies = [ dependencies = [
"getrandom", "getrandom",
"js-sys", "js-sys",
@@ -680,6 +680,6 @@ dependencies = [
[[package]] [[package]]
name = "zmij" name = "zmij"
version = "1.0.23" version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+4 -4
View File
@@ -1,9 +1,9 @@
[package] [package]
name = "simodels" name = "icarus_models"
version = "0.11.3" version = "0.11.2"
edition = "2024" edition = "2024"
rust-version = "1.95" rust-version = "1.95"
description = "models used for the soaricarus project" description = "models used for the icarus project"
license = "MIT" license = "MIT"
[dependencies] [dependencies]
@@ -11,7 +11,7 @@ serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.150" } serde_json = { version = "1.0.150" }
rand = { version = "0.10.2" } rand = { version = "0.10.2" }
time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] } time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
uuid = { version = "1.23.5", features = ["v4", "serde"] } uuid = { version = "1.23.4", features = ["v4", "serde"] }
josekit = { version = "0.10.3" } josekit = { version = "0.10.3" }
utoipa = { version = "5.5.0", features = ["uuid", "time"] } utoipa = { version = "5.5.0", features = ["uuid", "time"] }
-22
View File
@@ -1,22 +0,0 @@
Copyright (c) 2026 Kun Deng.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+2 -3
View File
@@ -1,4 +1,3 @@
# simodels A library containing commonly used structs, functions, enums, constants and other code
Library containing commonly used structs, functions, enums, constants and other code that is used throughout the icarus projects. Code from this library serves as the model
that is used throughout the soaricarus projects. Code from this library serves as the model
for other projects in the icarus project. for other projects in the icarus project.
+1 -36
View File
@@ -37,42 +37,7 @@ pub mod collection {
pub artist: String, pub artist: String,
pub disc: i32, pub disc: i32,
pub track: i32, pub track: i32,
/// In seconds // In seconds
pub duration: f64, pub duration: f64,
} }
pub fn deserialize_json(json_data: &str, album: &mut Album) -> Result<(), serde_json::Error> {
match serde_json::from_str::<Album>(json_data) {
Ok(parsed_album) => {
*album = parsed_album;
Ok(())
}
Err(err) => Err(err),
}
}
}
#[cfg(test)]
mod tests {
#[test]
fn test_deserilize_album_collection_json() {
let album_file_path = "tests/album.json";
let album_file_content = match std::fs::read_to_string(album_file_path) {
Ok(content) => content,
Err(err) => {
assert!(false, "Error: {err:?}");
String::new()
}
};
let mut album = super::collection::Album::default();
match super::collection::deserialize_json(&album_file_content, &mut album) {
Ok(_) => {
assert_eq!(3, album.tracks.len(), "Track count do not match");
}
Err(err) => {
assert!(false, "Error: {err:?}");
}
}
}
} }
+2 -2
View File
@@ -164,9 +164,9 @@ mod tests {
fn test_resource() -> TokenResource { fn test_resource() -> TokenResource {
TokenResource { TokenResource {
issuer: String::from("soaricarus_auth_test"), issuer: String::from("icarus_auth_test"),
message: String::from("Authorization"), message: String::from("Authorization"),
audiences: vec![String::from("soaricarus_test")], audiences: vec![String::from("icarus_test")],
id: uuid::Uuid::nil(), id: uuid::Uuid::nil(),
} }
} }
+3 -3
View File
@@ -33,8 +33,8 @@ mod song_tests {
use tempfile::tempdir; use tempfile::tempdir;
use crate::utils; use crate::utils;
use simodels::song; use icarus_models::song;
use simodels::types; use icarus_models::types;
#[test] #[test]
fn test_song_to_data() { fn test_song_to_data() {
@@ -157,7 +157,7 @@ mod song_tests {
#[cfg(test)] #[cfg(test)]
mod album_tests { mod album_tests {
use crate::utils; use crate::utils;
use simodels::album; use icarus_models::album;
#[test] #[test]
fn parse_album() { fn parse_album() {