Skip to content

Commit 810506f

Browse files
authored
Add icechunk.print_debug_info() and Issue Templates (#753)
1 parent 3bc89ad commit 810506f

File tree

6 files changed

+156
-0
lines changed

6 files changed

+156
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: 🐛 Bug Report
2+
description: File a bug report to help us improve
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: what-happened
7+
attributes:
8+
label: What happened?
9+
description: |
10+
Thanks for reporting a bug! Please describe what you were trying to get done.
11+
Tell us what happened, what went wrong.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: what-did-you-expect-to-happen
17+
attributes:
18+
label: What did you expect to happen?
19+
description: |
20+
Describe what you expected to happen.
21+
validations:
22+
required: false
23+
24+
- type: textarea
25+
id: sample-code
26+
attributes:
27+
label: Minimal Complete Verifiable Example
28+
description: |
29+
Minimal, self-contained copy-pastable example that demonstrates the issue. This will be automatically formatted into code, so no need for markdown backticks.
30+
render: Python
31+
32+
- type: checkboxes
33+
id: mvce-checkboxes
34+
attributes:
35+
label: MVCE confirmation
36+
description: |
37+
Please confirm that the bug report is in an excellent state, so we can understand & fix it quickly & efficiently. For more details, check out:
38+
39+
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
40+
- [Craft Minimal Bug Reports](https://matthewrocklin.com/minimal-bug-reports)
41+
42+
options:
43+
- label: Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
44+
- label: Complete example — the example is self-contained, including all data and the text of any traceback.
45+
- label: Verifiable example — the example runs when copied & pasted into an fresh python environment.
46+
- label: New issue — a search of GitHub Issues suggests this is not a duplicate.
47+
48+
- type: textarea
49+
id: log-output
50+
attributes:
51+
label: Relevant log output
52+
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for markdown backticks.
53+
render: Python
54+
55+
- type: textarea
56+
id: extra
57+
attributes:
58+
label: Anything else we need to know?
59+
description: |
60+
Please describe any other information you want to share.
61+
62+
- type: textarea
63+
id: show-versions
64+
attributes:
65+
label: Environment
66+
description: |
67+
Paste the output of `icechunk.print_debug_info()`
68+
validations:
69+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: True
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 📚 Documentation Issue/Suggestion
3+
about: Report parts probems with the docs or suggest improvments
4+
labels: documentation
5+
---
6+
7+
<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->
8+
<!--You can feel free to delete the sections that do not apply.-->
9+
10+
### Problem
11+
12+
<!--
13+
If you are referencing an existing piece of documentation or example please provide a link.
14+
15+
* I found [...] to be unclear because [...]
16+
* [...] made me think that [...] when really it should be [...]
17+
* There is no example showing how to do [...]
18+
-->
19+
20+
21+
### Suggested Improvement
22+
23+
<!--
24+
If you have an idea to improve the documentation please suggest it here
25+
26+
* This line should be be changed to say [...]
27+
* Include a paragraph explaining [...]
28+
* Add a figure showing [...]
29+
-->
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Enhancement/Feature Request
3+
about: Suggest something that could be improved or a New Feature to add
4+
labels: enhancement
5+
---
6+
7+
<!--
8+
Welcome! Thanks for thinking of a way to improve icechunk. If this solves a problem for you,
9+
then it probably solves that problem for lots of people! So the whole community will benefit from this request.
10+
11+
12+
Before creating a new feature request please search the issues for relevant feature requests.
13+
-->
14+
15+
### Problem
16+
17+
<!-- Provide a clear and concise description of what problem this feature will solve. For example:
18+
19+
* I'm always frustrated when [...] because [...]
20+
* I would like it if [...] happened when I [...] because [...]
21+
-->
22+
23+
### Proposed Solution
24+
25+
<!-- Provide a clear and concise description of a way to accomplish what you want. For example:
26+
27+
* Add an option so that when [...] [...] will happen
28+
-->
29+
30+
### Additional context
31+
32+
<!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example:
33+
34+
* Another project [...] solved this by [...]
35+
-->

icechunk-python/python/icechunk/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@
135135
"in_memory_storage",
136136
"initialize_logs",
137137
"local_filesystem_storage",
138+
"print_debug_info",
138139
"s3_anonymous_credentials",
139140
"s3_credentials",
140141
"s3_from_env_credentials",
@@ -146,4 +147,19 @@
146147
"tigris_storage",
147148
]
148149

150+
151+
def print_debug_info() -> None:
152+
import platform
153+
from importlib import import_module
154+
155+
print(f"platform: {platform.platform()}")
156+
print(f"python: {platform.python_version()}")
157+
print(f"icechunk: {__version__}")
158+
for package in ["zarr", "numcodecs", "xarray", "virtualizarr"]:
159+
try:
160+
print(f"{package}: {import_module(package).__version__}")
161+
except ModuleNotFoundError:
162+
continue
163+
164+
149165
initialize_logs()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from icechunk import print_debug_info
2+
3+
4+
def test_debug_info() -> None:
5+
# simple test that this does not cause an error.
6+
print_debug_info()

0 commit comments

Comments
 (0)