Skip to content

update the NED queries page#3606

Open
cwang2016 wants to merge 7 commits into
astropy:mainfrom
cwang2016:ipac_ned_dbr
Open

update the NED queries page#3606
cwang2016 wants to merge 7 commits into
astropy:mainfrom
cwang2016:ipac_ned_dbr

Conversation

@cwang2016

Copy link
Copy Markdown

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/.

NED API call updates including testing and documentation based on NED N36.1 release
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.26609% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.19%. Comparing base (a06ebef) to head (97bb829).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/ipac/ned/core.py 86.14% 32 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cwang2016

Copy link
Copy Markdown
Author

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.

@bsipocz

bsipocz commented Jun 9, 2026

Copy link
Copy Markdown
Member

I get that warning locally, too and I've double checked that we don't really expose the exceptions into the public API.

@bsipocz bsipocz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread docs/ipac/ned/ned.rst Outdated
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we don't expose this in the public API, you can either keep it within double backticks or remove the parenthesis altogether.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed per the comment.

Comment thread docs/ipac/ned/ned.rst Outdated
Comment on lines +277 to +290
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, this part is removed.

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.

2 participants