update-dep #74

Merged
Dandaedre merged 1 commits from update-dep into main 2026-05-03 04:15:02 +02:00
9 changed files with 41 additions and 34 deletions

View File

@ -5,5 +5,5 @@ edition = "2024"
[dependencies]
clap = { version = "4.5.28", features = ["derive"] }
phf = { version = "0.11.3", features = ["macros"] }
phf = { version = "0.13.1", features = ["macros"] }
serde = { version = "1.0.217", features = ["derive"] }

View File

@ -4,4 +4,4 @@ version = "0.1.0"
edition = "2024"
[dependencies]
facet = "0.42.0"
facet = "0.46.0"

View File

@ -8,5 +8,5 @@ config = {path = "../config"}
cli_parser = {path = "../cli_parser"}
regex = "1.11.1"
serde = { version = "1.0.217", features = ["derive", "alloc"] }
toml = "0.8.20"
toml = "1.1.2"
anyhow = "1.0.95"

View File

@ -7,8 +7,8 @@ edition = "2024"
config = {path = "../config"}
cli_parser = {path = "../cli_parser"}
anyhow = "1.0.95"
charts-rs = "0.4.2"
charts-rs = { version = "0.4.2", features = ["image", "image-encoder"] }
glob = "0.3.2"
serde = { version = "1.0.217", features = ["derive", "alloc"] }
csv = "1.3.1"
ron = "0.8.1"
ron = "0.12.1"

View File

@ -4,7 +4,9 @@
//!
//! - [`make_graphs`]: The main action dispatcher for graph generation and removal.
use charts_rs::{Box, Color, RadarChart, RadarIndicator, Series, get_or_try_init_fonts};
use charts_rs::{
Box, Color, RadarChart, RadarIndicator, Series, get_or_try_init_fonts, svg_to_png_with_size,
};
use cli_parser::Config;
use config::graph::{FinalClassRadar, GraphConfig, GraphTargetType, LoadedClassRadar, RawRow};
use glob::glob;
@ -112,20 +114,25 @@ fn gen_graph(args: &GraphConfig) -> Result<()> {
let mut r = RadarChart::new([graph].to_vec(), maxv.to_vec());
cfg.apply_to(&mut r);
f.write_all(r.svg().context("Converting to SVG")?.as_bytes())?;
println!("Writing to {}", path_svg);
let context = r.svg().context("Converting to SVG")?;
f.write_all(context.as_bytes())?;
let mut cmd = Command::new("convert");
cmd.arg("--size")
.arg("800x600")
.arg(&path_svg)
.arg(path_png);
println!("[INFO] Using convert cli to convert to png");
if let Err(e) = cmd.output() {
println!(
"[ERRR] An error has occured when converting the file {} to png \n {:#?}",
path_svg, e
)
}
// let mut cmd = Command::new("convert");
// cmd.arg("--size")
// .arg("800x600")
// .arg(&path_svg)
// .arg(path_png);
// println!("[INFO] Using convert cli to convert to png");
// if let Err(e) = cmd.output() {
// println!(
// "[ERRR] An error has occured when converting the file {} to png \n {:#?}",
// path_svg, e
// )
// }
let png = svg_to_png_with_size(&context, Some(980), Some(560)).context("Writing png")?;
let mut f = File::create(path_png)?;
f.write_all(&png).context("Writing png")?;
}
Ok(())
}
@ -290,15 +297,15 @@ impl MiniTheme {
/// The default theme for out tool
pub fn new() -> Self {
Self {
font_family: "LMRoman8".to_string(),
font_family: "Latin Modern Roman".to_string(),
margin: Box {
left: -10.0,
left: 140.0,
top: 20.0,
right: 70.0,
bottom: 0.0,
right: 90.0,
bottom: 60.0,
},
width: 720.0,
height: 440.0,
width: 980.0,
height: 560.0,
grid_stroke_color: Color {
r: 77,
g: 69,

View File

@ -7,12 +7,12 @@ edition = "2024"
config = {path = "../config"}
cli_parser = {path = "../cli_parser"}
dynfmt = { version = "0.1.5", features = ["curly"] }
indicatif = { version = "0.17.11", features = ["rayon"] }
logos = "0.15.0"
indicatif = { version = "0.18.4", features = ["rayon"] }
logos = "0.16.1"
tokio = "1.43.0"
anyhow = "1.0.95"
indexmap = "2.7.1"
regex = "1.11.1"
serde = { version = "1.0.217", features = ["derive", "alloc"] }
console = "0.15.10"
toml = "0.8.20"
console = "0.16.3"
toml = "1.1.2"

View File

@ -229,11 +229,11 @@ pub(super) enum LineType {
EnteringDocument(String),
/// Info on the loading of a library
#[regex(r"Library \(\w+\)[^\n]+", |lex| split_by(":",&lex.slice()[8..]))]
#[regex(r"Library \(\w+\)[^\n]+", |lex| split_by(":",&lex.slice()[8..]), allow_greedy=true)]
Library((String, String)),
/// The warning generated by a package
#[regex(r"Package [A-z_-]+ Warning: [^\n]+", |lex| split_by(":",lex.slice()))]
#[regex(r"Package [A-z_-]+ Warning: [^\n]+", |lex| split_by(":",lex.slice()), allow_greedy=true)]
PackageWarningPrs((String, String)),
/// A package warning, with normal warning level
@ -243,7 +243,7 @@ pub(super) enum LineType {
LowPackageWarning((String, String)),
/// The warning context generated by a package
#[regex(r"\([A-z_-]+\) [^\n]+", |lex| split_by(")",&lex.slice()[1..]))]
#[regex(r"\([A-z_-]+\) [^\n]+", |lex| split_by(")",&lex.slice()[1..]), allow_greedy=true)]
PackageContext((String, String)),
/// Loading (Load something)

View File

@ -16,7 +16,7 @@ formatter = {path = "../formatter"}
anyhow = "1.0.95"
clap = { version = "4.5.28", features = ["derive"] }
tokio = { version = "1.43.0", features = ["full"] }
toml = "0.8.20"
toml = "1.1.2"
[package.metadata.cargo-machete]
ignored = ["tokio"]

View File

@ -10,7 +10,7 @@ anyhow = "1.0.95"
csv = "1.3.1"
dynfmt = { version = "0.1.5", features = ["curly"] }
glob = "0.3.2"
phf = { version = "0.11.3", features = ["macros"] }
phf = { version = "0.13.1", features = ["macros"] }
regex = "1.11.1"
regex_static = "0.1.1"
serde = { version = "1.0.217", features = ["derive", "alloc"] }