diff --git a/python_bindings/bindings.cpp b/python_bindings/bindings.cpp index ce3445fcda..d28096d4e8 100644 --- a/python_bindings/bindings.cpp +++ b/python_bindings/bindings.cpp @@ -123,6 +123,10 @@ PYBIND11_MODULE(desbordante, module) { "Load data after all options have been set by SetOption calls") .def("get_needed_options", &PyAlgorithmBase::GetNeededOptions, "Get names of options the algorithm needs") + .def("get_possible_options", &PyAlgorithmBase::GetPossibleOptions, + "Get names of options the algorithm may request") + .def("get_description", &PyAlgorithmBase::GetDescription, + "Get description of an option of this algorithm") .def("set_option", &PyAlgorithmBase::SetOption, "option_name"_a, "option_value"_a = pybind11::none(), "Set option value") .def("get_option_type", &PyAlgorithmBase::GetOptionType, "option_name"_a, diff --git a/python_bindings/py_algorithm.cpp b/python_bindings/py_algorithm.cpp index 44ca5e49a9..d39254101a 100644 --- a/python_bindings/py_algorithm.cpp +++ b/python_bindings/py_algorithm.cpp @@ -58,6 +58,14 @@ std::unordered_set PyAlgorithmBase::GetNeededOptions() const { return algorithm_->GetNeededOptions(); } +std::unordered_set PyAlgorithmBase::GetPossibleOptions() const { + return algorithm_->GetPossibleOptions(); +} + +std::string_view PyAlgorithmBase::GetDescription(std::string_view option_name) const { + return algorithm_->GetDescription(option_name); +} + py::frozenset PyAlgorithmBase::GetOptionType(std::string_view option_name) const { auto type_index = algorithm_->GetTypeIndex(option_name); if (type_index == void_index) diff --git a/python_bindings/py_algorithm.h b/python_bindings/py_algorithm.h index 39b52fc494..b27c908c36 100644 --- a/python_bindings/py_algorithm.h +++ b/python_bindings/py_algorithm.h @@ -46,6 +46,10 @@ class PyAlgorithmBase { [[nodiscard]] std::unordered_set GetNeededOptions() const; + [[nodiscard]] std::unordered_set GetPossibleOptions() const; + + [[nodiscard]] std::string_view GetDescription(std::string_view option_name) const; + [[nodiscard]] pybind11::frozenset GetOptionType(std::string_view option_name) const; // For pandas dataframes