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-15831: Use astropy for ra/dec string parsing #18

Merged
merged 6 commits into from Sep 24, 2018
Merged

Conversation

timj
Copy link
Member

@timj timj commented Sep 21, 2018

Also flake8 clean the code.

@@ -203,31 +211,34 @@ def std_raw(self, item, dataId):
return item

def std_dark(self, item, dataId):
"""Standardiation of master dark frame. Must only be called on master darks.
"""Standardiation of master dark frame. Must only be called on master
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's not your typo, but while you're touching this could you do Standardiation --> Standardization please?


@param[in] md image metadata
@return sanitized and concatenated filter name
"""
filt1 = self._translate_filter(md.getScalar("FILTER1").rstrip().lstrip())
filt2 = self._translate_filter(md.getScalar("FILTER2").rstrip().lstrip())
sorted_filter = [filt1, filt2]
sorted_filter.sort() #we want to be insensitive to filter order, for now at least
Copy link
Contributor

Choose a reason for hiding this comment

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

I think comments like this are allowed as the line was under length, and it's not a "block comment" but I don't really mind that it's been changed, just wanted to check I hadn't misunderstood the rules...

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right that I didn't have to shift the comment to its own line. The reason I did so is personal preference. For longer commentary I prefer explaining the reasoning before the code line happens, rather than having the reason as an addendum.

@@ -0,0 +1,11 @@
[flake8]
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for setting this up as part of this ticket 🙏

@mfisherlevine
Copy link
Contributor

Looks good. I didn't see a PR for the utils package and haven't been made reviewer on Jira (the ticket isn't even "In progress" over there), so just giving this the 👍 here as I figured that might all be for a reason. Feel free to make me the reviewer over there if not though and I'll just approve it.

@timj
Copy link
Member Author

timj commented Sep 24, 2018

Thanks for the review. DM-15831 is the more general "code removal" ticket and hasn't been approved in RFC yet. This change is needed for that but given that this PR seems like a good thing to do independent of the RFC being approved it seemed worth doing anyhow. Thanks for looking at the change.

@timj timj merged commit 4228645 into master Sep 24, 2018
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

2 participants