update the NED queries page#3606
Conversation
NED API call updates including testing and documentation based on NED N36.1 release
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3606 +/- ##
==========================================
- Coverage 73.21% 73.19% -0.03%
==========================================
Files 226 226
Lines 21055 21176 +121
==========================================
+ Hits 15416 15499 +83
- Misses 5639 5677 +38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Regarding the ReadTheDocs build failure: no warnings or errors specific to docs/ipac/ned/ned.rst were found locally (make html SPHINXOPTS="-W" returned clean). Could this be related to a pre-existing issue rather than changes in this PR? Please advise. |
|
I get that warning locally, too and I've double checked that we don't really expose the exceptions into the public API. |
bsipocz
left a comment
There was a problem hiding this comment.
I still need to do actual code review, and will also suggest to squash out a few commits (the ones that added and then removed the bigger test files); but here is just the fix for the docs builld issue
| Length = 190 rows | ||
|
|
||
| All above queries return results in a `~astropy.table.Table` or raise a Exception error (i.e. | ||
| `~astroquery.exceptions.RemoteServiceError`) if the service returns a query error. |
There was a problem hiding this comment.
we don't expose this in the public API, you can either keep it within double backticks or remove the parenthesis altogether.
| To handle errors gracefully, wrap the query in a ``try/except`` block to catch the exception | ||
| and retrieve the error message. The following example demonstrates this pattern. | ||
|
|
||
| .. doctest-remote-data:: | ||
|
|
||
| >>> from astroquery.ipac.ned import Ned | ||
| >>> try: | ||
| >>> result_table = Ned.query_object("mm") | ||
| >>> print(result_table) | ||
| >>> except Exception as e: | ||
| >>> print(e) | ||
| The remote service returned the following message. | ||
| ERROR: GeneralFault: | ||
| Service could not complete request; Failed to resolve input object name (6) |
There was a problem hiding this comment.
I think we can/should drop this section; we don't need to teach users basic error/warning handling. Though, if you think it's necessary for NED users, then I would recommend to show an example where you except on specific Exceptions rather than caption it too generically (which we never recommend as a good coding practice)
Updates on NED web service calls including the parts of the core functions, testing and documentation based on NED N36.1 release
The changes are made on astroquery/ipac/ned/core.py, astroquery/ipac/ned/tests/, and docs/ipac/ned/.