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 6459 #60
Tickets/dm 6459 #60
Conversation
|
||
return butler.repository._parents[0]._mapper.index['calexp']['visit'][None] | ||
return butler.inputs[0].repo._mapper.index['calexp']['visit'][None] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nicer if this didn't have to know about the mapper internals (or that there's even a mapper at all) and could just use a standard Butler interface. But it isn't a big deal, as this is just a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the mappers (and mapper internals) should be private. I think that's acknowledged by everyone and all agree that this is an acceptable violation of that since it's in a test.
In this case, the index parameter is unique to lsst.pipe.tasks.mocks.simpleMapper.SimpleMapper. One way I can think of to do it would be to create a dataset type for the parameter and have the mapper special case that dataset type to return the value for, in this case, self.index['calexp']['visit'][None](I think it would probably want RFCing, which makes it larger than the scope of this story, IMO)
46f27c6
to
cfa5923
Compare
@@ -436,7 +436,7 @@ def isBadId(self, info, badIdList): | |||
def run(self, args): | |||
"""Ingest all specified files and add them to the registry""" | |||
filenameList = sum([glob(filename) for filename in args.files], []) | |||
root = args.butler.repository._mapper.root | |||
root = args.input #args.butler.repository._mapper.root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless the old version is somehow descriptive, should just delete the comment.
No description provided.