Skip to content

Make zarr.core private #2621

Open
Open

Description

@jhamman

We seem to be converging on using a leading underscore to indicate private modules. Should we do this for zarr.core or can we simply document the intent of the module?

Activity

  1. dstansby commented on Jan 3, 2025

    @dstansby
    Contributor

    Is it intended to be private? If so, I'd definitely add a leading underscore to mark it as private.

  2. jhamman commented on Jan 3, 2025

    @jhamman
    MemberAuthor

    Yes, the intent is to make it private.

  3. dstansby commented on Jan 3, 2025

    @dstansby
    Contributor

    I had a quick go, and there seem to be bits that need to be public (at least zarr.core.config, zarr.core.buffer.Buffer). Making the whole of core private is going to need someone who knows the codebase well enough (definitely not me 😄) to know what should be public going through carefully and decided what should be public and what should be private.

  4. jhamman commented on Jan 3, 2025

    @jhamman
    MemberAuthor

    I can take this on.

  5. dstansby commented on Jan 4, 2025

    @dstansby
    Contributor

    As some small first steps I cleaned up zarr.core.buffer (#2641) and zarr.core.metadata (#2642)

  6. jhamman commented on Jan 6, 2025

    @jhamman
    MemberAuthor

    @dstansby - what makes you think zarr.core.config needs to be public? The intent, as I see it, is just that zarr.core.config.config is public which is why it is available as zarr.config.

    @normanrz - do you think we could move zarr.core.buffer to zarr.buffer? The Buffer ABC seems like it actually belongs in the abc module.

  7. dstansby commented on Jan 6, 2025

    @dstansby
    Contributor

    what makes you think zarr.core.config needs to be public?

    There's user facing documentation in the docstring, but maybe that should now be deleted in favour of the user guide? It looks like BadConfigError isn't used so can be removed, but I think Config should be user facing as it's the type of zarr.config, so maybe that could move to zarr.Config?

  8. normanrz commented on Jan 6, 2025

    @normanrz
    Member

    @normanrz - do you think we could move zarr.core.buffer to zarr.buffer? The Buffer ABC seems like it actually belongs in the abc module.

    Yes, we could do that. And yes, the Buffer and NDBuffer make sense in the abc module.

  9. jhamman commented on Jan 7, 2025

    @jhamman
    MemberAuthor

    Part 1 done here -> #2664

  10. jhamman commented on Jan 7, 2025

    @jhamman
    MemberAuthor
  11. added this to the 3.0.0 milestone on Jan 8, 2025
  12. TomAugspurger commented on Mar 28, 2025

    @TomAugspurger
    Contributor

    This came up again in #2876 (review). I'm going to reopen this and look into how we could move everything to zarr._core and deprecate the module with a warning.

  13. d-v-b commented on Apr 30, 2025

    @d-v-b
    Contributor

    Assuming we are all aligned on the value of making core explicitly private by renaming it to _core, do we think this change would fit in a 3.1 release?

  14. TomAugspurger commented on Jun 7, 2025

    @TomAugspurger
    Contributor

    xref #2876.

    Once that's released we can (conditionally) update the imports in numcodecs to use the public API (and IIRC Icechunk had some references to zarr.core.buffer too)

    Then once numcodecs has a public release with that we can begin the deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions