Skip to content

Commit

Permalink
PyO3, UV and change structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Hennzau committed Sep 5, 2024
1 parent c7c7006 commit e7e1fdb
Show file tree
Hide file tree
Showing 25 changed files with 139 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ docs/_build/
# Pyenv
.python-version

# PyO3 config
# PyO3
.pyo3_config

# UV
Expand Down
82 changes: 50 additions & 32 deletions Cargo.lock

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

18 changes: 15 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[workspace]
members = []

[package]
name = "fastformat"
version = "0.1.0"
Expand All @@ -11,7 +14,16 @@ name = "fastformat"
crate-type = ["cdylib", "lib"]

[dependencies]
pyo3 = "0.21.1"
ndarray = "0.15.4"
arrow = "52.1.0"
eyre = "0.6.12"
pyo3 = { version = "0.21", features = [
"eyre",
"abi3-py37",
"multiple-pymethods",
] }
arrow = { workspace = true }
eyre = { workspace = true }

[workspace.dependencies]
arrow = { version = "52" }
eyre = "0.6.7"
fastformat = "0.1.0"
73 changes: 0 additions & 73 deletions examples/dora-benchmark/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion examples/dora-benchmark/receiver-fastformat/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use dora_node_api::{self, DoraNode, Event};
use std::time::{Duration, Instant};

use fastformat::image::Image;
use fastformat::datatypes::Image;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let (_node, mut events) = DoraNode::init_from_env()?;
Expand Down
2 changes: 1 addition & 1 deletion examples/dora-benchmark/sender-fastformat/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rand::Rng;
use std::collections::HashMap;
use std::time::Duration;

use fastformat::image::Image;
use fastformat::datatypes::Image;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let latency = DataId::from("latency".to_owned());
Expand Down
2 changes: 1 addition & 1 deletion examples/dora-benchmark/sender-raw/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use rand::Rng;
use std::collections::HashMap;
use std::time::Duration;

use fastformat::image::Image;
use fastformat::datatypes::Image;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let latency = DataId::from("latency".to_owned());
Expand Down
2 changes: 1 addition & 1 deletion examples/dummy-opencv-capture/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate fastformat;

use fastformat::image::Image;
use fastformat::datatypes::Image;

fn camera_read() -> ndarray::Array<u8, ndarray::Ix3> {
// Dummy camera read
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = ["version"]

[tool.maturin]
features = ["pyo3/extension-module"]

[tool.pyright]
venvPath = ".venv"
1 change: 1 addition & 0 deletions src/converter.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod arrow;
File renamed without changes.
5 changes: 5 additions & 0 deletions src/datatypes.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pub mod bbox;
pub mod image;

pub use bbox::BBox;
pub use image::Image;
Loading

0 comments on commit e7e1fdb

Please sign in to comment.