Skip to content

Commit 967e723

Browse files
committed
Update module docstring and add Pythonic way of gathering the module version information (via a __version__ attribute).
1 parent b1c5259 commit 967e723

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bindings/Python/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "plssvm/environment.hpp" // plssvm::environment::{initialize, finalize}
1111
#include "plssvm/exceptions/exceptions.hpp" // plssvm::exception
12+
#include "plssvm/version/version.hpp" // plssvm::version::version
1213

1314
#include "pybind11/pybind11.h" // PYBIND11_MODULE, py::module_, py::exception, py::register_exception_translator
1415
#include "pybind11/pytypes.h" // py::set_error
@@ -54,7 +55,8 @@ void init_sklearn_svc(py::module_ &);
5455
void init_sklearn_svr(py::module_ &);
5556

5657
PYBIND11_MODULE(plssvm, m) {
57-
m.doc() = "Parallel Least Squares Support Vector Machine";
58+
m.doc() = "PLSSVM - Parallel Least Squares Support Vector Machine";
59+
m.attr("__version__") = plssvm::version::version;
5860

5961
// create a pure-virtual module
6062
py::module_ pure_virtual = m.def_submodule("__pure_virtual");

0 commit comments

Comments
 (0)