Skip to content

Commit f0992eb

Browse files
committed
Commit before working on plots and numpy integration
1 parent 33e5f34 commit f0992eb

File tree

15 files changed

+351
-35
lines changed

15 files changed

+351
-35
lines changed

Cargo.lock

Lines changed: 102 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/fluster/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@tauri-apps/api": "2",
6767
"@tauri-apps/plugin-dialog": "~2",
6868
"@tauri-apps/plugin-log": "2.4.0",
69-
"@tauri-apps/plugin-opener": "2",
69+
"@tauri-apps/plugin-opener": "^2.2.7",
7070
"autoprefixer": "10.4.21",
7171
"bibtex": "0.9.0",
7272
"cheerio": "^1.0.0",
@@ -84,12 +84,14 @@
8484
"motion": "12.11.4",
8585
"next-themes": "0.4.6",
8686
"plotly": "^1.0.6",
87+
"plotly.js": "^3.0.1",
8788
"postcss": "8.5.3",
8889
"react": "^19.1.0",
8990
"react-day-picker": "8.10.1",
9091
"react-dom": "^19.1.0",
9192
"react-hook-form": "7.56.3",
9293
"react-pdf": "^9.2.1",
94+
"react-plotly.js": "^2.6.0",
9395
"react-redux": "9.2.0",
9496
"react-resizable": "3.0.5",
9597
"react-resizable-panels": "3.0.2",

apps/fluster/src-tauri/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ langchain-rust = "4.6.0"
9191
rig-lancedb = "0.2.11"
9292
tantivy = "0.22.0"
9393
rand = "0.9.1"
94+
pyo3 = "0.25.1"
95+
ndarray = { version = "0.16.1", features = ["rayon", "serde"] }
96+
numpy = "0.25.0"
9497

9598

9699
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]

apps/fluster/src-tauri/capabilities/default.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"core:default",
1010
"opener:default",
1111
"log:default",
12-
"dialog:default"
12+
"dialog:default",
13+
"opener:default",
14+
"opener:default"
1315
]
14-
}
16+
}

apps/fluster/src-tauri/src/features/math/commands/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pub mod get_equations;
55
pub mod read_mathjax_file;
66
pub mod save_equation;
77
pub mod save_equation_snippet;
8+
pub mod numpy;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// use numpy::{self, ndarray::NdFloat};
2+
3+
use std::num;
4+
5+
#[tauri::command]
6+
#[specta::specta]
7+
pub async fn arange(from: f64, to: f64, step: f64) -> Vec<f64> {
8+
let items: Vec<f64> = Vec::new();
9+
// let gap = math.a(to - from) / step
10+
// numpy::ndarray::range(from, to, step).collect()
11+
items
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::num;
2+
3+
#[tauri::command]
4+
#[specta::specta]
5+
pub async fn linspace(from: f64, to: f64, n_items: f64) -> Vec<f64> {
6+
let items: Vec<f64> = Vec::new();
7+
// let gap = math.a(to - from) / step
8+
// numpy::ndarray::range(from, to, step).collect()
9+
items
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#[tauri::command]
2+
#[specta::specta]
3+
pub async fn meshgrid(from: f64, to: f64, step: f64) -> Vec<f64> {
4+
let items: Vec<f64> = Vec::new();
5+
// let gap = math.a(to - from) / step
6+
// // numpy::ndarray::range(from, to, step).collect()
7+
// items
8+
// }
9+
//
10+
items
11+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub mod arange;
2+
pub mod linspace;
3+
pub mod meshgrid;

apps/fluster/src-tauri/src/features/mdx/data/mdx_note_group.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use crate::core::models::taggable::tag_entity::TagEntity;
77
use crate::core::types::errors::errors::{FlusterError, FlusterResult};
88
use crate::core::types::traits::mdx_parser::MdxParser;
99
use crate::core::types::FlusterDb;
10-
use crate::core::utils::date_utils::parse_date;
1110
use crate::features::bibliography::data::bib_entry_entity::BibEntryEntity;
1211
use crate::features::bibliography::data::bib_entry_mdx_parser::BibEntryMdxParser;
1312
use crate::features::bibliography::data::bib_entry_model::BibEntryModel;
@@ -23,7 +22,6 @@ use serde::{Deserialize, Serialize};
2322
use specta::Type;
2423
use std::fs;
2524
use std::fs::Metadata;
26-
use std::str::FromStr;
2725

2826
#[derive(Debug, Clone, Serialize, Deserialize, Type)]
2927
pub struct MdxNoteGroup {

0 commit comments

Comments
 (0)