feat: add print_debug_info function#2913
Conversation
| """ | ||
| from zarr import print_debug_info | ||
|
|
||
| print_debug_info() |
There was a problem hiding this comment.
to make this test a bit more meaningful, let's capture the output and assert that it matches our basic expectations. https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html#accessing-captured-output-from-a-test-function
There was a problem hiding this comment.
I tested two outputs that should always be there. I didn't test every output because at some point that just becomes rewriting the fucntion
| print(f"python: {platform.python_version()}\n") | ||
|
|
||
| print(f"zarr: {__version__}\n") | ||
| for package in ["numcodecs", "numpy", "fsspec", "s3fs", "botocore", "gcsfs"]: |
There was a problem hiding this comment.
can we include the full list of required and optional dependencies here?
Required dependencies: donfig | numcodecs | numpy | packaging | typing-extensions
Optional dependencies: botocore | cupy-cuda12x | fsspec| numcodecs | rich | s3fs | universal-pathlib | obstore
There was a problem hiding this comment.
I added all of them. They're in a list because introspecting the package to grab it's own dependencies seemed to add a bit of unnecessary complication
|
After discussino with @jhamman there is a sequencing issue here. If we change the issue template prior to releasing the function it won't be possible to make an issue! So I think the way forward is to merge the function and then added the issue template chagnes later |
dstansby
left a comment
There was a problem hiding this comment.
Very nice! I left some minor suggestions to improve the formatting which I think are worth considering, but feel free to take them or leave them.
| print(f"zarr: {__version__}\n") | ||
| print("Required dependencies:") | ||
| print_packages(required) | ||
| print("Optional dependencies:") |
There was a problem hiding this comment.
| print("Optional dependencies:") | |
| print("Optional dependencies") | |
| print("---------------------") |
There was a problem hiding this comment.
Ah, I didn't think about the "putting this into markdown on GitHub stage" 🤦 . In that case either asterisks or no change is fine by me 👍
|
@jhamman do you still want changes, or is this good to go? |
dstansby
left a comment
There was a problem hiding this comment.
There's been lots of time to review, so I'm going to merge. Improvements to exactly what's printed can definitely be made in future micro releases, so I think this is low risk to merge now.

Created the
print_debug_infofunction from #2907Will render in the issue template like this:
example output:
closes #2907
docs/user-guide/*.rstchanges/