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

DM-430: Modify measurement framework to log plugins error in individual logs #83

Merged
merged 1 commit into from Apr 24, 2017

Conversation

rearmstr
Copy link
Contributor

No description provided.

@@ -78,7 +78,8 @@ class PsfFluxAlgorithm : public SimpleAlgorithm {
/// The control object contains the configuration parameters for this algorithm.
typedef PsfFluxControl Control;

PsfFluxAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema);
PsfFluxAlgorithm(Control const & ctrl, std::string const & name, afw::table::Schema & schema,
std::string const & logName = "");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indentation should match the beginning of the parentheses.


/* Members */
python::declareAlgorithm<SingleFrameAlgorithm>(clsSingleFrameAlgorithm);

clsSimpleAlgorithm.def("measureForced", &SimpleAlgorithm::measureForced,
"measRecord"_a, "exposure"_a, "refRecord"_a, "refWcs"_a);
clsSimpleAlgorithm.def("getLogName", &SimpleAlgorithm::getLogName);
Copy link
Contributor Author

@rearmstr rearmstr Apr 21, 2017

Choose a reason for hiding this comment

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

Shouldn't this be a method of BaseAlgorithm?

@@ -119,8 +125,7 @@ def wrapAlgorithm(Base, AlgClass, factory, executionOrder, name=None, Control=No
If apCorrList is non-empty then shouldApCorr is ignored.
If non-empty and doRegister is True then the names are added to the set
retrieved by getApCorrNameSet


@param[in] hasLogName Plugin supports a logName as a constructor argument
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed extra blank line. Not sure what the standard is, but should be in a separate commit.

if hasattr(ctrl, "makeControl"):
ctrl = ctrl.makeControl()
# logNmae signature needs to be on this Class __init__, but is not needed by the C++ plugin
Copy link
Contributor Author

Choose a reason for hiding this comment

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

logNmae -> logName

class RegisteredPluginsTestCase(AlgorithmTestCase, lsst.utils.tests.TestCase):
"""
Test all the registered Plugins to see if their logName is set as expected.
Those which have the hasLogName=True attribute will have a LogName parameter
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extra space after "True"

Copy link
Contributor Author

@rearmstr rearmstr left a comment

Choose a reason for hiding this comment

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

Looks good.

@pgee2000 pgee2000 force-pushed the tickets/DM-430 branch 3 times, most recently from ba59644 to 28dfd1d Compare April 23, 2017 20:20
…al logs

Logs named for the taskName + pluginName (e.g., measurement.base_PsfFlux)
Name is set by the task, but the name is pushed down to the plugin.
if the plugin class has "hasLogName = True" and an optional "logName"
parameter in its initialization.  If both are so, plugin.getLogName() wil
return the name of the log.

if lsst.log.Log logs are identified by name, not by the logger itself, so the
logName is enough.

C++ routines can use the BaseAlgorithm function getLogName to get the right log.

Log Measurement Errors, which were not previously logged.

Checkin seg fault problem with pybind methods on BaseAlgorithm
Add py:multiple_inheritance to SimpleAlgorithm wrapper.
@pgee2000
Copy link
Contributor

I responded by fixing all the comments on the pull request as per Bob Armstrong's comment.

@pgee2000 pgee2000 merged commit 28dfd1d into master Apr 24, 2017
@ktlim ktlim deleted the tickets/DM-430 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants