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-11862: Fixes to PosixStorage read/write #78

Merged
merged 2 commits into from Sep 8, 2017
Merged

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Sep 8, 2017

No description provided.

Copy link
Contributor

@parejkoj parejkoj left a comment

Choose a reason for hiding this comment

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

See review comments.

if additionalData.exists("flags"):
kwds = dict(flags=additionalData.getInt("flags"))
else:
kwds = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want another if here for mode="a"? I don't know if there's any way to include "appending" (instead of overwriting) in a butler call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so the same thing here: IMO the fix in this ticket should only be a correct factoring of Jim's commit and if you want to improve on the changes he made I'd like to address that in a separate ticket.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we never want the butler to modify a dataset in-place. If we did, we'd need to first figure out how that interacts with provenance.

finalItem = pythonType.readFits(logLoc.locString(), hdu, flags)
kwds = {}
if additionalData.exists("hdu"):
kwds["hdu"] = additionalData.getInt("hdu")
Copy link
Contributor

Choose a reason for hiding this comment

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

This does lose the INT_MIN default value for "hdu", which we should probably keep? There was a ticket on that topic a while back, and I don't recall the results of it...

Copy link
Contributor Author

@n8pease n8pease Sep 8, 2017

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@n8pease n8pease Sep 8, 2017

Choose a reason for hiding this comment

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

In slack you pointed out the breaking commit, it was a76108b#diff-9c0ba521c98745f8b624916b947c6f4dR698.
The new code here is actually the old code from that diff, at line 375.
That code was introduced by @TallJimbo, in commit ce7e05b, which was created after I created the ticket branch for my commit a76108b, and when I rebased my ticket branch onto master before committing it dropped his change.
So as far as losing INT_MIN goes, you'll have to talk to Jim about that. But as far as correcting my factoring, losing the INT_MIN is the right thing to do.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we need to drop the hdu argument that defaults to INT_MIN. Not all readFits methods take that argument (including the one on PhotoCalib), so we should only forward it if it's present.

@timj timj changed the title Tickets/dm 11862 DM-11862: Fixes to PosixStorage read/write Sep 8, 2017
@n8pease n8pease merged commit cbe45d2 into master Sep 8, 2017
@ktlim ktlim deleted the tickets/DM-11862 branch August 25, 2018 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants