zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

black -> ruff format + cleanup

Open Saransh-cpp opened this issue 1 year ago • 8 comments

Ruff can now format files. Ruff formatter is much faster than black.

Other changes are good practices recommended by scientific python.

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/tutorial.rst
  • [ ] Changes documented in docs/release.rst
  • [ ] GitHub Actions have all passed
  • [ ] Test coverage is 100% (Codecov passes)

Saransh-cpp avatar Jan 24 '24 22:01 Saransh-cpp

I'm struggling to get the Windows 3.9 build to pass:

E   ImportError: DLL load failed while importing _rust: The specified procedure could not be found.

There are similar issues like https://github.com/pyca/cryptography/issues/9444 and https://github.com/PyO3/pyo3/issues/3425

joshmoore avatar Jan 29 '24 08:01 joshmoore

@Saransh-cpp - could I convince you to reorient this PR to the v3 branch? I'm very much hoping that the release we are preparing now is the last in the 2.* series which makes this change likely to go out of date quickly.

jhamman avatar Feb 06 '24 03:02 jhamman

Ahh, changing the base branch messed up everything :(

No worries, I'll try fixing this locally.

Saransh-cpp avatar Feb 06 '24 12:02 Saransh-cpp

I think the workflow failures are unrelated to this PR?

Saransh-cpp avatar Feb 06 '24 13:02 Saransh-cpp

@Saransh-cpp - try pulling the v3 branch once more. We made a lot of progress on the v3 branch CI last week so things should be good to go.

jhamman avatar Feb 13 '24 22:02 jhamman

Thanks, @jhamman! Could you please let me know if the new errors in the CI are related to my PR?

Saransh-cpp avatar Feb 14 '24 09:02 Saransh-cpp

Could you please let me know if the new errors in the CI are related to my PR?

I think not.

self = <tests.test_core.TestArrayWithLMDBStoreNoBuffers object at 0x7f7d673616f0>

    def create_store(self):
>       pytest.importorskip("lmdb")
E       Skipped: could not import 'lmdb': No module named 'lmdb'

tests/test_core.py:2073: Skipped

During handling of the above exception, another exception occurred:

self = <tests.test_core.TestArrayWithLMDBStoreNoBuffers object at 0x7f7d673616f0>

    def test_object_codec_warnings(self):
>       with pytest.warns(UserWarning):
E       Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted.
E        Emitted warnings: [].

looks very much like a problem I've been trying to solve on the mainline:

https://github.com/zarr-developers/zarr-python/pull/1621/commits/37e6e1fb516707bf01c15fe3f3bc2f9062e4c061

joshmoore avatar Feb 14 '24 09:02 joshmoore

Thanks!

Saransh-cpp avatar Feb 14 '24 09:02 Saransh-cpp

@Saransh-cpp - this seemed really close. Can you resolve the conflicts and we can get it in.

jhamman avatar Apr 08 '24 16:04 jhamman

pre-commit.ci autofix

Saransh-cpp avatar Apr 08 '24 16:04 Saransh-cpp

Hi, @jhamman, this looks good to go now!

Saransh-cpp avatar Apr 08 '24 16:04 Saransh-cpp

Thanks @Saransh-cpp!

jhamman avatar Apr 08 '24 17:04 jhamman

:heart:

joshmoore avatar Apr 08 '24 18:04 joshmoore