Skip to content

Commit

Permalink
0.0.9a1
Browse files Browse the repository at this point in the history
  • Loading branch information
smijeva committed Dec 18, 2023
1 parent e9ea8c1 commit 402634b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "biodivine-aeon-py"
version = "0.4.0-alpha5"
version = "0.0.9-alpha1"
edition = "2021"

[lib]
Expand All @@ -19,7 +19,7 @@ static-z3 = ["z3/static-link-z3"]
pyo3 = { version = "0.20.0", features = ["abi3-py37", "extension-module"] }
biodivine-lib-param-bn = { version="0.4.7", features=["solver-z3"] }
biodivine-lib-bdd = "0.5.2"
biodivine-pbn-control = { git = "https://github.com/sybila/biodivine-pbn-control", rev = "5c69d18" }
biodivine-pbn-control = { git = "https://github.com/sybila/biodivine-pbn-control", rev = "70d4e0d" }
biodivine-hctl-model-checker = "0.2.0"
rand = "0.8.5"
macros = { path = "macros" }
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "biodivine_aeon" %}
{% set version = "0.4.0a5" %}
{% set version = "0.0.9a1" %}

package:
name: "{{ name|lower }}"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "biodivine_aeon"
repository = "https://github.com/sybila/biodivine-aeon-py/"
documentation = "https://biodivine.fi.muni.cz/docs/aeon-py/v0.4.0a5/"
description = "Python bindings for the tool AEON."
version = "0.4.0a5"
version = "0.0.9a1"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
Expand Down
15 changes: 12 additions & 3 deletions src/bindings/pbn_control/_impl_phenotype_control_map.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::collections::HashMap;
use crate::bindings::lib_bdd::PyBdd;
use crate::bindings::lib_param_bn::{PyGraphColoredVertices, PyGraphColors};
use crate::bindings::pbn_control::PyPhenotypeControlMap;
use crate::AsNative;
use crate::bindings::pbn_control::{PyPerturbationGraph, PyPhenotypeControlMap};
use crate::{AsNative, throw_runtime_error};
use biodivine_pbn_control::phenotype_control::PhenotypeControlMap;
use pyo3::prelude::*;
use pyo3::types::PyDict;
use pyo3::types::{PyDict, PyList};

fn py_dict_to_rust_hashmap(py_dict: &PyDict) -> HashMap<String, bool> {
let mut rust_hashmap = HashMap::new();
Expand Down Expand Up @@ -53,6 +53,15 @@ impl AsNative<PhenotypeControlMap> for PyPhenotypeControlMap {

#[pymethods]
impl PyPhenotypeControlMap {
#[new]
pub fn new(colors: PyGraphColoredVertices, stg: PyPerturbationGraph) -> Self {
PhenotypeControlMap::new(
stg.as_native().clone(),
colors.as_native().clone(),
).into()
}


/// Obtain a copy of the underlying `Bdd` representing this map.
pub fn as_bdd(&self) -> PyBdd {
self.as_native().as_bdd().clone().into()
Expand Down

0 comments on commit 402634b

Please sign in to comment.