Skip to content

Commit

Permalink
ENH: add a 'human_name' and 'name' convenience functions to PipelineF…
Browse files Browse the repository at this point in the history
…ilter.

Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Apr 17, 2024
1 parent c7a64a7 commit 925781a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ PYBIND11_MODULE(simplnx, mod)
attributeMatrix.def("tuple_shape", &AttributeMatrix::getShape, "Returns the Tuple dimensions of the AttributeMatrix");
attributeMatrix.def("__len__", &AttributeMatrix::getNumTuples, "Returns the total number of tuples");
attributeMatrix.def_property_readonly("size", &AttributeMatrix::getNumTuples, "Returns the total number of tuples");

baseGroup.def("", &BaseGroup::getSize);

py::class_<IArray, DataObject, std::shared_ptr<IArray>> iArray(mod, "IArray");
Expand Down Expand Up @@ -1358,6 +1358,10 @@ PYBIND11_MODULE(simplnx, mod)
pipelineFilter.def("get_args", [internals](PipelineFilter& self) { return ConvertArgsToDict(*internals, self.getParameters(), self.getArguments()); });
pipelineFilter.def("set_args", [internals](PipelineFilter& self, py::dict& args) { self.setArguments(ConvertDictToArgs(*internals, self.getParameters(), args)); }, "args"_a);

Check failure on line 1359 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]
pipelineFilter.def("get_filter", [](PipelineFilter& self) { return self.getFilter(); }, py::return_value_policy::reference_internal);

Check failure on line 1360 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]
pipelineFilter.def("name", [](PipelineFilter& self) { return self.getFilter()->name(); }, "Returns the C++ name of the filter");

Check failure on line 1361 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]
pipelineFilter.def("human_name", [](PipelineFilter& self) { return self.getFilter()->humanName(); }, "Returns the human facing name of the filter");

Check failure on line 1362 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]

Check failure on line 1362 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]



py::class_<PyFilter, IFilter> pyFilter(mod, "PyFilter");
pyFilter.def(py::init<>([](py::object object) { return std::make_unique<PyFilter>(std::move(object)); }));
Expand Down

0 comments on commit 925781a

Please sign in to comment.