-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Updates to nasa_exoplanet_archive module to make it compatible with Archive 2.0 #2067
Conversation
Hello @rickynilsson! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-06-18 00:02:22 UTC |
@rickynilsson - I don't see an obvious reason for the cancelled jobs (they will be cancelled when there one of the fails, but haven't seen any of them got to that stage yet), I've restarted the workflow. |
Now codestyle check failed. Just fixed those issues and committed again. |
@bsipocz - the oldest dependencies (Python 3.6) tests should pass, as far as I can see. They run fine in my Python 3.6 environment, and https://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI?table=aliastable&objname=HAT-P-11+b&format=csv responds as expected (as you can verify). Not sure how to troubleshoot this one. |
The issue with that test (that will come up in all the other runs, too) that they are not marked with To fix it, decorate the test functions that reach out to the server with |
Codecov Report
@@ Coverage Diff @@
## main #2067 +/- ##
==========================================
- Coverage 66.81% 66.56% -0.26%
==========================================
Files 407 407
Lines 27454 27647 +193
==========================================
+ Hits 18344 18403 +59
- Misses 9110 9244 +134
Continue to review full report at Codecov.
|
@bsipocz - I decorated the remote tests and moved them over to the |
Hi @bsipocz, @keflavich, @ceb8, |
@bsipocz, @keflavich, @ceb8 - It appears checks were automatically cancelled for no obvious reasons (no failed check). This happened once before, but then went through when workflow was restarted. |
@bsipocz, @keflavich, @ceb8: CI / Python 3.8 with all dependencies with remote data (pull_request) got skipped and rest got cancelled again. Any idea what could be going on? |
I'm not sure what's going on with these actions, I've just restarted the workflow but it got cancelled again. |
Weird... |
Thanks! I'll have to run Codecov locally and try to get the coverage up. |
@bsipocz - Coverage.py reports a total test coverage of 96%
Not sure how Codecov calculates its numbers. |
@bsipocz - I wonder if the unexpectedly low diff coverage value comes from removed tests (most pertaining to the now unsupported tables, and deprecated methods, and some mock-data tests moved to remote tests). See https://docs.codecov.io/docs/unexpected-coverage-changes I've added a few more tests to get the total coverage up to 97%. I'm happy to send you my coverage.xml generated from running: Hoping to get over this Codecov hurdle somehow. |
Only the maintainers' team has write access to repos, not individuals. But anyways, write access is not needed, the CI is not run automatically due to github's being attached by crypto miners, and they turned off CI starting up for first-time contributors. The known workarounds are:
I would love to do the latter (already tried it), but it's only the coordination committee is gatekeeping the access rights from the rest of the team to be able to add new people. So we need to fall back to the PR workaround. Any small dummy PR with a single commit would do, e.g. fix the alphabetical order for nasa_exoplanet_archive in docs/index.rst. As for coverage: it sometimes behaves weirdly with bogus looking drop in coverage when the base of the PR and the latest run on master differs. I think simply there was a lot of cleanups in the recent 0.4.2. Also, you have restructured the tests, so it's possible that some parts of the code now covered only with |
Thanks @bsipocz! I made the suggested edit in docs/index.rst and submitted a PR, so hopefully I can run CI workflows soon. That will also be helpful over the next couple of months as we move more of our tables over to the TAP service. |
@bsipocz - Any idea when merge review might take place? Sorry for being impatient :-) |
@bsipocz, @keflavich, @ceb8, @dfm, @bmorris3 - |
@rickynilsson - I'm sorry, I'm horribly swamped at the moment with the end of quarter and wrapping up my current day job. It may take a few weeks on my side to get enough time for a proper, thorough PR review. |
I don't know enough about the astroquery requirements to do a full review, but I'm happy to take a stab at a review from a user perspective if that would be helpful, @bsipocz! |
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'll try actually using this interface a little later, but it looks to me like the big remaining issue is that there appear to be no tests for the TAP interface that don't rely on remote data. Others can comment on whether or not that is okay, but I would certainly prefer to be able to test the interface using mocked responses.
astroquery/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive.py
Outdated
Show resolved
Hide resolved
astroquery/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py
Show resolved
Hide resolved
Thanks, @dfm ! I honestly couldn't figure out exactly what was going on in |
@rickynilsson: Sure - it's a little opaque, I know! I'll send some demo tests to give you a sense of it. |
@andamian provides some good examples of mocking tests for TAP in https://github.com/astropy/astroquery/blob/main/astroquery/cadc/tests/test_cadctap.py |
@rickynilsson: Looking through this more, I honestly think that a better interface design might be to have separate |
@bsipocz - totally understand that you are busy with work! Maybe if @dfm helps out with a quick review from a user perspective, we can merge fairly soon, and fix any bugs or lack of astroquery requirements (should be minor) later? We haven't touched any other modules, and thoroughly tested the restored functionality of our module. Note that the nasa_exoplanet_archive module in main is currently broken, and we are starting to get questions from users about it. Alternatively, we could direct users to our working branch on https://github.com/IPAC-SW/astroquery/tree/nasa_exoplanet_archive_2 , if that is okay with you. |
I've rebased to get rid of the unrelated and duplicated commits, and did some minor cleanup. However, given that the PR was opened from an org account rather than a personal account I cannot force push back to the branch as a maintainer. |
da10f44
to
1fec091
Compare
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.
Ready to go once CI is happy.
# return errors and urge the user to call the 'ps' or 'pscomppars' tables | ||
OBJECT_TABLES = {"ps": "pl_", "pscomppars": "pl_", "exoplanets": "pl_", | ||
"compositepars": "fpl_", "exomultpars": "mpl_"} | ||
MAP_TABLEWARNINGS = {"exoplanets": "Planetary Systems (PS)", |
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 think this is a bit confusing in the warning message, but can be adjusted if there are any user complaints.
OK, so the only remaining issue is with the heisen failure of remote tests. 3 of them are failing if they are run after the mock tests, but they all pass when only the remotes are run. |
Thanks @rickynilsson! Would you mind opening that follow-up issue, or prefer me to do it? |
Thank you @bsipocz! I can open the issue about order dependent test fails. |
(you can let users know that installing the development version with e.g. |
The module has been updated to query the new PS and PSCOMPPARS tables using TAP service, and support for querying the old tables (EXOPLANETS, EXOMULTPARS, and COMPOSITEPARS) has been dropped (with error messages pointing the user to the new tables and documentation of recent changes to the tables and their accessibility). Tests have been updated and verified, and the module documentation has also been updated.