-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support columns
key in get_agasc_cone
and improve caching
#183
Conversation
3c6f2ea
to
4bbbb1f
Compare
columns
key in get_agasc_cone
and improve cachingcolumns
key in get_agasc_cone
and improve caching
ra, dec, rad_pm, agasc_file=agasc_file, columns=columns_query, cache=cache | ||
) | ||
|
||
if matlab_pm_bug: |
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.
For this bug, I don't know if it should be applied before or after the filtering. But hopefully it didn't matter in your initial testing in the original kadi implementation.
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.
In practice the order doesn't matter since we have enough margin on the cone edge.
|
||
# Minimal columns to compute PM-corrected positions and do filtering. | ||
if columns and COLUMNS_REQUIRED - set(columns): | ||
raise ValueError(f"columns must include all of {COLUMNS_REQUIRED}") |
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.
And this seems fine and is solid explicit coding style, I'm just not sure if it would be a lighter touch to just add any needed columns to columns.
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 reviewed the changes and they make sense to me. I also ran the unit tests to verify they pass.
I do not like chasing the ruff version. The latest ruff is now 0.5.2, so this PR is already obsolete. Running ruff 0.5.2 on this branch still shows two files that need fixing. Feel free to fix it or not. Just saying.
Also, making ruff commits with other changes makes it harder to see the relevant changes.
Chasing ruff is indeed annoying. The one bit that is hard to freeze is the VS code extension. The least-work path is just keeping all those extensions updated, so if I see warnings in VS code linting then I want to fix them. Sigh. About the 0.5.2 changes, I am not seeing any problems now with 0.5.2:
I hear you, but I did at least do all the ruff in one commit so it is easy to see them and confirm that they are trivial. |
Description
This is driven by the need to support AGASC 1.8 in
kadi.observations.get_starcats()
. Thekadi.observations
module defines aget_agasc_cone_fast
that caches a limited set ofproseco_agasc
columns, but it won't work with AGASC 1.8.This PR implements support for
columns
inget_agasc_cone
with caching which works with 1.7 and 1.8. The plan is then to removekadi.observations.get_agasc_cone_fast
(or make it a thin wrapper around cachedget_agasc_cone
).Other changes
COLOR1
column. If not present thenupdate_color1_column()
returns immediately. Previously it would crash.dev/profile_cache.py
to include a case withcolumns
defined.Related PR's
get_starcats
, refactor get_agasc_cone_fast() kadi#332Interface impacts
New keywords
columns
inget_agasc_cone
.Testing
Unit tests
Independent check of unit tests by Jean
Functional tests