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

Adding error handling examples to mast docs #2736

Merged
merged 13 commits into from
Jul 6, 2023

Conversation

mstcyr2
Copy link
Contributor

@mstcyr2 mstcyr2 commented May 12, 2023

Error handling examples to show users how to avoid/fix possible input-based errors.

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #2736 (8193499) into main (6e83f4d) will increase coverage by 0.17%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2736      +/-   ##
==========================================
+ Coverage   65.87%   66.04%   +0.17%     
==========================================
  Files         233      233              
  Lines       17904    17927      +23     
==========================================
+ Hits        11794    11840      +46     
+ Misses       6110     6087      -23     

see 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

docs/mast/mast.rst Outdated Show resolved Hide resolved
@mstcyr2 mstcyr2 marked this pull request as ready for review June 2, 2023 04:43
docs/mast/mast.rst Outdated Show resolved Hide resolved
docs/mast/mast.rst Outdated Show resolved Hide resolved
docs/mast/mast.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@jaymedina jaymedina left a comment

Choose a reason for hiding this comment

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

Some small edits to existing examples. I suggest removing one of the examples entirely, but feel free to keep it if you feel like it's justifiable. Good work!

docs/mast/mast.rst Outdated Show resolved Hide resolved
docs/mast/mast.rst Outdated Show resolved Hide resolved
docs/mast/mast.rst Outdated Show resolved Hide resolved
docs/mast/mast.rst Outdated Show resolved Hide resolved
@mstcyr2
Copy link
Contributor Author

mstcyr2 commented Jul 3, 2023

@bsipocz I think this is ready to merge. Let me know if you have any other suggestions for this. Thanks!

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.

All the examples cause test failures as the tracebacks are not properly added to the docs. I'll just quickly push a commit and fix it. I'll also rebase to be sure we're all good as there have been a few other PRs since this was branched out, that modified this documentation page.

For the next time, I would suggest to run the remote tests until they are all clean (for this particular case pytest docs/mast -R)


.. doctest-remote-data::

>>> obs_table = Observations.query_object("M8",".02 deg")
Copy link
Member

Choose a reason for hiding this comment

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

This produces a test failure as the error is not exactly copy pasted.

@bsipocz bsipocz added this to the v0.4.7 milestone Jul 6, 2023
@bsipocz bsipocz force-pushed the mast-docs-errorHandlingExamples branch from 8193499 to 1f10a03 Compare July 6, 2023 22:56
@bsipocz
Copy link
Member

bsipocz commented Jul 6, 2023

@jaymedina - the following isn't issue the warning any more, so I also removed that as part of this PR to make sure all the docs is passing:

    >>> from astroquery.mast import Tesscut
    >>> sector_table = Tesscut.get_sectors(objectname="Ceres", moving_target=True)

@bsipocz bsipocz merged commit 3d3dd0d into astropy:main Jul 6, 2023
7 checks passed
@bsipocz
Copy link
Member

bsipocz commented Jul 6, 2023

Thanks @mstcyr2!

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

Successfully merging this pull request may close these issues.

None yet

3 participants