Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5a253ed
Build out Rust unit tests/coverage reporting
forstmeier Feb 8, 2026
fc25fbf
Change test coverage output location
forstmeier Feb 8, 2026
dd97775
Address pull request #752 feedback: refactor tests and improve CI rob…
forstmeier Feb 8, 2026
6fa04d3
Remove coverage file check from Rust workflow
forstmeier Feb 8, 2026
ae97ee0
Address pull request #752 feedback: refine error handling and test co…
forstmeier Feb 8, 2026
bbbdb31
Fix Flox dependency error
forstmeier Feb 8, 2026
d937c45
Address pull request #752 feedback: fix coverage tool mismatch
forstmeier Feb 8, 2026
4b8dc25
Expand unit tests/update code tests GitHub workflows
forstmeier Feb 9, 2026
5139536
Update GitHub workflow code check "detect changes" job outputs
forstmeier Feb 9, 2026
e1d76b0
Add push trigger for testing workflow on feature branch
forstmeier Feb 9, 2026
eb5eff8
Add missing checkout step to detect_changes job
forstmeier Feb 9, 2026
c64f4c1
Simplify workflow to always run all code checks
forstmeier Feb 9, 2026
b602d45
Fix YAML syntax for coveralls files parameter
forstmeier Feb 9, 2026
1ebdd2e
Add bot pull request feedback
forstmeier Feb 9, 2026
70cea99
Add Rust dependency caching/add disk space optimizations
forstmeier Feb 9, 2026
cee6506
Update Coveralls target file upload format
forstmeier Feb 10, 2026
ab4d0c7
Truncate all tests into DataFrame validation
forstmeier Feb 10, 2026
6b661d3
testcontainers
chrisaddy Feb 10, 2026
c2970cf
Add bot pull request feedback and add general cleanup/fixes
forstmeier Feb 10, 2026
f94ca31
Address pull request #753 feedback: improve tracing init and env var …
forstmeier Feb 11, 2026
448a63f
Add changes from pull request #751
forstmeier Feb 11, 2026
42d8f15
Merge pull request #753 from oscmcompany/rust-tests
forstmeier Feb 12, 2026
4b95032
Merge branch 'master' into rust-unit-tests-and-coverage-updates
forstmeier Feb 12, 2026
9d91879
Address pull request #752 feedback: infrastructure cleanups and code …
forstmeier Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flox/env/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mask.pkg-path = "mask"
bacon.pkg-path = "bacon"
cargo-watch.pkg-path = "cargo-watch"
cargo-nextest.pkg-path = "cargo-nextest"
cargo-tarpaulin.pkg-path = "cargo-tarpaulin"
cargo-llvm-cov.pkg-path = "cargo-llvm-cov"
cargo.pkg-path = "cargo"
cargo.pkg-group = "rust-toolchain"
rustc.pkg-path = "rustc"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/run_python_code_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ jobs:
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverage/.python.xml
file: .coverage_output/python.xml
flag-name: python
parallel: false
7 changes: 7 additions & 0 deletions .github/workflows/run_rust_code_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ jobs:
uses: flox/activate-action@v1
with:
command: mask development rust all
- name: Upload Rust coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: .coverage_output/rust.xml
flag-name: rust
parallel: false
Comment thread
forstmeier marked this conversation as resolved.
Outdated
Comment thread
forstmeier marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__pycache__/
.envrc
.env.nu
coverage/
.coverage_output/
.coverage
*.csv
*.egg-info/
Expand Down
122 changes: 108 additions & 14 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> The open source capital management company

<!-- markdownlint-disable-next-line MD013 -->
[![Python code checks](https://github.com/oscmcompany/fund/actions/workflows/run_python_code_checks.yaml/badge.svg)](https://github.com/oscmcompany/fund/actions/workflows/run_python_code_checks.yaml) [![Rust code checks](https://github.com/oscmcompany/fund/actions/workflows/run_rust_code_checks.yaml/badge.svg)](https://github.com/oscmcompany/fund/actions/workflows/run_rust_code_checks.yaml)
[![Python code checks](https://github.com/oscmcompany/fund/actions/workflows/run_python_code_checks.yaml/badge.svg)](https://github.com/oscmcompany/fund/actions/workflows/run_python_code_checks.yaml) [![Rust code checks](https://github.com/oscmcompany/fund/actions/workflows/run_rust_code_checks.yaml/badge.svg)](https://github.com/oscmcompany/fund/actions/workflows/run_rust_code_checks.yaml) [![Test coverage](https://coveralls.io/repos/github/oscmcompany/fund/badge.svg?branch=master)](https://coveralls.io/github/oscmcompany/fund?branch=master)
Comment thread
forstmeier marked this conversation as resolved.
Outdated
Comment thread
forstmeier marked this conversation as resolved.
Outdated
Comment thread
forstmeier marked this conversation as resolved.
Outdated

## About

Expand Down
7 changes: 7 additions & 0 deletions applications/datamanager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "datamanager"
version = "0.1.0"
edition = "2021"

[lib]
name = "datamanager"
path = "src/lib.rs"

[[bin]]
name = "datamanager"
path = "src/main.rs"
Expand Down Expand Up @@ -43,3 +47,6 @@ tower = { version = "0.5", features = ["util"] }
hyper = { version = "1.0", features = ["full"] }
http-body-util = "0.1"
reqwest = { version = "0.12", features = ["json"] }
mockito = "1.7"
tempfile = "3.24"
serial_test = "3.3"
Comment thread
forstmeier marked this conversation as resolved.
44 changes: 44 additions & 0 deletions applications/datamanager/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,47 @@ pub enum Error {
#[error("Other error: {0}")]
Other(String),
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_other_error_display() {
let err = Error::Other("Test error message".to_string());
let display = format!("{}", err);
assert_eq!(display, "Other error: Test error message");
}

#[test]
fn test_other_error_debug() {
let err = Error::Other("Debug test".to_string());
let debug = format!("{:?}", err);
assert!(debug.contains("Other"));
assert!(debug.contains("Debug test"));
}

#[test]
fn test_duckdb_error_conversion() {
let duck_err = DuckError::ExecuteReturnedResults;
let err: Error = duck_err.into();
let display = format!("{}", err);
assert!(display.starts_with("DuckDB error:"));
}

#[test]
fn test_polars_error_conversion() {
let polars_err = PolarsError::NoData("test data".into());
let err: Error = polars_err.into();
let display = format!("{}", err);
assert!(display.starts_with("Polars error:"));
}
Comment thread
forstmeier marked this conversation as resolved.
Outdated

#[test]
fn test_credentials_error_conversion() {
let cred_err = CredentialsError::not_loaded("test credentials error");
let err: Error = cred_err.into();
let display = format!("{}", err);
assert!(display.starts_with("Credentials error:"));
}
Comment thread
forstmeier marked this conversation as resolved.
Outdated
}
10 changes: 10 additions & 0 deletions applications/datamanager/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pub mod data;
pub mod equity_bars;
pub mod equity_details;
pub mod errors;
pub mod health;
pub mod portfolios;
pub mod predictions;
pub mod router;
pub mod state;
pub mod storage;
Comment thread
forstmeier marked this conversation as resolved.
Comment thread
forstmeier marked this conversation as resolved.
13 changes: 1 addition & 12 deletions applications/datamanager/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
mod data;
mod equity_bars;
mod equity_details;
mod errors;
mod health;
mod portfolios;
mod predictions;
mod router;
mod state;
mod storage;

use router::create_app;
use datamanager::router::create_app;
use std::env;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

Expand Down
Loading
Loading