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

Don't import from tests #1601

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Don't import from tests #1601

merged 5 commits into from
Jan 30, 2024

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Dec 8, 2023

In main, DummyStorageTransformer is defined in the test suite and imported by zarr/storage/v3_storage_transformers. Because the distributed version of zarr should not be importing code from the tests, I moved the definition of DummyStorageTransformer to zarr/storage/v3_storage_transformers, and now the tests that use this class can import it like any other zarr code.

In the test suite, I also changed imports of the form from zarr.test.module.. import bla to from .module import bla.

Both of these changes are necessary for moving to a src/zarr layout.

xref: #1592

@d-v-b d-v-b added the V3 Related to compatibility with V3 spec label Dec 8, 2023
@d-v-b
Copy link
Contributor Author

d-v-b commented Jan 26, 2024

Does anyone have a problem with merging this? It will unblock efforts to modernize the packaging of zarr-python over in #1592

@d-v-b
Copy link
Contributor Author

d-v-b commented Jan 26, 2024

if nobody objects, I'm going to merge this in under 12 hours.

@d-v-b
Copy link
Contributor Author

d-v-b commented Jan 29, 2024

@jhamman has offered to review, so I will hold off on merging unilaterally

Copy link
Member

@jhamman jhamman left a comment

Choose a reason for hiding this comment

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

Thanks @d-v-b! Just one question below.

docs/release.rst Outdated Show resolved Hide resolved
@d-v-b
Copy link
Contributor Author

d-v-b commented Jan 30, 2024

This is going in with temporary release notes that distinguish between v2 and v3 contributions. When we merge v3 into main, we will revert this alteration to the release notes.

@d-v-b d-v-b merged commit 1be410b into zarr-developers:v3 Jan 30, 2024
5 of 6 checks passed
@d-v-b d-v-b deleted the no_import_tests branch January 30, 2024 20:10
@jhamman jhamman added this to the 3.0.0.alpha milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Related to compatibility with V3 spec
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants