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

Update documentation for the gaia query object (#1760) #1871

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

mfonism
Copy link
Member

@mfonism mfonism commented Oct 24, 2020

This PR updates the gaia docs to show how to control the number of rows returned by the gaia query object as per #1760.

It also updates the examples in the docs to match the default behaviours.

@astropy-bot astropy-bot bot added the gaia label Oct 24, 2020
@codecov
Copy link

codecov bot commented Oct 24, 2020

Codecov Report

Merging #1871 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1871      +/-   ##
==========================================
- Coverage   64.44%   64.44%   -0.01%     
==========================================
  Files         200      200              
  Lines       15962    15961       -1     
==========================================
- Hits        10287    10286       -1     
  Misses       5675     5675              
Impacted Files Coverage Δ
astroquery/query.py 61.83% <0.00%> (-0.19%) ⬇️
astroquery/utils/schema.py 67.64% <0.00%> (ø)
astroquery/utils/commons.py 77.00% <0.00%> (ø)
astroquery/utils/tap/core.py 41.21% <0.00%> (ø)
astroquery/utils/decorators.py 11.11% <0.00%> (ø)
astroquery/utils/tap/model/job.py 58.54% <0.00%> (ø)
astroquery/utils/tap/conn/tapconn.py 46.32% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab04f5b...4c17354. Read the comment docs.

@bsipocz bsipocz added this to the v0.4.2 milestone Oct 31, 2020
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

overall looks good, a few minor tweaks are needed before merging

CHANGES.rst Outdated
@@ -81,6 +81,9 @@ alma

gaia
^^^^

- Update documentation to show how to control the number of rows returned by
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the changelog

a rule of thumb is that there is no need for a changelog for changes to the docs, or internals that has non direct effect on user facing behaviour.

0.021615117161838747 1635721458409799680 ...
Length = 50 rows

The query returns a result containing 50 rows by default. The number of rows returned can be controlled by setting ``Gaia.ROW_LIMIT`` appropriately.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe factor out the default value as if it changes, it's difficult to catch in the narrative docs

Suggested change
The query returns a result containing 50 rows by default. The number of rows returned can be controlled by setting ``Gaia.ROW_LIMIT`` appropriately.
Queries return a limited number of rows controlled by ``Gaia.ROW_LIMIT``. To change the default behaviour set this appropriately.

0.005846434715822121 1635721458409799680 ...
0.006209042666371929 1635721458409799680 ...
0.007469463683838576 1635721458409799680 ...
0.008202004514524316 1635721458409799680 ...

Copy link
Member

Choose a reason for hiding this comment

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

Maybe add an additional example for unlimited number of rows.

E.g. work the test from here: https://github.com/astropy/astroquery/blob/master/astroquery/gaia/tests/test_gaia_remote.py#L24 into an example

@bsipocz bsipocz added the hacktoberfest-accepted temporary label to make PRs eligible label Nov 1, 2020
@bsipocz bsipocz merged commit 1eda4c4 into astropy:master Nov 4, 2020
@bsipocz
Copy link
Member

bsipocz commented Nov 4, 2020

Thank you @mfonism!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants