Browse Source

Enable function signatures in documentation by default

refactoring
Matthias Volk 5 years ago
parent
commit
d94317b17e
  1. 2
      CMakeLists.txt
  2. 2
      src/mod_core.cpp
  3. 5
      src/mod_info.cpp
  4. 5
      src/mod_utility.cpp

2
CMakeLists.txt

@ -4,7 +4,7 @@ project(pystorm)
find_package(storm REQUIRED) find_package(storm REQUIRED)
add_subdirectory(resources/pybind11) add_subdirectory(resources/pybind11)
option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentation" ON)
option(STORMPY_DISABLE_SIGNATURE_DOC "Disable the signature in the documentation" OFF)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h)

2
src/mod_core.cpp

@ -15,7 +15,7 @@ PYBIND11_MODULE(core, m) {
#ifdef STORMPY_DISABLE_SIGNATURE_DOC #ifdef STORMPY_DISABLE_SIGNATURE_DOC
py::options options; py::options options;
// options.disable_function_signatures();
options.disable_function_signatures();
#endif #endif
define_environment(m); define_environment(m);

5
src/mod_info.cpp

@ -4,6 +4,11 @@
PYBIND11_MODULE(info, m) { PYBIND11_MODULE(info, m) {
m.doc() = "Storm information"; m.doc() = "Storm information";
#ifdef STORMPY_DISABLE_SIGNATURE_DOC
py::options options;
options.disable_function_signatures();
#endif
py::class_<storm::utility::StormVersion>(m, "Version", "Version information for Storm") py::class_<storm::utility::StormVersion>(m, "Version", "Version information for Storm")
// static properties are still called with self as argument (which we ignore), see // static properties are still called with self as argument (which we ignore), see
// https://pybind11.readthedocs.io/en/master/advanced/classes.html#static-properties // https://pybind11.readthedocs.io/en/master/advanced/classes.html#static-properties

5
src/mod_utility.cpp

@ -8,6 +8,11 @@
PYBIND11_MODULE(utility, m) { PYBIND11_MODULE(utility, m) {
m.doc() = "Utilities for Storm"; m.doc() = "Utilities for Storm";
#ifdef STORMPY_DISABLE_SIGNATURE_DOC
py::options options;
options.disable_function_signatures();
#endif
define_ksp(m); define_ksp(m);
define_smt(m); define_smt(m);
define_chrono(m); define_chrono(m);

Loading…
Cancel
Save