Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickets/DM-17757 Fix creating imports when saving config #139

Merged
merged 1 commit into from
Feb 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/lsst/meas/base/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def fail(self, measRecord, error=None):
self.cpp.fail(measRecord, error.cpp if error is not None else None)


def wrapAlgorithmControl(Base, Control, module=2, hasMeasureN=False):
def wrapAlgorithmControl(Base, Control, module=None, hasMeasureN=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update the parameter docs to reflect the new default as well.

"""Wrap a C++ algorithm's control class into a Python config class.

Parameters
Expand All @@ -77,14 +77,14 @@ def wrapAlgorithmControl(Base, Control, module=2, hasMeasureN=False):
Base class for the returned config.
Control : pybind11-wrapped version of a C++ class.
Control class to be wrapped.
module : module, `str` or `int`; optional
module : module, `str`, `int`, or `None`; optional
Either a module object, a string specifying the name of the module, or
an integer specifying how far back in the stack to look for the module
to use: ``0`` is `lsst.pex.config.wrap`, ``1`` is
`lsst.meas.base.wrappers`, ``2`` is the immediate caller, etc. This
will be used to set ``__module__`` for the new config class, and the
class will also be added to the module. The default is to use the
callers' module.
class will also be added to the module. The default is none in which
case module will be looked up from Control.
hasMeasureN : `bool`, optional
Whether the plugin supports fitting multiple objects at once (if so, a
config option to enable/disable this will be added).
Expand Down