Partial rewrite of the MOCServer module#3139
Conversation
|
Hello @ManonMarchand! 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-22 23:00:36 UTC |
68d1db0 to
065b393
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3139 +/- ##
==========================================
- Coverage 67.94% 67.57% -0.37%
==========================================
Files 231 229 -2
Lines 19051 18593 -458
==========================================
- Hits 12945 12565 -380
+ Misses 6106 6028 -78 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
065b393 to
199c5d4
Compare
|
Switching to draft as I asked for a review internally in CDS |
tboch
left a comment
There was a problem hiding this comment.
Thanks for this PR.
My main comment is about space_sys which I don't like much, and about 'C' which really should be 'sky'.
I see no harm in starting to have a deprecation message for find_datasets.
Should we have a new get_coverage or get_moc method which would be cleaner than the return_moc parameter? This can be added in a later PR of course.
2a04790 to
8a5937d
Compare
8a5937d to
804c94a
Compare
|
I applied Thomas's suggestions. This is ready to be reviewed 🙂 |
|
I'll get back to this in the new year. Thanks, Manon and Happy Holidays! |
804c94a to
463734b
Compare
bsipocz
left a comment
There was a problem hiding this comment.
Overall this looks good. I have a few very minor comments. The two must be done are the rebase -- I'm sorry for not getting this into 0.4.8 -- and adding the doctest require to the documentation as the doctests fail for the documentation when there is no mocpy present.
1c74e2b to
833ca5d
Compare
|
Hello Brigitta, Thanks for the review! No worries for the 0.4.8, we'll get the changes in the next release. I think I addressed all you comments except the one about |
Yeap, I'm not sure anymore. I like both your suggestions with a very slight preference for |
833ca5d to
5039c20
Compare
|
It's new in |
|
Do you prefer this to go out in 0.4.9 later this week, or keep in |
|
I would be better if this could fit in 0.4.9. The bug on overwritting files is really critical |
bsipocz
left a comment
There was a problem hiding this comment.
OK, let's go ahead with this one. It needs a rebase, and a minor edit to the changelog as I don't think the warning renders out as expected.
| - Fix query by MOC that would write a file ``moc.fits`` where the method was executed in | ||
| overwriting mode (potentially deleting data if there was a conflicting file) [#3139] | ||
|
|
||
| - [:warning: BREAKING] Returned tables now have a default list of fields instead of the |
There was a problem hiding this comment.
This warning won't work here, I'll edit this out during rebase.
There was a problem hiding this comment.
actually, I leave this to the before-release changelog cleanup, and go ahead with the PR as is.
Thanks @ManonMarchand!
mostly achieved by looking at a small MOC in test_moc_order_param rather than the whole sky
for tables, we use the fact that Table accepts dictionnaries. For MOCs, the dictionnary parsing has been improved in MOCpy > 0.12 and does not require to remove empty orders anymore
this is mainly motivated by the new support for time mocs and space-time mocs upstream
allows to work in the browser with wasm-based python implementations
this makes this parameter different from the one the server understands, but it's more consistant with the other possible values for spacesys
note that this change is only user-facing, the upstream name is spacesys
everything done with list_fields
Hello astroquery,
This is a quite big rewrite of the MOS Server module.
The two main motivations behind it were:
query_regionwith a MOC would write a real file on the people's current folder. This file would be namedmoc.fitsand could potentially overwrite a pre-existing file with the same name silently.The actual changes in this PR
query_hipsallows to filter only hips in a shortcut rather than having to remember all the time to have to typehips_frame=*in themeta_data(convenience method)meta_data. This was unnecessary, and now the two methods are exactly the same and allow to filter on region and to add a criteria. I was wondering whetherfind_datasetsshould be deprecatedcasesensitiveandcoordinate_systemallow to chose whether the query will respect the case, and to chose a specific system for the datasets (ex:mars,venus,sky)list_coordinate_systemsthat prints the currently available systems (can evolve as providers post new datasets)list_fieldsto see the possible fields (there are 134 today) sorted by occurrence and with an examplereturn_mocis no longer only a boolean. It keeps it former behavior (True means Space MOC) but it can now also take the valuessmoc,tmoc, orstmocto specify the kind of MOC that should be returnedquery_region, theregionargument can now also be amocpy.TimeMOCand amocpy.STMOCon top of the previously accepted classesregionsmodule from the mandatory dependenciesChanges while I was there