Skip to content

Conversation

benjeffery
Copy link
Contributor

Add a defaults section to the schema. Also move the resposibilty for specific compressor settings to the generate_schema methods.
Part of #351

@coveralls
Copy link
Collaborator

coveralls commented Apr 21, 2025

Coverage Status

coverage: 98.411% (+0.001%) from 98.41%
when pulling 77dfbc9 on benjeffery:schema-redundancy
into ebfbbf0 on sgkit-dev:main.

Copy link
Contributor

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

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

LGTM, spotted a couple of minor things

bio2zarr/vcz.py Outdated
self.format_version = format_version
self.fields = fields
defaults = defaults if defaults is not None else {}
if "compressor" not in defaults or defaults["compressor"] 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
if "compressor" not in defaults or defaults["compressor"] is None:
if defaults.get("compressor", None) is None:

shorter, less duplication of the key text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@jeromekelleher jeromekelleher merged commit 17db733 into sgkit-dev:main Apr 22, 2025
16 checks passed
@benjeffery benjeffery deleted the schema-redundancy branch April 22, 2025 15:36
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.

3 participants