| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report
@@ Coverage Diff @@
## main #2597 +/- ##
=======================================
Coverage 64.20% 64.21%
=======================================
Files 130 130
Lines 16850 16885 +35
=======================================
+ Hits 10819 10842 +23
- Misses 6031 6043 +12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sorry, something went wrong.
|
Everything seems to be working, please let me know if you have further comments. Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Over this looks to be almost ready to go, all remote tests pass, etc.
I've left some minor comments, and some that may point to a follow-up PR.
Sorry, something went wrong.
| # Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
| """ | ||
|
|
||
| @author: Javier Duran |
There was a problem hiding this comment.
This reminds me that we need to sort out a team page listing ESA as a significant contributor. It's not forgotten, we just haven't got to it yet.
Sorry, something went wrong.
There was a problem hiding this comment.
Many thanks! just ping me if you need a list of users or something else.
Sorry, something went wrong.
| assert "This target name cannot be determined with this resolver: ALL" in err.value.args[0] or "Failed " | ||
| "to parse" in err.value.args[0] |
There was a problem hiding this comment.
You need parens around the linebreak otherwise you only assert on the string "Failed " (which is always True) rather than on "Failed to parse" in err.value.args[0].
Do the same for all the other similar lines below.
| assert "This target name cannot be determined with this resolver: ALL" in err.value.args[0] or "Failed " | |
| "to parse" in err.value.args[0] | |
| assert "This target name cannot be determined with this resolver: ALL" in err.value.args[0] or ("Failed " | |
| "to parse" in err.value.args[0]) |
Sorry, something went wrong.
There was a problem hiding this comment.
Done!
Sorry, something went wrong.
| flag to display information about the process | ||
| product_type : string | ||
| type of product retrieval, optional | ||
| PRODUCT, SCIENCE_PRODUCT or POSTCARD |
There was a problem hiding this comment.
I wonder whether we need some extra docs, or deprecation that notifies anyone using these product types that things have changed?
Sorry, something went wrong.
There was a problem hiding this comment.
Also, could you update the download_product usage in the docs to not use e.g. SCIENCE_PRODUCT?
(I see that the example still works, but I suppose it would be nice to clean up nevertheless)
Sorry, something went wrong.
There was a problem hiding this comment.
I have updated the examples with the new parameters and added some deprecation messages in the code and the documentation.
Sorry, something went wrong.
| return filename | ||
|
|
||
| def get_postcard(self, observation_id, calibration_level="RAW", | ||
| def get_postcard(self, observation_id, *, calibration_level="RAW", |
There was a problem hiding this comment.
Thanks for doing this.
changing kwargs to be keyword only needs to be mentioned in a new changelog entry, look for copy-paste examples.
Sorry, something went wrong.
There was a problem hiding this comment.
Also, I wonder, while you're at it, could you do this for all the methods?
Sorry, something went wrong.
There was a problem hiding this comment.
Done!
Sorry, something went wrong.
| dump_to_file=output_file is not None) | ||
| table = job.get_results() | ||
| return table | ||
| warnings.warn( |
There was a problem hiding this comment.
Doing it with the deprecated decorator from astropy.utils may be a tiny bit simpler, but at this point you don't need to change this.
Sorry, something went wrong.
There was a problem hiding this comment.
I have also included the decorator, but I left the warning.
Sorry, something went wrong.
There was a problem hiding this comment.
@deprecated ensures that a deprecation warning is emitted, so the warnings raised by the decorated function itself are duplicates.
Sorry, something went wrong.
There was a problem hiding this comment.
Done, commented below.
Sorry, something went wrong.
| else: | ||
| return tables | ||
|
|
||
| def get_status_messages(self): |
There was a problem hiding this comment.
you may want to mention this in the changelog or in the docs of all modules having it (get_status_messages is mentioned in the docs for the JWST module, but not for the rest)
Sorry, something went wrong.
There was a problem hiding this comment.
It is mentioned now.
Sorry, something went wrong.
| table = job.get_results() | ||
| return table | ||
|
|
||
| def query_hst_tap(self, query, async_job=False, output_file=None, |
There was a problem hiding this comment.
This deprecation needs to be mentioned in the changelog, preferably as a separate entry.
Sorry, something went wrong.
There was a problem hiding this comment.
Deprecation included in the changelog. I have also ordered the different entries in the appropriate categories.
Sorry, something went wrong.
| a lot faster. [#2524] | ||
|
|
||
| - Update TAP url to avoid 301 HTTPError. [#2567] | ||
| - Update to TAP url to query data and download files, aligned with the new eHST Science Archive. [#2567][#2597] |
There was a problem hiding this comment.
more changelog entries are needed for this PR to cover the various changes, see the comments below.
Sorry, something went wrong.
There was a problem hiding this comment.
Changelog entries added. Please let me know if you think more are required.
Sorry, something went wrong.
| assert "Coordinates must be either a string or " \ | ||
| "astropy.coordinates" in err.value.args[0] | ||
|
|
||
| def test_query_hst_tap(self): |
There was a problem hiding this comment.
could you keep one query_hst_tap test, too to test whether the deprecation warning is issued?
Sorry, something went wrong.
There was a problem hiding this comment.
Added again and being executed.
Sorry, something went wrong.
|
|
||
| def test_download_product_errors(self): | ||
| ehst = ESAHubbleClass(self.get_dummy_tap_handler()) | ||
| ehst = ESAHubbleClass(tap_handler=self.get_dummy_tap_handler(), show_messages=False) |
There was a problem hiding this comment.
Can we have one show_messages=True test, too (with mocking some status messages)?
Sorry, something went wrong.
There was a problem hiding this comment.
Test included.
Sorry, something went wrong.
|
Thanks for your comments @bsipocz ! working on them. |
Sorry, something went wrong.
|
I think I have answered all your comments @bsipocz , please let me know if further changes are required. |
Sorry, something went wrong.
|
Don't know why the docs is taking so long... |
Sorry, something went wrong.
| @deprecated(since="0.4.7", message=("Use of query_hst_tap method is no longer supported. " | ||
| "Please use query_tap method instead, with the same arguments."), | ||
| alternative="query_tap") |
There was a problem hiding this comment.
message does not have to be specified. The following works:
| @deprecated(since="0.4.7", message=("Use of query_hst_tap method is no longer supported. " | |
| "Please use query_tap method instead, with the same arguments."), | |
| alternative="query_tap") | |
| @deprecated(since="0.4.7", alternative="query_tap") |
The resulting warning is
WARNING: AstropyDeprecationWarning: The query_hst_tap function is deprecated and may be removed in a future version.
Use query_tap instead.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok, I have removed the AstropyDeprecationWarning
Sorry, something went wrong.
| @staticmethod | ||
| def __set_client_id(client_id): | ||
| if client_id: | ||
| global TAP_CLIENT_ID |
There was a problem hiding this comment.
According to Python naming conventions TAP_CLIENT_ID is supposed to be (and so far has been) a module level constant. Now it should be changed to be an instance attribute instead.
Sorry, something went wrong.
There was a problem hiding this comment.
Modified TAP_CLIENT_ID to be an instance attribute.
Sorry, something went wrong.
|
Ok, new comments have been implemented, thanks @bsipocz and @eerovaher ! |
Sorry, something went wrong.
|
@jespinosaar - Thanks for the PR and the very quick review cycle! I did a minor rebase as there were two merge/duplicated commits. Github quicklook however now wrongly shows these as my commits, you may want to add your ext.esa.int email address to your github profile so they will be properly picked up by the web interface for you (git log showing them correctly, it's just the web interface issue). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Hi all,
This pull requests is covering the following issues:
Thanks a lot!
cc @esdc-esac-esa-int