Skip to content

Commit 049b977

Browse files
mivertowskiclaude
andcommitted
fix(ci,docs): fix doc link warnings and scope fmt check to RustKernels
- Escape doc link syntax in graph crate (topology.rs, similarity.rs, cycles.rs) - Fix unclosed HTML tag in temporal/ring_messages.rs - Add documentation for NSFRConfig struct fields in treasury/liquidity.rs - Update CI workflow to only check formatting for RustKernels packages, excluding path dependencies like RustCompute Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f902be3 commit 049b977

6 files changed

Lines changed: 20 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ jobs:
4545
4646
- name: Check formatting
4747
working-directory: RustKernels/RustKernels
48-
run: cargo fmt --all -- --check
48+
run: |
49+
# Only check formatting for RustKernels packages, not path dependencies
50+
for pkg in $(cargo metadata --no-deps --format-version=1 | jq -r '.packages[].name'); do
51+
cargo fmt --package "$pkg" -- --check
52+
done
4953
5054
- name: Run clippy
5155
working-directory: RustKernels/RustKernels

crates/rustkernel-graph/src/cycles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct CycleParticipationResult {
2626
pub cycle_count_4hop: u32,
2727
/// Total weight (sum of edge weights) in all cycles.
2828
pub total_cycle_weight: f64,
29-
/// Cycle ratio: fraction of edges that participate in cycles [0,1].
29+
/// Cycle ratio: fraction of edges that participate in cycles `[0,1]`.
3030
pub cycle_ratio: f64,
3131
/// Risk level based on cycle participation.
3232
pub risk_level: CycleRiskLevel,

crates/rustkernel-graph/src/similarity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ impl ValueSimilarity {
658658

659659
/// Compute Wasserstein-1 distance (Earth Mover's Distance) for 1D distributions.
660660
///
661-
/// For 1D sorted bins: W1(P,Q) = Σ|CDF_P[i] - CDF_Q[i]|
661+
/// For 1D sorted bins: `W1(P,Q) = Σ|CDF_P[i] - CDF_Q[i]|`
662662
pub fn wasserstein_distance(p: &[f64], q: &[f64]) -> f64 {
663663
assert_eq!(p.len(), q.len(), "Distributions must have same length");
664664

crates/rustkernel-graph/src/topology.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub enum StarType {
241241
pub struct StarTopologyResult {
242242
/// Node index.
243243
pub node_index: usize,
244-
/// Star score [0,1] - 1.0 = perfect star, 0.0 = not a star.
244+
/// Star score `[0,1]` - 1.0 = perfect star, 0.0 = not a star.
245245
pub star_score: f64,
246246
/// Type of star topology.
247247
pub star_type: StarType,

crates/rustkernel-temporal/src/ring_messages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub struct QueryVolatilityResponse {
144144
}
145145

146146
impl QueryVolatilityResponse {
147-
/// Get forecast as Vec<f64>.
147+
/// Get forecast as `Vec<f64>`.
148148
pub fn forecast_f64(&self) -> Vec<f64> {
149149
self.forecast[..self.forecast_count as usize]
150150
.iter()

crates/rustkernel-treasury/src/liquidity.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,18 +619,27 @@ impl Default for LCRConfig {
619619
pub struct NSFRConfig {
620620
/// Minimum NSFR.
621621
pub min_nsfr: f64,
622-
/// ASF factors.
622+
/// ASF factor for stable retail deposits.
623623
pub asf_stable_retail: f64,
624+
/// ASF factor for less stable retail deposits.
624625
pub asf_less_stable_retail: f64,
626+
/// ASF factor for wholesale funding.
625627
pub asf_wholesale: f64,
628+
/// ASF factor for 6-month to 1-year funding.
626629
pub asf_6m_1y: f64,
630+
/// ASF factor for under 6-month funding.
627631
pub asf_under_6m: f64,
632+
/// ASF factor for other stable funding.
628633
pub asf_other: f64,
629-
/// RSF factors.
634+
/// RSF factor for Level 1 HQLA.
630635
pub rsf_level1: f64,
636+
/// RSF factor for Level 2A HQLA.
631637
pub rsf_level2a: f64,
638+
/// RSF factor for Level 2B HQLA.
632639
pub rsf_level2b: f64,
640+
/// RSF factor for other liquid assets.
633641
pub rsf_other_liquid: f64,
642+
/// RSF factor for illiquid assets.
634643
pub rsf_illiquid: f64,
635644
}
636645

0 commit comments

Comments
 (0)