-
-
Notifications
You must be signed in to change notification settings - Fork 441
API: Fix splatalogue module with upstream changes #2960
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
Changes from 1 commit
3da7e65
caf2746
311ae17
9ebf6da
11e31a9
60af30e
a97d07a
d12a7da
91aec4c
62cf9b9
cb656fa
9c47f9d
675c377
9c20d54
ad414a2
ceecde0
d40a486
090f737
4193f93
b46834a
b9384f9
35a0324
5e3eebc
5803174
3b6adf9
09f6211
94f3c79
ddff59f
c5a6d1e
9f2c437
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -274,10 +274,6 @@ def _parse_kwargs(self, *, min_frequency=None, max_frequency=None, | |
|
|
||
| """ | ||
|
|
||
| payload = {'submit': 'Search', | ||
| 'frequency_units': 'GHz', | ||
| } | ||
|
|
||
| payload = {"searchSpecies": "", | ||
| "speciesSelectBox": [], | ||
| "dataVersion": "v3.0", | ||
|
|
@@ -346,9 +342,11 @@ def _parse_kwargs(self, *, min_frequency=None, max_frequency=None, | |
| payload['userInputFrequenciesFrom'] = [min_frequency.value] | ||
| payload['userInputFrequenciesTo'] = [max_frequency.value] | ||
|
|
||
| if chemical_name in ('', {}, (), [], set()): | ||
| # include all | ||
| payload['speciesSelectBox'] = [] | ||
| if chemical_name in ('', {}, (), [], set(), None): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a tiny bit hacky (I see that it was like that before). Couldn't we enforce e.g. None as default and then expect the user to provide something none empty? (or this would be filled in from parsing something that results in a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think yes? But I am worried about exactly the case you mention, i.e., i could simplify this to |
||
| # include all by default, or whatever default was set | ||
| payload['speciesSelectBox'] = (self.data['speciesSelectBox'] | ||
| if hasattr(self, 'data') | ||
| else []) | ||
| elif chemical_name is not None: | ||
| if parse_chemistry_locally: | ||
| species_ids = self.get_species_ids(species_regex=chemical_name, reflags=chem_re_flags) | ||
|
|
||
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.
Is there any way to recognize changes in the required payload, e.g. load these keys from anywhere upstream?
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.
Not as far as I'm aware. It gets populated by a javascript script
main.jswith this function (below) that we could back out parameters from, but it's not worth my time to figure that out: