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
Fixing single letter variables in vsa,wfau,xmatch #1880
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1880 +/- ##
=======================================
Coverage 64.44% 64.44%
=======================================
Files 200 200
Lines 15962 15962
=======================================
Hits 10287 10287
Misses 5675 5675
Continue to review full report at Codecov.
|
docs/gaia/gaia.rst
Outdated
gaiadr1.phot_variable_time_series_gfov | ||
gaiadr1.ppmxl_neighbourhood | ||
gaiadr1.gsc23_neighbourhood | ||
#gaiadr1.phot_variable_time_series_gfov |
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.
this seems to be coming from an unrelated commit, please remove the commit
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.
OK, now reading your description it's clear that you added changes for two issues in one PR.
The general the suggestion is to avoid this, keep PRs self contained around one topic (either multiple issues of a module when part of a bigger refactor/development, or one issue for multiple modules).
Either way, this change doesn't address the issue. The output in this example should be what the commands above give back, and there are no commented out lines in that output.
astroquery/xmatch/core.py
Outdated
while colnames.count(cn) > 0: | ||
colnames[colnames.index(cn)] = cn + "_{ii}".format(ii=ii) | ||
ii += 1 | ||
for item in colnames: |
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 would suggest to use descriptive variable names, that is also part of the motivation for this cleanup.
E.g. item
--> column
or colname
ii
-> could either stay or call it count
, but it
is not better than ii
at all.
astroquery/xmatch/core.py
Outdated
@@ -109,11 +109,11 @@ def query_async(self, cat1, cat2, max_distance, colRA1=None, colDec1=None, | |||
|
|||
return response | |||
|
|||
def _prepare_sending_table(self, i, payload, kwargs, cat, colRA, colDec): | |||
def _prepare_sending_table(self, it, payload, kwargs, cat, colRA, colDec): |
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
is not descriptive. Maybe use cat_index
astroquery/wfau/core.py
Outdated
@@ -286,10 +286,10 @@ def get_images_async(self, coordinates, waveband='all', frame_type='stack', | |||
if verbose: | |||
print("Found {num} targets".format(num=len(image_urls))) | |||
|
|||
return [commons.FileContainer(U, encoding='binary', | |||
return [commons.FileContainer(Uobj, encoding='binary', |
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.
use url
instead of Uobj
There seems to be some misunderstanding about the workflow. You don't need to open PRs in your own fork. You can but it is not necessary as you can and should open a PR to the main astroquery repo from a branch from your fork (I guess the issue was that once you made your branches correctly, you went to github.com/sebaucillon/astroquery rather than github.com/astropy/astroquery). So, for the PR to astroquery, it should be done from your feature branch rather than from master. Doing so will save you a lot of headaches, as well as will make it much easier to work on multiple PRs parallel, and keeping up with the code changing in the meantime. Here is some documentation about the workflow: https://docs.astropy.org/en/latest/development/workflow/development_workflow.html#workflow and also a worked out example of a pull request: https://docs.astropy.org/en/latest/development/workflow/git_edit_workflow_examples.html#astropy-fix-example But now, we can still fix up this PR, by squashing all the commits together, and next time you can work from a feature branch. Squashing is very similar to an interactive rebase, so I'll go with a rebase route. Some docs is here: https://docs.astropy.org/en/latest/development/workflow/development_workflow.html#rebase-but-only-if-asked In summary, first you check whether the main repo is added as a remote:
First sync the content Make a copy of your branch, just to be on the safe side and have a backup you can easily come back to is something goes wrong.
You start an interactive rebase:
This brings up an editor, with 8 commits. Change the first
Save and exit. A new editor window will open up, edit the commit message there to add Now, push it back to your remote. It has to be a force push as this is changing the history.
You should be all set, and the PR will most likely ready to be merged. |
Thank you @sebaucillon, this all looks good now. |
Thank you @bsipocz . I was indeed a bit confused with the whole workflow (I actually had just one remote, origin, with the fetch address being the astropy/astroquery and the push address being my sebaucillon/astroquery clone). Your comments made things a lot more clear for me. Thanks again. |
issue #1572 (renaming single letter variables in vsa, wfau, xmatch, tested by @mfonism )
issue #1217 (changing docs from DR1 to DR2, untested)