Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update framels requirement from 0.6.0 to 0.7.0 #11

Merged
merged 2 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py-framels"
version = "0.6.0"
version = "0.7.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -9,5 +9,5 @@ name = "py_framels"
crate-type = ["cdylib"]

[dependencies]
framels = "0.6.0"
framels = "0.7.0"
pyo3 = "0.20.2"
Binary file modified benchmark/bench_100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified benchmark/bench_25000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def benchmark_pyseq(x: list[int]):
for i in range(0, i):
data_set.append(f"{aov}_left.{str(i).zfill(6)}.exr")
now = datetime.now()
py_framels.py_basic_listing(data_set)
py_framels.py_basic_listing(data_set, False)
y1.append((datetime.now() - now).total_seconds())

now = datetime.now()
Expand Down
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ use pyo3::prelude::*;

/// Pack the vector of pathbuf
#[pyfunction]
fn py_basic_listing(list_paths: Vec<PathBuf>) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(Paths::from(list_paths)).get_paths().to_vec();
fn py_basic_listing(list_paths: Vec<PathBuf>, multithreaded: bool) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(Paths::from(list_paths), multithreaded).get_paths().to_vec();
Ok(val)
}

/// Parse a directory
#[pyfunction]
fn py_parse_dir(path: String) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(parse_dir(&path)).get_paths().to_vec();
fn py_parse_dir(path: String, multithreaded: bool) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(parse_dir(&path), multithreaded).get_paths().to_vec();
Ok(val)
}

/// Walk a directory and his subfolder
#[pyfunction]
fn py_recursive_dir(path: String) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(recursive_dir(&path)).get_paths().to_vec();
fn py_recursive_dir(path: String, multithreaded: bool) -> PyResult<Vec<PathBuf>> {
let val: Vec<PathBuf> = basic_listing(recursive_dir(&path), multithreaded).get_paths().to_vec();
Ok(val)
}

Expand Down
Loading