-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Gaia: Define new constant USE_NAMES_OVER_IDS that gives preference to name
over ID attributes of columns as the names of columns in the astropy.table.Table
instance.
#2967
Gaia: Define new constant USE_NAMES_OVER_IDS that gives preference to name
over ID attributes of columns as the names of columns in the astropy.table.Table
instance.
#2967
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2967 +/- ##
==========================================
+ Coverage 66.83% 66.85% +0.02%
==========================================
Files 237 237
Lines 18327 18304 -23
==========================================
- Hits 12248 12237 -11
+ Misses 6079 6067 -12 ☔ View full report in Codecov by Sentry. |
name
over ID attributes of columns as the names of columns in the astropy.table.Table
instance.name
over ID attributes of columns as the names of columns in the astropy.table.Table
instance.
Dear Astropy/Astroquery team: From the message above ("Some checks were not successful") we see that there issues to be solved, but we do not understand if we (ESA/ESDC) should take care of them, or if the issues will be fixed by you (Astropy/Astroquery team) - thanks in advance for your answer. |
@hectorcanovas In general, these are items you should deal with if they are related to changes you made. Ideally, you should only see messages related to those. However, we often have problems that crop up that are related to changes in upstream packages that do not indicate an issue with changes you've made. That applies in this case. The warnings on readthedocs are:
i.e., none of them are related to changes you made here. The code coverage, on the other hand, is related to your changes: |
Alright, after a quick review, the main changes that codecov is hitting are in TAP, which we aren't too worried about. @bsipocz has final say here, though. |
Fixed the conflicts in the file CHANGE.rst. All checks passed. |
…ed on names instead of IDs
…ed on names instead of IDs
…ed on names instead of IDs
… the function search_async_jobs. Update function __appendData that is called by search_async_jobs
…iables was removed
33e3d32
to
852e621
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.
I have rebased this to pick up the recently merged changes, and in fact that highlighted a new regression.
I added a quick patch for it, so tests now pass but also see the comment. I'm happy going ahead with the merge as is, or if you want to double check the if all cases are covered in the conditional at the comment.
|
||
elif output_format == 'ecsv': | ||
result = APTable.read(data, format=astropy_format) | ||
else: | ||
result = APTable.read(data, format=astropy_format, use_names_over_ids=use_names_over_ids) |
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.
The handling of the ecsv case needed to be added due to the merging of #2983, however this made me wonder whether it's not the votable case that should be handled as special and fall back on not specifying use_names_over_ids
to handle fits and ecsv, etc.
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.
Thanks @bsipocz for your time reviewing the PR. I agree with you that the parameter use_names_over_ids must be used only for the format votable. We have updated the source code and include more tests in test_xmlparser.py to test this fact.
13c8ba6
to
48f272e
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.
All looks good, and I added a fix for the windows int issue and rebased. Merging if all CI jobs come back passing.
48f272e
to
6be10bb
Compare
6be10bb
to
65a00ad
Compare
Thank you @cosmoJFH! |
I've pushed a dev version to pypi that includes this fix, so |
Thank you!! We really appreciate it. |
In issue #2911 it was shown that the function Gaia.launch_job returns the upper case column name DESIGNATION.
This came from that fact that IDs are used instead of the names in the votable at the time the astropy.table.Table is built.
Recently, the votables returned by the gaia archive has been updated in order to include the datalink "Service Descriptors", and they contain a few new IDs, where their corresponding values are capitalized. Therefore, this implies that the column names in the
astropy.table.Table
instances will be changed: they would be shown as uppercase names. This is an example:We need to build astropy tables that contains column names based on the names and not on the IDs.
We have defined a new constant USE_NAMES_OVER_IDS=true in the GaiaClass. Its meaning is the same as in https://docs.astropy.org/en/stable/io/votable/index.html. The changes do not affect those projects that don't need to change the original built of the
astropy.table.Table
instances where IDs are used instead of names.In this PR we have also fixed the function search_async_jobs in the class TapPlus. Making use of the present implementation an error is raised when it is used with a filter:
New tests have been made.
cc @esdc-esac-esa-int
Jira: GAIAPCR-1313