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 CI workflow for pytest #7

Merged
merged 4 commits into from
Jan 21, 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 .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is autogenerated by maturin v1.2.3
# This file is autogenerated by maturin v1.4.0
# To update, run
#
# maturin generate-ci github
# maturin generate-ci github -o .github/workflows/CI.yml
#
name: CI

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "py-framels"
version = "0.5.4"
version = "0.6.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.5.3"
pyo3 = "0.20.0"
framels = "0.6.0"
pyo3 = "0.20.2"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

support [![python](https://img.shields.io/badge/Python-3.8,3.9,3.10,3.11,3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)

![fast](https://camo.githubusercontent.com/e8a50ee9600d66095bf0046f06e65ef8fe0675a40122db2a801d1f66e595add6/68747470733a2f2f692e726564642e69742f74376e733971746235676838312e6a7067)
![fast](images/t7ns9qtb5gh81.jpg)

## Description

Expand Down
Binary file added images/t7ns9qtb5gh81.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added samples/small/aaa.001.tif
Empty file.
Empty file added samples/small/aaa.002.tif
Empty file.
Empty file added samples/small/aaa.003.tif
Empty file.
Empty file added samples/small/aaa.004.tif
Empty file.
Empty file added samples/small/aaa.005.tif
Empty file.
Binary file added samples/small/foo_bar.exr
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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::new(list_paths)).get_paths().to_vec();
let val: Vec<PathBuf> = basic_listing(Paths::from(list_paths)).get_paths().to_vec();
Ok(val)
}

Expand Down
24 changes: 24 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import py_framels


def test_listing():
excepted = ["toto.****.tif@1-2"]
result = py_framels.py_basic_listing(["toto.0001.tif", "toto.0002.tif"])
assert excepted == result


def test_parse_dir():
excepted = ["aaa.***.tif@1-5", "foo_bar.exr"]
result = py_framels.py_parse_dir("./samples/small/")
assert excepted == result


def test_recu_dir():
excepted = [
"./samples",
"./samples/small",
"./samples/small/aaa.***.tif@1-5",
"./samples/small/foo_bar.exr",
]
result = py_framels.py_recursive_dir("./samples/")
assert excepted == result