-
-
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
CDMS: add whole-molecule query tool & refactor metadata acquisition #3173
Conversation
Hello @keflavich! 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 2025-01-17 14:50:02 UTC |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3173 +/- ##
=======================================
Coverage ? 67.40%
=======================================
Files ? 229
Lines ? 18599
Branches ? 0
=======================================
Hits ? 12536
Misses ? 6063
Partials ? 0 ☔ View full report in Codecov by Sentry. |
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.
Please fix the indexing issue to pass the tests, and there is also a failing doctest for the narrative docs, update that file, too.
# accounts for three formats, e.g.: '058501' or 'H2C2S' or '058501 H2C2S' | ||
badlist = (self.MALFORMATTED_MOLECULE_LIST + # noqa | ||
[y for x in self.MALFORMATTED_MOLECULE_LIST for y in x.split()]) | ||
if payload['Molecules'] in badlist: |
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 would say drop line 146, as request can deal with a dict data input, but you cannot index it if you turn in to a list of tuples. A dictionary would be anyways better as it would be consistent with our docstrings (even though upstream accepts more types right now).
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.
Good point. I did this, I hope it worked.... I ran into more local configuration issues w/pytest that affect only astroquery. grumble.
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.
Please add a changelog entry, fix the docs, and rebase for the merge commit. Then this should be good to go.
could you direct me to the doctest failure? I don't see it on CI, and I can't run the damned tests locally again... |
Don't merge this yet, I discovered some additional fixes that are needed (the molecule tables use different names that need to be merged...) |
doc fixes: |
You need to rebase to pick up changes from last night's release. |
4cb4195
to
97c8bb1
Compare
Test failure is related. |
yes, I'm trying to figure out how to 'sanitize' the unicode for windows now.... |
summon @pllim, she is very good with solving windows problems 😄 |
I think I solved it.... wait for CI, but I had to replace unicode <U+0096> (in python, |
I spoke too soon, there's also an instance of |
btw @keflavich - how does this relate to #3094 and #2901? If neither of those is obsolete by this, could you have a look at them, too while this module is fresh in your mind? |
Well, I am glad you figured it out because |
Haha, that's just deception, changes to the datafiles :) |
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.
OK, this is good to go. I had one minor comment, and noticed a test failure, but it was quicker to just fix that.
What about #3095, is this sufficient to close it too? |
yes, this closes #3095 |
malformatted catalogs, improve LUT, refactor and significantly robustify CDMS data table handling. Also, update cached metadata files add more regression tests whitespace whitespace setup for data file almost there ... unicode bad col name recode unicode raised minus (character 96) as simple dash try replacing the text before ascii-reading it oops dashes try a different approach... try a different approach... part 2 super minor remove unnecessary test that I just added allow lookuptable to skip regex searching for exact matches no single-char variables looks like my fixes didn't work, and of course I made a bunch of stupid errors. I might have to give up for the night hooray! got a different error this time. Now just guesswork though.... Entry column changelog CI: ignoring a Deprecation we don't directly use but trigger somewhere in the stack finish test update docstr, inline comment
Ready for final review / merge |
Thanks! |
This is a workaround for the CDMS bugs (#3095 and related).
It appears that the query tool mangles the original table in a way that appears unpredictable.
closes #2901
closes #3094