Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed use statements, use num-dual and quantity from crates.io
  • Loading branch information
g-bauer authored and prehner committed Jan 24, 2023
commit 12b5a17e27792e8f2a47d95b7be7cb3903acf33e
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ members = ["feos-core", "feos-dft", "feos-derive"]
crate-type = ["rlib", "cdylib"]

[dependencies]
quantity = { git = "https://github.com/itt-ustutt/quantity" }
num-dual = { git = "https://github.com/itt-ustutt/num-dual", features = ["linalg"] }
quantity = "0.6"
num-dual = { version = "0.6", features = ["linalg"] }
Comment thread
prehner marked this conversation as resolved.
Outdated
feos-core = { version = "0.3", path = "feos-core" }
feos-dft = { version = "0.3", path = "feos-dft", optional = true }
feos-derive = { version = "0.1", path = "feos-derive" }
Expand Down
2 changes: 1 addition & 1 deletion feos-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ features = [ "rayon" ]

[dependencies]
quantity = "0.6"
num-dual = { git = "https://github.com/itt-ustutt/num-dual", features = ["linalg"] }
num-dual = { version = "0.6", features = ["linalg"] }
ndarray = { version = "0.15", features = ["serde"] }
num-traits = "0.2"
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion feos-dft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ features = [ "rayon" ]

[dependencies]
quantity = { version = "0.6", features = ["linalg"] }
num-dual = { git = "https://github.com/itt-ustutt/num-dual" }
num-dual = "0.6"
feos-core = { version = "0.3", path = "../feos-core" }
ndarray = "0.15"
rustdct = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion src/python/dft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use pyo3::exceptions::{PyIndexError, PyValueError};
use pyo3::prelude::*;
#[cfg(feature = "estimator")]
use pyo3::wrap_pymodule;
use quantity::python::*;
use quantity::python::{PySINumber, PySIArray1, PySIArray2, PySIArray3};
use quantity::si::*;
use std::collections::HashMap;
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion src/python/eos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use pyo3::exceptions::{PyIndexError, PyValueError};
use pyo3::prelude::*;
#[cfg(feature = "estimator")]
use pyo3::wrap_pymodule;
use quantity::python::*;
use quantity::python::{PySINumber, PySIArray1, PySIArray2, PySIArray3};
use quantity::si::*;
use std::collections::HashMap;
use std::sync::Arc;
Expand Down
36 changes: 18 additions & 18 deletions src/python/mod.rs
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
#[cfg(feature = "gc_pcsaft")]
use crate::gc_pcsaft::python::__PYO3_PYMODULE_DEF_GC_PCSAFT;
use crate::gc_pcsaft::python::gc_pcsaft as gc_pcsaft_module;
#[cfg(feature = "pcsaft")]
use crate::pcsaft::python::__PYO3_PYMODULE_DEF_PCSAFT;
use crate::pcsaft::python::pcsaft as pcsaft_module;
#[cfg(feature = "pets")]
use crate::pets::python::__PYO3_PYMODULE_DEF_PETS;
use crate::pets::python::pets as pets_module;
#[cfg(feature = "saftvrqmie")]
use crate::saftvrqmie::python::__PYO3_PYMODULE_DEF_SAFTVRQMIE;
use crate::saftvrqmie::python::saftvrqmie as saftvrqmie_module;
#[cfg(feature = "uvtheory")]
use crate::uvtheory::python::__PYO3_PYMODULE_DEF_UVTHEORY;
use crate::uvtheory::python::uvtheory as uvtheory_module;

use pyo3::prelude::*;
use pyo3::wrap_pymodule;
use quantity::python::__PYO3_PYMODULE_DEF_QUANTITY;
use quantity::python::quantity as quantity_module;

mod cubic;
mod eos;
use cubic::__PYO3_PYMODULE_DEF_CUBIC;
use eos::__PYO3_PYMODULE_DEF_EOS;
use cubic::cubic as cubic_module;
use eos::eos as eos_module;

#[cfg(feature = "dft")]
mod dft;
#[cfg(feature = "dft")]
use dft::__PYO3_PYMODULE_DEF_DFT;
use dft::dft as dft_module;

#[pymodule]
pub fn feos(py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add("__version__", env!("CARGO_PKG_VERSION"))?;
m.add_wrapped(wrap_pymodule!(quantity))?;
m.add_wrapped(wrap_pymodule!(quantity_module))?;

m.add_wrapped(wrap_pymodule!(eos))?;
m.add_wrapped(wrap_pymodule!(eos_module))?;
#[cfg(feature = "dft")]
m.add_wrapped(wrap_pymodule!(dft))?;
m.add_wrapped(wrap_pymodule!(cubic))?;
m.add_wrapped(wrap_pymodule!(dft_module))?;
m.add_wrapped(wrap_pymodule!(cubic_module))?;
#[cfg(feature = "pcsaft")]
m.add_wrapped(wrap_pymodule!(pcsaft))?;
m.add_wrapped(wrap_pymodule!(pcsaft_module))?;
#[cfg(feature = "gc_pcsaft")]
m.add_wrapped(wrap_pymodule!(gc_pcsaft))?;
m.add_wrapped(wrap_pymodule!(gc_pcsaft_module))?;
#[cfg(feature = "pets")]
m.add_wrapped(wrap_pymodule!(pets))?;
m.add_wrapped(wrap_pymodule!(pets_module))?;
#[cfg(feature = "uvtheory")]
m.add_wrapped(wrap_pymodule!(uvtheory))?;
m.add_wrapped(wrap_pymodule!(uvtheory_module))?;
#[cfg(feature = "saftvrqmie")]
m.add_wrapped(wrap_pymodule!(saftvrqmie))?;
m.add_wrapped(wrap_pymodule!(saftvrqmie_module))?;

set_path(py, m, "feos.si", "quantity")?;
set_path(py, m, "feos.eos", "eos")?;
Expand Down