From b5905c16d73b193ac37173d16da123429ece223e Mon Sep 17 00:00:00 2001 From: YertleTurtleGit <34098804+YertleTurtleGit@users.noreply.github.com> Date: Fri, 12 Jun 2026 00:21:49 +0200 Subject: [PATCH 1/3] upgraded pyo version --- Cargo.toml | 10 +++++----- src/graph_pca_lib.rs | 3 ++- src/python_lib.rs | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8d1a4ca..4d0bdb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,11 @@ version = "0.2.0" edition = "2021" [dependencies] -pyo3 = { version = "0.21.1", features = ["extension-module"] } -nalgebra = "0.32.3" +pyo3 = { version = "0.29.0", features = ["extension-module"] } +nalgebra = "0.35.0" rayon = "1.8.0" -kdtree = "0.7.0" -petgraph = "0.6.4" +kdtree = "0.8.0" +petgraph = "0.8.3" [lib] name = "graph_pca" @@ -19,4 +19,4 @@ crate-type = ["cdylib"] codegen-units = 1 lto = "fat" panic = "abort" -strip = "symbols" \ No newline at end of file +strip = "symbols" diff --git a/src/graph_pca_lib.rs b/src/graph_pca_lib.rs index f3f90fc..7a52146 100644 --- a/src/graph_pca_lib.rs +++ b/src/graph_pca_lib.rs @@ -127,7 +127,7 @@ fn get_pca(eigenvalues: &[f64]) -> Vec { .collect() } -#[pyclass] +#[pyclass(from_py_object)] #[derive(Clone, PartialEq)] pub enum Feature { Eigenvalues, @@ -198,3 +198,4 @@ pub fn calculate_features( vectors_per_feature } + diff --git a/src/python_lib.rs b/src/python_lib.rs index e993875..20600d8 100644 --- a/src/python_lib.rs +++ b/src/python_lib.rs @@ -3,7 +3,7 @@ use pyo3::prelude::*; mod graph_pca_lib; #[pymodule] -fn graph_pca(_py: Python<'_>, module: &PyModule) -> PyResult<()> { +fn graph_pca(module: &Bound<'_, PyModule>) -> PyResult<()> { module.add_function(wrap_pyfunction!(calculate_features, module)?)?; module.add_class::()?; Ok(()) From 8d653c90062207d8d43dc75541d35a70c02dfaac Mon Sep 17 00:00:00 2001 From: YertleTurtleGit <34098804+YertleTurtleGit@users.noreply.github.com> Date: Fri, 12 Jun 2026 00:23:48 +0200 Subject: [PATCH 2/3] Add files via upload --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4d0bdb6..1238af5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "graph_pca" -version = "0.2.0" +version = "0.3.0" edition = "2021" [dependencies] From ceb497d5d66c339d5bb8d41b45d1e4169ca14561 Mon Sep 17 00:00:00 2001 From: YertleTurtleGit <34098804+YertleTurtleGit@users.noreply.github.com> Date: Fri, 12 Jun 2026 00:25:08 +0200 Subject: [PATCH 3/3] Update pr-test.yml --- .github/workflows/pr-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 4bc1b12..437b729 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -16,6 +16,7 @@ jobs: pip install nbconvert pip install black_nbconvert pip install markupsafe==2.0.1 + pip install toml if [ -f requirements.txt ]; then pip install -r requirements.txt; fi git config --local user.email "action@github.com" git config --local user.name "GitHub Action"