Skip to content

Commit

Permalink
Merge branch 'master' into ome_rust
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed Aug 22, 2024
2 parents 4b1755b + aa15684 commit 56ed86c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Here, we develop the Rust components of the EKO library

## Crates

- `dekoder` handles the output file
- `ekore` contains the underlying collinear anomalous dimensions and the operator matrix elements
- `eko` is the glue between the Python side and the `ekore` crate

Expand All @@ -12,7 +13,7 @@ Here, we develop the Rust components of the EKO library
- `release.json` defines the releasing order of crates
- only listed crates will be released
- dependent crates should follow those they are depending on
- `katex-header.html` is an HTML snippet to be included in every docs page to inject
KaTeX support
- `doc-header.html` is an HTML snippet to be included in every docs page to inject
KaTeX support and abbreviation support
- `bump-versions.py` increases the Rust versions in all crates consistently
- `make_bib.py` generates the Rust function stubs which serve as fake bibliography system
11 changes: 4 additions & 7 deletions crates/dekoder/src/eko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ impl TryFrom<&Yaml> for EvolutionPoint {
fn try_from(yml: &Yaml) -> Result<Self> {
// work around float representation
let scale = yml["scale"].as_f64();
let scale = if scale.is_some() {
scale.ok_or(EKOError::KeyError(
"because failed to read scale as float".to_owned(),
))?
} else {
yml["scale"].as_i64().ok_or(EKOError::KeyError(
let scale = match scale {
Some(scale) => scale,
None => yml["scale"].as_i64().ok_or(EKOError::KeyError(
"because failed to read scale as float from int".to_owned(),
))? as f64
))? as f64,
};
let nf = yml["nf"]
.as_i64()
Expand Down
3 changes: 2 additions & 1 deletion crates/ekore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ rustdoc-args = ["--html-in-header", "doc-header.html"]

[dependencies]
num = "0.4.1"

[dev-dependencies]
float-cmp = "0.9.0"
hashbrown = "0.14"
2 changes: 1 addition & 1 deletion crates/ekore/src/harmonics/cache.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Cache harmonic sums for given Mellin N.
use hashbrown::HashMap;
use num::{complex::Complex, Zero};
use std::collections::HashMap;

use crate::harmonics::{g_functions, w1, w2, w3, w4};

Expand Down
1 change: 1 addition & 0 deletions crates/ekore/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ macro_rules! cmplx {
}

/// Shorthand complex number comparators.
#[cfg(test)]
#[macro_export]
macro_rules! assert_approx_eq_cmplx {
($size:ty, $ref:expr, $target:expr) => {
Expand Down
2 changes: 1 addition & 1 deletion crates/release.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["ekore", "eko"]
["dekoder", "ekore", "eko"]

0 comments on commit 56ed86c

Please sign in to comment.