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

Set default data format with enviroment variable #958

Merged
merged 9 commits into from
Oct 25, 2023
Merged

Conversation

sm1lla
Copy link
Contributor

@sm1lla sm1lla commented Oct 24, 2023

Description:

  • The DEFAULT_DATA_FORMAT used when writing datasets can now be set with the environment variable DATA_FORMAT. If the environment variable is not set the default data format is still wkw. When the data format is set to Zarr3 a lower value is set for DEFAULT_CHUNKS_PER_SHARD.

Todos:

  • Updated Changelog

@sm1lla sm1lla requested a review from normanrz October 24, 2023 12:40
@sm1lla sm1lla self-assigned this Oct 24, 2023
webknossos/webknossos/dataset/defaults.py Outdated Show resolved Hide resolved
DataFormat.WKW if not os.environ.get("DATA_FORMAT") == "zarr3" else DataFormat.Zarr3
)
DEFAULT_CHUNKS_PER_SHARD = (
Vec3Int.full(32) if DEFAULT_DATA_FORMAT == DataFormat.WKW else Vec3Int.full(16)
Copy link
Member

Choose a reason for hiding this comment

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

I would make a separate env var WK_DEFAULT_CHUNKS_PER_SHARD for this.

@sm1lla sm1lla requested a review from normanrz October 24, 2023 14:04
Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

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

Please also add a changelog entry for this.

webknossos/webknossos/dataset/defaults.py Outdated Show resolved Hide resolved
webknossos/webknossos/dataset/defaults.py Outdated Show resolved Hide resolved
@sm1lla sm1lla merged commit b688c84 into master Oct 25, 2023
18 checks passed
@sm1lla sm1lla deleted the set_dataformat_zarr branch October 25, 2023 14:05
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.

2 participants