debug-dojo 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,3 +206,4 @@ __marimo__/
206
206
  .idea/
207
207
  .vscode/
208
208
  .DS_Store
209
+ junit/test-results.xml
@@ -1,14 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: debug-dojo
3
- Version: 0.4.0
4
- Summary: Debbugging dojo for Python developers
5
- Project-URL: Homepage, https://github.com/bwrob/debug-dojo
6
- Project-URL: Documentation, https://github.com/bwrob/debug-dojo/blob/main/README.md
7
- Project-URL: Source, https://github.com/bwrob/debug-dojo/tree/main/src/debug_dojo
3
+ Version: 0.4.1
4
+ Summary: 🏣 Debugging dojo for Python developers
5
+ Project-URL: Homepage, https://bwrob.github.io/debug-dojo/
6
+ Project-URL: Documentation, https://bwrob.github.io/debug-dojo/
7
+ Project-URL: Source, https://github.com/bwrob/debug-dojo/
8
8
  Project-URL: Changelog, https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md
9
9
  Author-email: bwrob <bartosz.marcin.wroblewski@gmail.com>
10
10
  License-Expression: MIT
11
- License-File: LICENSE
12
11
  Keywords: debugging,inspection,pudb,rich,tools,traceback
13
12
  Classifier: Development Status :: 3 - Alpha
14
13
  Classifier: Intended Audience :: Developers
@@ -20,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.12
20
19
  Classifier: Programming Language :: Python :: 3.13
21
20
  Classifier: Topic :: Software Development :: Debuggers
22
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
- Requires-Python: >=3.10
22
+ Requires-Python: <3.14,>=3.10
24
23
  Requires-Dist: debugpy>=1.8.0
25
24
  Requires-Dist: ipdb>=0.13.0
26
25
  Requires-Dist: pudb>=2020.1
@@ -30,8 +29,10 @@ Requires-Dist: tomlkit>=0.13.3
30
29
  Requires-Dist: typer>=0.15.0
31
30
  Description-Content-Type: text/markdown
32
31
 
32
+ # debug dojo
33
+
33
34
  <p align="center">
34
- <img src="https://github.com/bwrob/debug-dojo/blob/main/logo/logo_python.png?raw=true" alt="debug dojo" style="width:50%; max-width:300px;"/>
35
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/docs/logo/logo_python.png?raw=true" alt="debug dojo" style="width:50%; max-width:300px;"/>
35
36
  </p>
36
37
 
37
38
  <p align="center">
@@ -41,21 +42,10 @@ Description-Content-Type: text/markdown
41
42
  [![PyPi Version](https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square)](https://pypi.org/project/debug-dojo)
42
43
  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square)](https://pypi.org/pypi/debug-dojo/)
43
44
 
44
- **debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal.
45
+ [**debug-dojo**](https://bwrob.github.io/debug-dojo/) is a Python package providing utilities for enhanced debugging and inspection in the terminal.
45
46
  It leverages [`rich`](https://github.com/Textualize/rich) for beautiful output and offers helpers for side-by-side object comparison, improved tracebacks from `rich`, and easy integration with different debuggers -- `debugpy`, `pudb`, `pdb`, and `ipdb`.
46
47
 
47
- ## Features
48
-
49
- - **Convenient CLI** Quickly run your code with debugging tools enabled.
50
- - **Simple API:** Install all tools or only what you need.
51
- - **Debugger integration:** Quickly enable Debugpy, PuDB, PDB, or IPDB as your default pre-configured debugger.
52
- - **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
53
- - **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
54
- - **Configuration:** Easily configure the debugging tools using `dojo.toml` or `pyproject.toml`.
55
-
56
- ## Usage
57
-
58
- ### CLI
48
+ ## CLI usage
59
49
 
60
50
  Run your Python script with debugging tools enabled using the `debug-dojo` command:
61
51
 
@@ -69,7 +59,7 @@ You can optionally set configuration, verbose mode, and specify the debugger typ
69
59
  dojo --debugger ipdb --config dojo.toml --verbose --module my_module
70
60
  ```
71
61
 
72
- ### From the code
62
+ ## From the code
73
63
 
74
64
  In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
75
65
 
@@ -78,84 +68,27 @@ object_1 = {"foo": 1, "bar": 2}
78
68
  object_2 = [1, 2, 3]
79
69
 
80
70
  import debug_dojo.install; b()
81
- p(object_1) # Pretty print an object with Rich
82
- ```
83
-
84
- ### Features in debugging mode
85
-
86
- The following functions are available in the debugging mode, injected into builtins:
87
-
88
- - `b()` is a hook that sets a breakpoint using the configured debugger.
89
- - `p(object_1)` is pretty printing of an object using Rich.
90
- - `i(object_1)` to inspect an object using Rich.
91
- - `c(object_1, object_2)` to compare two objects side-by-side.
92
-
93
- ## Configuration
94
-
95
- You can configure the debugging tools using a `dojo.toml` or `pyproject.toml` file. The configuration allows you to specify which debugger to use, enable or disable features, and set other options.
96
-
97
- **Example `dojo.toml`:**
98
-
99
- ```toml
100
- [debuggers]
101
- default = "ipdb"
102
-
103
- debugpy = { port = 1992 }
104
- ipdb = { context_lines = 20 }
105
-
106
- [exceptions]
107
- locals_in_traceback = false
108
- post_mortem = true
109
- rich_traceback = true
110
-
111
- [features]
112
- breakpoint = "b"
113
- # Empty string means disable the feature
114
- comparer = ""
115
- rich_inspect = "i"
116
- rich_print = "p"
117
- ```
118
-
119
- ## Installation
120
71
 
121
- The package is available on PyPI and can be installed using standard Python package management tools.
72
+ p(object_1) # Pretty print an object with Rich.
73
+ i(object_1) # Inspect an object using Rich.
74
+ c(object_1, object_2) # Compare two objects side-by-side.
122
75
 
123
- ```console
124
- pip install debug-dojo
125
76
  ```
126
77
 
127
- You can also use `poetry` or `uv` to add it to your project:
128
-
129
- ```console
130
- poetry add debug-dojo
131
- ```
78
+ ## Documentation
132
79
 
133
- ```console
134
- uv add debug-dojo
135
- ```
136
-
137
- Note that dojo most likely will not work when installed via `pipx` or `uvx`, as it relies on the current Python environment dependencies.
138
-
139
- ## Development
140
-
141
- ### Lint and type check
142
-
143
- ```console
144
- ruff check src/debug_dojo --fix
145
- basedpyright src/debug_dojo
146
-
147
- poe code-quality
148
- ```
80
+ For instructions regarding installation, configuration and usage please visit [documentation](https://bwrob.github.io/debug-dojo/).
81
+ # Changelog
149
82
 
150
- ### Tests
83
+ ## v0.4.1 (2025-08-10)
151
84
 
152
- TBA
85
+ *release tag*: [v0.4.1](https://github.com/bwrob/debug-dojo/releases/tag/v0.4.1)
153
86
 
154
- ## Changelog
87
+ - Mkdocs documentation at [debug dojo](https://bwrob.github.io/debug-dojo).
155
88
 
156
89
  ## v0.4.0 (2025-08-10)
157
90
 
158
- *release tag*: [v0.4.0]
91
+ *release tag*: [v0.4.0](https://github.com/bwrob/debug-dojo/releases/tag/v0.4.0)
159
92
 
160
93
  - New configuration model `DebugDojoConfig` for better structure.
161
94
  - Added support for `debugger` configuration in `dojo.toml`.
@@ -166,7 +99,7 @@ TBA
166
99
 
167
100
  ## v0.3.2 (2025-07-28)
168
101
 
169
- *release tag*: [v0.3.2]
102
+ *release tag*: [v0.3.2](https://github.com/bwrob/debug-dojo/releases/tag/v0.3.2)
170
103
 
171
104
  - New logo for the project.
172
105
  - Typer used for CLI implementation.
@@ -176,7 +109,7 @@ TBA
176
109
 
177
110
  ## v0.2.0 (2025-07-20)
178
111
 
179
- *release tag*: [v0.2.0]
112
+ *release tag*: [v0.2.0](https://github.com/bwrob/debug-dojo/releases/tag/v0.2.0)
180
113
 
181
114
  - Added `dojo` command for easy debugging setup.
182
115
  - Added `p()` function for rich printing.
@@ -186,7 +119,7 @@ TBA
186
119
 
187
120
  ## v0.1.0 (2025-07-19)
188
121
 
189
- *release tag*: [v0.1.0]
122
+ *release tag*: [v0.1.0](https://github.com/bwrob/debug-dojo/releases/tag/v0.1.0)
190
123
 
191
124
  - Initial module to install debugging tools.
192
125
  - Debug mode utilities for PuDB, rich tracebacks, and object inspection.
@@ -0,0 +1,49 @@
1
+ # debug dojo
2
+
3
+ <p align="center">
4
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/docs/logo/logo_python.png?raw=true" alt="debug dojo" style="width:50%; max-width:300px;"/>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <em>debug dojo, a place for zen debugging</em>
9
+ </p>
10
+
11
+ [![PyPi Version](https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square)](https://pypi.org/project/debug-dojo)
12
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square)](https://pypi.org/pypi/debug-dojo/)
13
+
14
+ [**debug-dojo**](https://bwrob.github.io/debug-dojo/) is a Python package providing utilities for enhanced debugging and inspection in the terminal.
15
+ It leverages [`rich`](https://github.com/Textualize/rich) for beautiful output and offers helpers for side-by-side object comparison, improved tracebacks from `rich`, and easy integration with different debuggers -- `debugpy`, `pudb`, `pdb`, and `ipdb`.
16
+
17
+ ## CLI usage
18
+
19
+ Run your Python script with debugging tools enabled using the `debug-dojo` command:
20
+
21
+ ```console
22
+ dojo my_script.py
23
+ ```
24
+
25
+ You can optionally set configuration, verbose mode, and specify the debugger type. Both script files and modules are supported:
26
+
27
+ ```console
28
+ dojo --debugger ipdb --config dojo.toml --verbose --module my_module
29
+ ```
30
+
31
+ ## From the code
32
+
33
+ In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
34
+
35
+ ```python
36
+ object_1 = {"foo": 1, "bar": 2}
37
+ object_2 = [1, 2, 3]
38
+
39
+ import debug_dojo.install; b()
40
+
41
+ p(object_1) # Pretty print an object with Rich.
42
+ i(object_1) # Inspect an object using Rich.
43
+ c(object_1, object_2) # Compare two objects side-by-side.
44
+
45
+ ```
46
+
47
+ ## Documentation
48
+
49
+ For instructions regarding installation, configuration and usage please visit [documentation](https://bwrob.github.io/debug-dojo/).
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "debug-dojo"
3
- description = "Debbugging dojo for Python developers"
3
+ description = "🏣 Debugging dojo for Python developers"
4
4
  authors = [
5
5
  { name = "bwrob", email = "bartosz.marcin.wroblewski@gmail.com" },
6
6
  ]
7
- requires-python = ">=3.10"
7
+ requires-python = ">=3.10,<3.14"
8
8
  dependencies = [
9
9
  "debugpy>=1.8.0",
10
10
  "ipdb>=0.13.0",
@@ -36,13 +36,13 @@
36
36
  "Topic :: Software Development :: Debuggers",
37
37
  "Topic :: Software Development :: Libraries :: Python Modules",
38
38
  ]
39
- version = "0.4.0"
39
+ version = "0.4.1"
40
40
  dynamic = ['readme']
41
41
 
42
42
  [project.urls]
43
- Homepage = "https://github.com/bwrob/debug-dojo"
44
- Documentation = "https://github.com/bwrob/debug-dojo/blob/main/README.md"
45
- Source = "https://github.com/bwrob/debug-dojo/tree/main/src/debug_dojo"
43
+ Homepage = "https://bwrob.github.io/debug-dojo/"
44
+ Documentation = "https://bwrob.github.io/debug-dojo/"
45
+ Source = "https://github.com/bwrob/debug-dojo/"
46
46
  Changelog = "https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md"
47
47
 
48
48
  [project.scripts]
@@ -50,11 +50,20 @@
50
50
 
51
51
  [dependency-groups]
52
52
  dev = [
53
- "basedpyright>=1.31.0",
54
- "jupyter>=1.1.1",
55
- "poethepoet>=0.36.0",
56
- "ruff>=0.12.4",
53
+ "basedpyright>=1.31.2",
54
+ "poethepoet>=0.37.0",
55
+ "pytest>=8.4.1",
56
+ "ruff>=0.12.9",
57
57
  ]
58
+ docs = [
59
+ "mkdocs>=1.6.1",
60
+ "mkdocs-git-authors-plugin>=0.10.0",
61
+ "mkdocs-git-committers-plugin-2>=2.5.0",
62
+ "mkdocs-git-revision-date-localized-plugin>=1.4.7",
63
+ "mkdocs-material>=9.6.17",
64
+ "mkdocs-typer2>=0.1.5",
65
+ "mkdocstrings-python>=1.17.0",
66
+ ]
58
67
 
59
68
  [build-system]
60
69
  requires = [
@@ -63,6 +72,9 @@
63
72
  ]
64
73
  build-backend = "hatchling.build"
65
74
 
75
+ [tool.uv]
76
+ required-version = ">=0.8.0"
77
+
66
78
  [tool.hatch.metadata]
67
79
  allow-direct-references = true
68
80
 
@@ -71,8 +83,7 @@
71
83
  # construct the PyPI readme from README.md and HISTORY.md
72
84
  fragments = [
73
85
  { path = 'README.md' },
74
- { text = "\n\n## Changelog\n\n" },
75
- { path = 'HISTORY.md' },
86
+ { path = './docs/changelog.md' },
76
87
  ]
77
88
 
78
89
 
@@ -88,15 +99,3 @@
88
99
  pythonVersion = "3.10"
89
100
  strict = ["src/debug_dojo/*"]
90
101
  ignore = ["examples"]
91
-
92
- [tool.poe.tasks]
93
- lint = "ruff check --fix src"
94
- format = "ruff format src"
95
- type-check = "basedpyright --project pyproject.toml src/debug_dojo"
96
- code-quality = ["format", "lint", "type-check"]
97
- publish = [
98
- "code-quality",
99
- { cmd = "rm -rf dist" },
100
- { cmd = "uv build" },
101
- { cmd = "uv publish" },
102
- ]
@@ -96,17 +96,40 @@ def _inspect() -> None:
96
96
 
97
97
 
98
98
  def _compare() -> None:
99
- """Print the object using a custom inspect function."""
99
+ """Print the object using a custom inspect function.
100
+
101
+ >>> _compare()
102
+ >>> import builtins
103
+ >>> callable(builtins.c)
104
+ True
105
+
106
+ """
100
107
  builtins.c = inspect_objects_side_by_side # pyright: ignore[reportAttributeAccessIssue]
101
108
 
102
109
 
103
110
  def _breakpoint() -> None:
104
- """Install the breakpoint function."""
111
+ """Install the breakpoint function.
112
+
113
+ >>> _breakpoint()
114
+ >>> import builtins
115
+ >>> callable(builtins.b)
116
+ True
117
+
118
+ """
105
119
  builtins.b = breakpoint # pyright: ignore[reportAttributeAccessIssue]
106
120
 
107
121
 
108
122
  def _rich_print() -> None:
109
- """Install the print from rich."""
123
+ """Install the print from rich.
124
+
125
+ >>> _rich_print()
126
+ >>> import builtins
127
+ >>> callable(builtins.p)
128
+ True
129
+ >>> p("test")
130
+ test
131
+
132
+ """
110
133
  from rich import print as rich_print
111
134
 
112
135
  builtins.p = rich_print # pyright: ignore[reportAttributeAccessIssue]
@@ -1,37 +0,0 @@
1
- ## v0.4.0 (2025-08-10)
2
-
3
- *release tag*: [v0.4.0]
4
-
5
- - New configuration model `DebugDojoConfig` for better structure.
6
- - Added support for `debugger` configuration in `dojo.toml`.
7
- - Updated `dojo` command to include debugger type in command call.
8
- - Configuration versioning allows for in-flight migration of old configurations.
9
- - Improved error handling in configuration loading.
10
- - Improved catching errors from target execution.
11
-
12
- ## v0.3.2 (2025-07-28)
13
-
14
- *release tag*: [v0.3.2]
15
-
16
- - New logo for the project.
17
- - Typer used for CLI implementation.
18
- - Dojo is configured via `dojo.toml` or `pyproject.toml`.
19
- - Support for `debugpy` and `ipdb` for debugging.
20
- - Fixed documentation and history.
21
-
22
- ## v0.2.0 (2025-07-20)
23
-
24
- *release tag*: [v0.2.0]
25
-
26
- - Added `dojo` command for easy debugging setup.
27
- - Added `p()` function for rich printing.
28
- - Added history file for tracking changes.
29
- - Moved to `hatch` for building and packaging.
30
- - Fixed `pyproject.toml` to point to GitHub repository as the homepage.
31
-
32
- ## v0.1.0 (2025-07-19)
33
-
34
- *release tag*: [v0.1.0]
35
-
36
- - Initial module to install debugging tools.
37
- - Debug mode utilities for PuDB, rich tracebacks, and object inspection.
debug_dojo-0.4.0/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 to bwrob.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,120 +0,0 @@
1
- <p align="center">
2
- <img src="https://github.com/bwrob/debug-dojo/blob/main/logo/logo_python.png?raw=true" alt="debug dojo" style="width:50%; max-width:300px;"/>
3
- </p>
4
-
5
- <p align="center">
6
- <em>debug dojo, a place for zen debugging</em>
7
- </p>
8
-
9
- [![PyPi Version](https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square)](https://pypi.org/project/debug-dojo)
10
- [![PyPI pyversions](https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square)](https://pypi.org/pypi/debug-dojo/)
11
-
12
- **debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal.
13
- It leverages [`rich`](https://github.com/Textualize/rich) for beautiful output and offers helpers for side-by-side object comparison, improved tracebacks from `rich`, and easy integration with different debuggers -- `debugpy`, `pudb`, `pdb`, and `ipdb`.
14
-
15
- ## Features
16
-
17
- - **Convenient CLI** Quickly run your code with debugging tools enabled.
18
- - **Simple API:** Install all tools or only what you need.
19
- - **Debugger integration:** Quickly enable Debugpy, PuDB, PDB, or IPDB as your default pre-configured debugger.
20
- - **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
21
- - **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
22
- - **Configuration:** Easily configure the debugging tools using `dojo.toml` or `pyproject.toml`.
23
-
24
- ## Usage
25
-
26
- ### CLI
27
-
28
- Run your Python script with debugging tools enabled using the `debug-dojo` command:
29
-
30
- ```console
31
- dojo my_script.py
32
- ```
33
-
34
- You can optionally set configuration, verbose mode, and specify the debugger type. Both script files and modules are supported:
35
-
36
- ```console
37
- dojo --debugger ipdb --config dojo.toml --verbose --module my_module
38
- ```
39
-
40
- ### From the code
41
-
42
- In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
43
-
44
- ```python
45
- object_1 = {"foo": 1, "bar": 2}
46
- object_2 = [1, 2, 3]
47
-
48
- import debug_dojo.install; b()
49
- p(object_1) # Pretty print an object with Rich
50
- ```
51
-
52
- ### Features in debugging mode
53
-
54
- The following functions are available in the debugging mode, injected into builtins:
55
-
56
- - `b()` is a hook that sets a breakpoint using the configured debugger.
57
- - `p(object_1)` is pretty printing of an object using Rich.
58
- - `i(object_1)` to inspect an object using Rich.
59
- - `c(object_1, object_2)` to compare two objects side-by-side.
60
-
61
- ## Configuration
62
-
63
- You can configure the debugging tools using a `dojo.toml` or `pyproject.toml` file. The configuration allows you to specify which debugger to use, enable or disable features, and set other options.
64
-
65
- **Example `dojo.toml`:**
66
-
67
- ```toml
68
- [debuggers]
69
- default = "ipdb"
70
-
71
- debugpy = { port = 1992 }
72
- ipdb = { context_lines = 20 }
73
-
74
- [exceptions]
75
- locals_in_traceback = false
76
- post_mortem = true
77
- rich_traceback = true
78
-
79
- [features]
80
- breakpoint = "b"
81
- # Empty string means disable the feature
82
- comparer = ""
83
- rich_inspect = "i"
84
- rich_print = "p"
85
- ```
86
-
87
- ## Installation
88
-
89
- The package is available on PyPI and can be installed using standard Python package management tools.
90
-
91
- ```console
92
- pip install debug-dojo
93
- ```
94
-
95
- You can also use `poetry` or `uv` to add it to your project:
96
-
97
- ```console
98
- poetry add debug-dojo
99
- ```
100
-
101
- ```console
102
- uv add debug-dojo
103
- ```
104
-
105
- Note that dojo most likely will not work when installed via `pipx` or `uvx`, as it relies on the current Python environment dependencies.
106
-
107
- ## Development
108
-
109
- ### Lint and type check
110
-
111
- ```console
112
- ruff check src/debug_dojo --fix
113
- basedpyright src/debug_dojo
114
-
115
- poe code-quality
116
- ```
117
-
118
- ### Tests
119
-
120
- TBA