-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Remove *CoordGenerator
classes
#2558
Conversation
a6fbd23
to
c1020d6
Compare
Codecov Report
@@ Coverage Diff @@
## main #2558 +/- ##
==========================================
- Coverage 63.97% 63.95% -0.02%
==========================================
Files 132 132
Lines 16984 16975 -9
==========================================
- Hits 10866 10857 -9
Misses 6118 6118
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
The notion of this PR is great and highly appreciated, but please don't reformat the lines and add practically empty ones. We allow longer lines, many of the changes fit into a one lines, please don't cut them off at 80/88 and make it a 3 liner.
response = heasarc.query_region_async(c, mission=mission, | ||
radius='1 degree') | ||
response = heasarc.query_region_async( | ||
skycoord_3C_273, mission=mission, radius="1 degree" |
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.
These should very much fit into one line.
radius='1 degree') | ||
response = heasarc.query_region_async( | ||
skycoord_3C_273, mission=mission, radius="1 degree" | ||
) |
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.
we don't do black here, please don't have hanging closing parens if possible
dec=69.065294722 * u.deg, | ||
frame='icrs')), | ||
'regSize': 5}), ]) | ||
( |
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.
again, don't use black, please reformat without empty lines with single parens and trailing comas
OBJ_LIST = [ | ||
"m31", | ||
"00h42m44.330s +41d16m07.50s", | ||
SkyCoord(l=121.1743 * u.deg, b=-21.5733 * u.deg, frame="galactic") |
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.
keep only the PR relevant changes, e.g. getting rid of the coorgenerator, please don't reformat
poly1 = [ | ||
SkyCoord(ra=10.1 * u.deg, dec=10.1 * u.deg), | ||
SkyCoord(ra=10.0 * u.deg, dec=10.1 * u.deg), | ||
SkyCoord(ra=10.0 * u.deg, dec=10.0 * u.deg), | ||
] |
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.
Keep the style, the additional 2 lines don't add anyting
poly1 = [ | |
SkyCoord(ra=10.1 * u.deg, dec=10.1 * u.deg), | |
SkyCoord(ra=10.0 * u.deg, dec=10.1 * u.deg), | |
SkyCoord(ra=10.0 * u.deg, dec=10.0 * u.deg), | |
] | |
poly1 = [SkyCoord(ra=10.1 * u.deg, dec=10.1 * u.deg), | |
SkyCoord(ra=10.0 * u.deg, dec=10.1 * u.deg), | |
SkyCoord(ra=10.0 * u.deg, dec=10.0 * u.deg)] |
unit=(u.deg, u.deg)), | ||
frame_type='interleave', programme_id="GCS", waveband="K", | ||
radius=20 * u.arcmin) | ||
icrs_skycoord, |
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.
these can now very much fit into one or max two lines
`astroquery.utils.commons` defined a few classes which allowed constructing `astropy.coordinates.SkyCoord` instances without having to specify the `frame` keyword at the cost of having to specify the correct class instead. They provided little value, and all the code that used them now uses `SkyCoord` directly.
c1020d6
to
c029146
Compare
I've reformatted the lines I've edited so that there are no longer any brackets between whitespace characters, or between a whitespace character and a trailing comma. |
Thanks @eerovaher! |
astroquery.utils.commons
defined a few classes which allowed constructingastropy.coordinates.SkyCoord
instances without having to specify theframe
keyword at the cost of having to specify the correct class instead. They provided little value, and all the code that used them now usesSkyCoord
directly.Contributes towards #2096 and #2429.