start using semver, fix doc.rs issue
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
mod bioformats;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ impl Metadata for Ome {
|
||||
|
||||
fn get_image(&self) -> Option<&Image> {
|
||||
if let Some(image) = &self.image.first() {
|
||||
Some(&image)
|
||||
Some(image)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::sync::Arc;
|
||||
|
||||
impl From<crate::error::Error> for PyErr {
|
||||
fn from(err: crate::error::Error) -> PyErr {
|
||||
PyErr::new::<PyValueError, _>(err.to_string())
|
||||
color_eyre::eyre::Report::from(err).into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ impl ViewConstructor {
|
||||
}
|
||||
}
|
||||
|
||||
#[pyclass(subclass, module = "ndbioimage.ndbioimage_rs")]
|
||||
#[pyclass(subclass, from_py_object, module = "ndbioimage.ndbioimage_rs")]
|
||||
#[pyo3(name = "View")]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
struct PyView {
|
||||
@@ -982,6 +982,7 @@ fn py_download_bioformats(gpl_formats: bool) -> PyResult<()> {
|
||||
#[pymodule]
|
||||
#[pyo3(name = "ndbioimage_rs")]
|
||||
fn ndbioimage_rs(m: &Bound<PyModule>) -> PyResult<()> {
|
||||
color_eyre::install()?;
|
||||
m.add_class::<PyView>()?;
|
||||
m.add_class::<ViewConstructor>()?;
|
||||
m.add_function(wrap_pyfunction!(py_download_bioformats, m)?)?;
|
||||
|
||||
Reference in New Issue
Block a user