Skip to content
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

Make deprecated write call save #114

Closed
ManonMarchand opened this issue Nov 7, 2023 · 1 comment
Closed

Make deprecated write call save #114

ManonMarchand opened this issue Nov 7, 2023 · 1 comment

Comments

@ManonMarchand
Copy link
Member

ManonMarchand commented Nov 7, 2023

The deprecated write method does not sort the MOC while the new save does. This causes compatibility issues with aladin desktop. Let's fix it for now before removing the deprecated function (likely in v1)

@fxpineau
Copy link
Member

fxpineau commented Nov 7, 2023

Fwiw, in general you cannot expect attributes to be ordered in a JSON document,
see e.g.: https://stackoverflow.com/questions/16870416/does-the-sequence-of-the-values-matter-in-a-json-object

From my point-of-view the problem here comes from the fact that the Java MOC implementation requires depth attributes to be sorted. I warn in vain since the very beginning against the possible troubles it would inevitably cause. And here we are...

(That said, I agree to call save from write)

ManonMarchand added a commit that referenced this issue Nov 17, 2023
- add the `n_cells` method to each MOC type
- adds a new file to test abstract moc and remove duplicated `save` tests
- the `mocpy.stmoc.STMOC.from_spatial_coverages` now also accepts non iterable objects (prevents from having to wrap a single moc in a list each time it's used)
- fixed a warning in the notebooks because of `max_norder` argument that was introduced in a former version
- makes the `write` function `call` save internally [#114 ]
- save now accepts `fits_keywords` to be added to the header (was needed to keep all of `write` functionalities)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants