Skip to content

Add default value to init_array config param. Update docstring. #3391

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kgabor
Copy link

@kgabor kgabor commented Aug 20, 2025

Make config param optional in init_array. Closes #3222

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added needs release notes Automatically applied to PRs which haven't added release notes and removed needs release notes Automatically applied to PRs which haven't added release notes labels Aug 20, 2025
@kgabor kgabor force-pushed the config_param_3222 branch from 9c8d51f to ddd3827 Compare August 22, 2025 07:23
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.69%. Comparing base (c9eefe6) to head (38fe656).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3391   +/-   ##
=======================================
  Coverage   94.69%   94.69%           
=======================================
  Files          79       79           
  Lines        9520     9520           
=======================================
  Hits         9015     9015           
  Misses        505      505           
Files with missing lines Coverage Δ
src/zarr/core/array.py 97.44% <ø> (ø)
src/zarr/testing/utils.py 91.66% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kgabor kgabor force-pushed the config_param_3222 branch from ddd3827 to d9df4f6 Compare August 22, 2025 07:40
 * Add default value to init_array config param.
 * Update docstring.
 * Add changelog entry.
 * Fix type casting typo.
@kgabor kgabor force-pushed the config_param_3222 branch from d9df4f6 to 38fe656 Compare August 23, 2025 00:31
@kgabor kgabor marked this pull request as ready for review August 23, 2025 01:58
@@ -4525,7 +4525,7 @@ async def init_array(
overwrite : bool, default False
Whether to overwrite an array with the same name in the store, if one exists.
config : ArrayConfigLike or None, optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config : ArrayConfigLike or None, optional
config : ArrayConfigLike or None, default=None

@@ -4525,7 +4525,7 @@ async def init_array(
overwrite : bool, default False
Whether to overwrite an array with the same name in the store, if one exists.
config : ArrayConfigLike or None, optional
Configuration for this array.
Configuration for this array (default is None).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Configuration for this array (default is None).
Configuration for this array. If ``None``, the default array runtime configuration will be used. This default
is stored in the global configuration object.

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

Successfully merging this pull request may close these issues.

Make config param optional in init_array
2 participants