Skip to content

Commit

Permalink
Update maturin to 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Oct 18, 2023
1 parent aea6e9e commit ff7221e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ crate-type = ["cdylib", "rlib"]
static-z3 = ["z3/static-link-z3"]

[dependencies]
pyo3 = { version = "0.19.0", features = ["abi3-py37", "extension-module"] }
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 = "0.2.1"
biodivine-hctl-model-checker = "0.2.0"
rand = "0.8.5"
macros = { path = "macros" }
zip = "0.6.3"
zip = "0.6.6"

# Include Z3 dependencies as strictly as possible, we don't want
# this to change because it might break our release builds.
z3="^0.12.1"
z3-sys = "^0.8.1"

[build-dependencies]
pyo3-build-config = "0.19.0"
pyo3-build-config = "0.20.0"
4 changes: 2 additions & 2 deletions src/bindings/lib_param_bn/_impl_boolean_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,14 @@ impl PyBooleanNetwork {
}

pub fn add_parameter(&mut self, parameter: &PyDict) -> PyResult<PyParameterId> {
let name = parameter.get_item("name");
let name = parameter.get_item("name")?;
let name = if let Some(name) = name {
name.extract::<String>()?
} else {
return throw_type_error("Expected string name.");
};

let arity = parameter.get_item("arity");
let arity = parameter.get_item("arity")?;
let arity = if let Some(arity) = arity {
arity.extract::<u32>()?
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/bindings/lib_param_bn/_impl_regulatory_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,18 +315,18 @@ fn regulation_to_python(py: Python, reg: &Regulation) -> PyResult<PyObject> {
pub(crate) fn regulation_from_python(
dict: &PyDict,
) -> PyResult<(&PyAny, &PyAny, bool, Option<Monotonicity>)> {
let Some(source) = dict.get_item("source") else {
let Some(source) = dict.get_item("source")? else {
return throw_type_error("Missing regulation source variable.");
};
let Some(target) = dict.get_item("target") else {
let Some(target) = dict.get_item("target")? else {
return throw_type_error("Missing regulation target variable.");
};
let observable = dict
.get_item("observable")
.get_item("observable")?
.map(|it| it.extract::<bool>())
.unwrap_or(Ok(true))?;
let monotonicity = dict
.get_item("monotonicity")
.get_item("monotonicity")?
.map(|it| it.extract::<String>())
.transpose()?;
let monotonicity = monotonicity
Expand Down

0 comments on commit ff7221e

Please sign in to comment.