Skip to content

Commit 0be339b

Browse files
committed
infrastructure
1 parent d31f553 commit 0be339b

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

python/tskit_glue/Cargo.lock

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/tskit_glue/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ crate-type = ["cdylib"]
1010

1111
[dependencies]
1212
pyo3 = "0.24.0"
13+
serde = {version = "1.0.203", features = ["derive"]}
14+
bincode = {version = "1.3.1"}

python/tskit_glue/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
use pyo3::prelude::*;
22

3+
#[derive(serde::Serialize, serde::Deserialize)]
4+
#[pyclass]
5+
struct MutationMetadata {
6+
effect_size: f64,
7+
dominance: f64,
8+
}
9+
10+
#[derive(serde::Serialize, serde::Deserialize)]
11+
#[pyclass]
12+
struct IndividualMetadata {
13+
name: String,
14+
phenotypes: Vec<i32>,
15+
}
16+
317
/// Formats the sum of two numbers as string.
418
#[pyfunction]
519
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {

0 commit comments

Comments
 (0)