debug-dojo 0.1.0__tar.gz → 0.3.0__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.
@@ -0,0 +1,207 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Marimo
198
+ marimo/_static/
199
+ marimo/_lsp/
200
+ __marimo__/
201
+
202
+ # Streamlit
203
+ .streamlit/secrets.toml
204
+
205
+ # IDE specific files
206
+ .idea/
207
+ .vscode/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,25 @@
1
+ ## v0.2.0 (2025-07-20)
2
+
3
+ *release tag*: [v0.2.0]
4
+
5
+ ### What's Changed
6
+
7
+ - Added `dojo` command for easy debugging setup.
8
+ - Added `p()` function for rich printing.
9
+ - Added history file for tracking changes.
10
+ - Moved to `hatch` for building and packaging.
11
+
12
+ #### Fixes
13
+
14
+ - Fixed `pyproject.toml` to point to GitHub repository as the homepage.
15
+
16
+ ## v0.1.0 (2025-07-19)
17
+
18
+ *release tag*: [v0.1.0]
19
+
20
+ ### What's Changed
21
+
22
+ - Initial module to install debugging tools.
23
+ - Debug mode utilities for PuDB, rich tracebacks, and object inspection.
24
+
25
+ #### Fixes
@@ -0,0 +1,21 @@
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.
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.4
2
+ Name: debug-dojo
3
+ Version: 0.3.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
8
+ Project-URL: Changelog, https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md
9
+ Author-email: bwrob <bartosz.marcin.wroblewski@gmail.com>
10
+ License-Expression: MIT
11
+ Keywords: debugging,inspection,pudb,rich,tools,traceback
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Debuggers
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: pudb>=2020.1
24
+ Requires-Dist: rich>=11.0.0
25
+ Requires-Dist: typer>=0.15.0
26
+ Description-Content-Type: text/markdown
27
+
28
+ <p align="center">
29
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/logo/logo_white.png?raw=true" alt="debug dojo" style="width:50%; max-width:400px;"/>
30
+ </p>
31
+
32
+ <p align="center">
33
+ <em>debug dojo, a place for zen debugging</em>
34
+ </p>
35
+
36
+ [![PyPi Version](https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square)](https://pypi.org/project/debug-dojo)
37
+ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square)](https://pypi.org/pypi/debug-dojo/)
38
+
39
+ **debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal. 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 PuDB. All tools can be installed at once or individually, allowing for flexible debugging setups.
40
+
41
+ ## Features
42
+
43
+ - **Convenient CLI** Quickly run your code with debugging tools enabled.
44
+ - **Simple API:** Install all tools or only what you need.
45
+ - **PuDB integration:** Quickly enable the PuDB TUI debugger.
46
+ - **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
47
+ - **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
48
+
49
+ ## Usage
50
+
51
+ ### CLI
52
+
53
+ Run your Python script with debugging tools enabled using the `debug-dojo` command:
54
+
55
+ ```console
56
+ dojo my_script.py
57
+ ```
58
+
59
+ ### Install all debugging tools
60
+
61
+ In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
62
+
63
+ ```python
64
+ import debug_dojo.all; b()
65
+
66
+ p(object_1) # Pretty print an object with Rich
67
+ i(object_1) # Inspect an object
68
+ c(object_1, object_2) # Compare two objects side-by-side
69
+ ```
70
+
71
+ Where:
72
+
73
+ - `b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.
74
+ - `p(object_1)` is pretty printing of an object using Rich.
75
+ - `i(object_1)` to inspect an object using Rich.
76
+ - `c(object_1, object_2)` to compare two objects side-by-side.
77
+
78
+ ### Use individual tools
79
+
80
+ ```python
81
+ from debug_dojo import install_inspect, use_pudb, use_rich_traceback
82
+
83
+ install_inspect() # Enable object inspection helpers
84
+ use_pudb() # Set up PuDB as the debugger
85
+ use_rich_traceback() # Enable Rich tracebacks
86
+ ```
87
+
88
+ ### Compare objects side-by-side
89
+
90
+ ```python
91
+ from debug_dojo.compareres import inspect_objects_side_by_side
92
+
93
+ a = {"foo": 1, "bar": 2}
94
+ b = [1, 2, 3]
95
+ inspect_objects_side_by_side(a, b)
96
+ ```
97
+
98
+
99
+ ## Installation
100
+
101
+ The package is available on PyPI and can be installed using standard Python package management tools.
102
+
103
+ ```console
104
+ pip install debug-dojo
105
+ ```
106
+
107
+ You can also use `poetry` or `uv` to add it to your project:
108
+
109
+ ```console
110
+ poetry add debug-dojo
111
+ ```
112
+
113
+ ```console
114
+ uv add debug-dojo
115
+ ```
116
+
117
+ Note that dojo most likely will not work when installed via `pipx` or `uvx`, as it relies on the current Python environment dependencies.
118
+
119
+ ## Development
120
+
121
+ ### Lint and type check
122
+
123
+ ```console
124
+ ruff check src/debug_dojo --fix
125
+ basedpyright src/debug_dojo
126
+ ```
127
+
128
+
129
+ ## Changelog
130
+
131
+ ## v0.2.0 (2025-07-20)
132
+
133
+ *release tag*: [v0.2.0]
134
+
135
+ ### What's Changed
136
+
137
+ - Added `dojo` command for easy debugging setup.
138
+ - Added `p()` function for rich printing.
139
+ - Added history file for tracking changes.
140
+ - Moved to `hatch` for building and packaging.
141
+
142
+ #### Fixes
143
+
144
+ - Fixed `pyproject.toml` to point to GitHub repository as the homepage.
145
+
146
+ ## v0.1.0 (2025-07-19)
147
+
148
+ *release tag*: [v0.1.0]
149
+
150
+ ### What's Changed
151
+
152
+ - Initial module to install debugging tools.
153
+ - Debug mode utilities for PuDB, rich tracebacks, and object inspection.
154
+
155
+ #### Fixes
@@ -1,32 +1,33 @@
1
- Metadata-Version: 2.3
2
- Name: debug-dojo
3
- Version: 0.1.0
4
- Summary: Debbugging dojo for Python developers
5
- Author: bwrob
6
- Author-email: bwrob <bartosz.marcin.wroblewski@gmail.com>
7
- Requires-Dist: pudb>=2016.1
8
- Requires-Dist: rich>=11.0.0
9
- Requires-Python: >=3.10
10
- Description-Content-Type: text/markdown
11
-
12
- # debug-dojo
1
+ <p align="center">
2
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/logo/logo_white.png?raw=true" alt="debug dojo" style="width:50%; max-width:400px;"/>
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/)
13
11
 
14
12
  **debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal. 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 PuDB. All tools can be installed at once or individually, allowing for flexible debugging setups.
15
13
 
16
14
  ## Features
17
15
 
16
+ - **Convenient CLI** Quickly run your code with debugging tools enabled.
18
17
  - **Simple API:** Install all tools or only what you need.
19
18
  - **PuDB integration:** Quickly enable the PuDB TUI debugger.
20
19
  - **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
21
20
  - **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
22
21
 
23
- ## Installation
22
+ ## Usage
24
23
 
25
- ```sh
26
- pip install debug-dojo
27
- ```
24
+ ### CLI
28
25
 
29
- ## Usage
26
+ Run your Python script with debugging tools enabled using the `debug-dojo` command:
27
+
28
+ ```console
29
+ dojo my_script.py
30
+ ```
30
31
 
31
32
  ### Install all debugging tools
32
33
 
@@ -34,15 +35,19 @@ In the `PuDB` style, you can install all debugging tools and enter the debugging
34
35
 
35
36
  ```python
36
37
  import debug_dojo.all; b()
38
+
39
+ p(object_1) # Pretty print an object with Rich
40
+ i(object_1) # Inspect an object
41
+ c(object_1, object_2) # Compare two objects side-by-side
37
42
  ```
38
43
 
39
- Where`b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.
40
- In the PuDB interface, you can use the following functions:
44
+ Where:
41
45
 
42
- - `i(object_1)` to inspect an object.
46
+ - `b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.
47
+ - `p(object_1)` is pretty printing of an object using Rich.
48
+ - `i(object_1)` to inspect an object using Rich.
43
49
  - `c(object_1, object_2)` to compare two objects side-by-side.
44
50
 
45
-
46
51
  ### Use individual tools
47
52
 
48
53
  ```python
@@ -63,25 +68,32 @@ b = [1, 2, 3]
63
68
  inspect_objects_side_by_side(a, b)
64
69
  ```
65
70
 
66
- ## Development
67
71
 
68
- ### Run tests
72
+ ## Installation
69
73
 
70
- ```sh
71
- pytest
74
+ The package is available on PyPI and can be installed using standard Python package management tools.
75
+
76
+ ```console
77
+ pip install debug-dojo
72
78
  ```
73
79
 
74
- ### Lint and type check
80
+ You can also use `poetry` or `uv` to add it to your project:
75
81
 
76
- ```sh
77
- ruff check src/debug_dojo --fix
78
- basedpyright src/debug_dojo
82
+ ```console
83
+ poetry add debug-dojo
84
+ ```
85
+
86
+ ```console
87
+ uv add debug-dojo
79
88
  ```
80
89
 
81
- ## License
90
+ Note that dojo most likely will not work when installed via `pipx` or `uvx`, as it relies on the current Python environment dependencies.
82
91
 
83
- MIT License
92
+ ## Development
84
93
 
85
- ---
94
+ ### Lint and type check
86
95
 
87
- *Debugging made delightful!*
96
+ ```console
97
+ ruff check src/debug_dojo --fix
98
+ basedpyright src/debug_dojo
99
+ ```
@@ -0,0 +1,24 @@
1
+ """Example script demonstrating cl argument printing and dictionary inspection."""
2
+
3
+ import sys
4
+
5
+ from rich import print as rich_print
6
+
7
+
8
+ def main() -> None:
9
+ """Run the command-line interface."""
10
+ if len(sys.argv) > 1:
11
+ rich_print(sys.argv[1::])
12
+
13
+ example_dict = {
14
+ "key1": "value1",
15
+ "key2": "value2",
16
+ "key3": "value3",
17
+ }
18
+ b()
19
+
20
+ i(example_dict)
21
+
22
+
23
+ if __name__ == "__main__":
24
+ main()
Binary file
Binary file
@@ -0,0 +1,79 @@
1
+ [project]
2
+ name = "debug-dojo"
3
+ description = "Debbugging dojo for Python developers"
4
+ authors = [
5
+ { name = "bwrob", email = "bartosz.marcin.wroblewski@gmail.com" },
6
+ ]
7
+ requires-python = ">=3.10"
8
+ dependencies = [
9
+ "pudb>=2020.1",
10
+ "rich>=11.0.0",
11
+ "typer>=0.15.0",
12
+ ]
13
+ license = 'MIT'
14
+ license-files = ['LICENSE']
15
+ keywords = [
16
+ "debugging",
17
+ "inspection",
18
+ "pudb",
19
+ "rich",
20
+ "tools",
21
+ "traceback",
22
+ ]
23
+ classifiers = [
24
+ "Development Status :: 3 - Alpha",
25
+ "Intended Audience :: Developers",
26
+ "License :: OSI Approved :: MIT License",
27
+ "Operating System :: OS Independent",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "Programming Language :: Python :: 3.13",
32
+ "Topic :: Software Development :: Debuggers",
33
+ "Topic :: Software Development :: Libraries :: Python Modules",
34
+ ]
35
+ version = "0.3.0"
36
+ dynamic = ['readme']
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/bwrob/debug-dojo"
40
+ Documentation = "https://github.com/bwrob/debug-dojo/blob/main/README.md"
41
+ Source = "https://github.com/bwrob/debug-dojo/tree/main/src/debug_dojo"
42
+ Changelog = "https://github.com/bwrob/debug-dojo/blob/main/HISTORY.md"
43
+
44
+ [project.scripts]
45
+ # This defines your command-line script!
46
+ # It points to the 'main' function in your 'cli' module.
47
+ "dojo" = "debug_dojo._cli:main"
48
+
49
+ [dependency-groups]
50
+ dev = ["basedpyright>=1.31.0", "ruff>=0.12.4"]
51
+
52
+ [build-system]
53
+ requires = [
54
+ "hatch-fancy-pypi-readme>=25.1.0",
55
+ "hatchling",
56
+ ]
57
+ build-backend = "hatchling.build"
58
+
59
+
60
+ [tool.hatch.version]
61
+ path = "src/debug_dojo/version.py"
62
+
63
+ [tool.hatch.metadata]
64
+ allow-direct-references = true
65
+
66
+ [tool.hatch.metadata.hooks.fancy-pypi-readme]
67
+ content-type = 'text/markdown'
68
+ # construct the PyPI readme from README.md and HISTORY.md
69
+ fragments = [
70
+ { path = 'README.md' },
71
+ { text = "\n\n## Changelog\n\n" },
72
+ { path = 'HISTORY.md' },
73
+ ]
74
+
75
+ [tool.basedpyright]
76
+ typeCheckingMode = "all"
77
+ pythonVersion = "3.10"
78
+ strict = ["src/debug_dojo/*"]
79
+ ignore = ["examples"]
@@ -0,0 +1,20 @@
1
+ line-length = 88
2
+ target-version = "py310"
3
+
4
+
5
+ [lint]
6
+ select = ["ALL"]
7
+ ignore = [
8
+ "COM",
9
+ "D203",
10
+ "D211",
11
+ "D213",
12
+ "FA",
13
+ "ISC",
14
+ "T",
15
+ "TC",
16
+ ]
17
+ exclude = ["examples"]
18
+
19
+ [format]
20
+ docstring-code-format = true
@@ -4,7 +4,7 @@ This module provides functions to set up debugging tools like PuDB and Rich Trac
4
4
  It checks for the availability of these tools and configures them accordingly.
5
5
  """
6
6
 
7
- from .installers import install_inspect, use_pudb, use_rich_traceback
7
+ from .installers import install_all, install_inspect, use_pudb, use_rich_traceback
8
8
 
9
9
  ii = install_inspect
10
10
  pudb = use_pudb
@@ -12,6 +12,7 @@ rt = use_rich_traceback
12
12
 
13
13
  __all__ = [
14
14
  "ii",
15
+ "install_all",
15
16
  "install_inspect",
16
17
  "pudb",
17
18
  "rt",
@@ -0,0 +1,6 @@
1
+ """Entry point for the debug_dojo package."""
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
@@ -0,0 +1,76 @@
1
+ """Command-line interface for running Python scripts or modules with debugging tools."""
2
+
3
+ import os
4
+ import runpy
5
+ import sys
6
+ from bdb import BdbQuit
7
+ from pathlib import Path
8
+ from typing import Annotated
9
+
10
+ import typer
11
+ from rich import print as rich_print
12
+
13
+ from .installers import install_all
14
+
15
+ cli = typer.Typer(
16
+ name="debug_dojo",
17
+ help="Run a Python script or module with debugging tools installed.",
18
+ no_args_is_help=True,
19
+ )
20
+
21
+
22
+ def execute_with_debug(target_name: str, args_for_target: list[str]) -> None:
23
+ """Execute a target script or module with installation of debugging tools."""
24
+ sys.argv = [target_name, *args_for_target]
25
+
26
+ install_all()
27
+
28
+ if (
29
+ Path(target_name).exists()
30
+ or target_name.endswith(".py")
31
+ or os.sep in target_name
32
+ ):
33
+ if not Path(target_name).exists():
34
+ sys.exit(1)
35
+ runner = runpy.run_path
36
+ else:
37
+ runner = runpy.run_module
38
+
39
+ _ = runner(target_name, run_name="__main__")
40
+
41
+
42
+ @cli.command(
43
+ name="",
44
+ context_settings={
45
+ "allow_extra_args": True,
46
+ "ignore_unknown_options": True,
47
+ },
48
+ )
49
+ def main(
50
+ ctx: typer.Context,
51
+ target_name: Annotated[
52
+ str,
53
+ typer.Argument(
54
+ ...,
55
+ help="The target script or module to debug. Provide the path or module name.",
56
+ ),
57
+ ],
58
+ ) -> None:
59
+ """Run the command-line interface."""
60
+ args_for_target = ctx.args
61
+ try:
62
+ execute_with_debug(target_name, args_for_target)
63
+ except BdbQuit:
64
+ rich_print("[red]Debugging session terminated by user.[/red]")
65
+ sys.exit(0)
66
+
67
+
68
+ @cli.command("config")
69
+ def config() -> None:
70
+ """Display the configuration for the debug dojo."""
71
+ rich_print("[green]Debug Dojo Configuration:[/green]")
72
+ rich_print("This tool installs debugging tools and runs Python scripts or modules.")
73
+ rich_print(
74
+ "You can specify a target script or module to debug, along with any arguments."
75
+ )
76
+ rich_print("Example usage: `debug_dojo target_to_debug.py --some-input-to-target`")
@@ -0,0 +1,5 @@
1
+ """Install all debugging tools for the debug_dojo package by import."""
2
+
3
+ from .installers import install_all
4
+
5
+ install_all()
@@ -13,6 +13,9 @@ from rich import (
13
13
  inspect,
14
14
  traceback,
15
15
  )
16
+ from rich import (
17
+ print as rich_print,
18
+ )
16
19
 
17
20
  from .compareres import inspect_objects_side_by_side
18
21
 
@@ -60,3 +63,19 @@ def install_breakpoint() -> None:
60
63
  """Install the breakpoint function."""
61
64
  # Set the breakpoint function to use PuDB's set_trace
62
65
  builtins.b = pudb.set_trace # pyright: ignore[reportAttributeAccessIssue]
66
+
67
+
68
+ def install_rich_print() -> None:
69
+ """Install the print from rich."""
70
+ builtins.p = rich_print # pyright: ignore[reportAttributeAccessIssue]
71
+
72
+
73
+ def install_all() -> None:
74
+ """Install debugging tools."""
75
+ use_pudb()
76
+ use_rich_traceback()
77
+
78
+ install_inspect()
79
+ install_compare()
80
+ install_breakpoint()
81
+ install_rich_print()
@@ -0,0 +1,247 @@
1
+ version = 1
2
+ revision = 2
3
+ requires-python = ">=3.10"
4
+
5
+ [[package]]
6
+ name = "basedpyright"
7
+ version = "1.31.0"
8
+ source = { registry = "https://pypi.org/simple" }
9
+ dependencies = [
10
+ { name = "nodejs-wheel-binaries" },
11
+ ]
12
+ sdist = { url = "https://files.pythonhosted.org/packages/20/23/6dc0df43c62fdec401b1ec3aea698ba50c5abfca25259e9f0208b34d7abe/basedpyright-1.31.0.tar.gz", hash = "sha256:900a573a525a0f66f884075c2a98711bb9478e44dc60ffdf182ef681bf8e2c76", size = 22062384, upload-time = "2025-07-16T11:37:29.189Z" }
13
+ wheels = [
14
+ { url = "https://files.pythonhosted.org/packages/5a/85/cb46707458c514ae959fe139135d8f7231d95faf1c383a56979a3436b965/basedpyright-1.31.0-py3-none-any.whl", hash = "sha256:d7460ddcd3a2332b1c3fd738735d18bf2966d49aed67237efa1f19635199d414", size = 11538999, upload-time = "2025-07-16T11:37:26.446Z" },
15
+ ]
16
+
17
+ [[package]]
18
+ name = "click"
19
+ version = "8.2.1"
20
+ source = { registry = "https://pypi.org/simple" }
21
+ dependencies = [
22
+ { name = "colorama", marker = "sys_platform == 'win32'" },
23
+ ]
24
+ sdist = { url = "https://files.pythonhosted.org/packages/60/6c/8ca2efa64cf75a977a0d7fac081354553ebe483345c734fb6b6515d96bbc/click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202", size = 286342, upload-time = "2025-05-20T23:19:49.832Z" }
25
+ wheels = [
26
+ { url = "https://files.pythonhosted.org/packages/85/32/10bb5764d90a8eee674e9dc6f4db6a0ab47c8c4d0d83c27f7c39ac415a4d/click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b", size = 102215, upload-time = "2025-05-20T23:19:47.796Z" },
27
+ ]
28
+
29
+ [[package]]
30
+ name = "colorama"
31
+ version = "0.4.6"
32
+ source = { registry = "https://pypi.org/simple" }
33
+ sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
34
+ wheels = [
35
+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
36
+ ]
37
+
38
+ [[package]]
39
+ name = "commonmark"
40
+ version = "0.9.1"
41
+ source = { registry = "https://pypi.org/simple" }
42
+ sdist = { url = "https://files.pythonhosted.org/packages/60/48/a60f593447e8f0894ebb7f6e6c1f25dafc5e89c5879fdc9360ae93ff83f0/commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60", size = 95764, upload-time = "2019-10-04T15:37:39.817Z" }
43
+ wheels = [
44
+ { url = "https://files.pythonhosted.org/packages/b1/92/dfd892312d822f36c55366118b95d914e5f16de11044a27cf10a7d71bbbf/commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9", size = 51068, upload-time = "2019-10-04T15:37:37.674Z" },
45
+ ]
46
+
47
+ [[package]]
48
+ name = "debug-dojo"
49
+ version = "0.3.0"
50
+ source = { editable = "." }
51
+ dependencies = [
52
+ { name = "pudb" },
53
+ { name = "rich" },
54
+ { name = "typer" },
55
+ ]
56
+
57
+ [package.dev-dependencies]
58
+ dev = [
59
+ { name = "basedpyright" },
60
+ { name = "ruff" },
61
+ ]
62
+
63
+ [package.metadata]
64
+ requires-dist = [
65
+ { name = "pudb", specifier = ">=2020.1" },
66
+ { name = "rich", specifier = ">=11.0.0" },
67
+ { name = "typer", specifier = ">=0.15.0" },
68
+ ]
69
+
70
+ [package.metadata.requires-dev]
71
+ dev = [
72
+ { name = "basedpyright", specifier = ">=1.31.0" },
73
+ { name = "ruff", specifier = ">=0.12.4" },
74
+ ]
75
+
76
+ [[package]]
77
+ name = "jedi"
78
+ version = "0.19.2"
79
+ source = { registry = "https://pypi.org/simple" }
80
+ dependencies = [
81
+ { name = "parso" },
82
+ ]
83
+ sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287, upload-time = "2024-11-11T01:41:42.873Z" }
84
+ wheels = [
85
+ { url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278, upload-time = "2024-11-11T01:41:40.175Z" },
86
+ ]
87
+
88
+ [[package]]
89
+ name = "nodejs-wheel-binaries"
90
+ version = "22.17.0"
91
+ source = { registry = "https://pypi.org/simple" }
92
+ sdist = { url = "https://files.pythonhosted.org/packages/d3/86/8962d1d24ff480f4dd31871f42c8e0d8e2c851cd558a07ee689261d310ab/nodejs_wheel_binaries-22.17.0.tar.gz", hash = "sha256:529142012fb8fd20817ef70e2ef456274df4f49933292e312c8bbc7285af6408", size = 8068, upload-time = "2025-06-29T20:24:25.002Z" }
93
+ wheels = [
94
+ { url = "https://files.pythonhosted.org/packages/5d/53/b942c6da4ff6f87a315033f6ff6fed8fd3c22047d7ff5802badaa5dfc2c2/nodejs_wheel_binaries-22.17.0-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:6545a6f6d2f736d9c9e2eaad7e599b6b5b2d8fd4cbd2a1df0807cbcf51b9d39b", size = 51003554, upload-time = "2025-06-29T20:23:47.042Z" },
95
+ { url = "https://files.pythonhosted.org/packages/e2/b7/7184a9ad2364912da22f2fe021dc4a3301721131ef7759aeb4a1f19db0b4/nodejs_wheel_binaries-22.17.0-py2.py3-none-macosx_11_0_x86_64.whl", hash = "sha256:4bea5b994dd87c20f8260031ea69a97c3d282e2d4472cc8908636a313a830d00", size = 51936848, upload-time = "2025-06-29T20:23:52.064Z" },
96
+ { url = "https://files.pythonhosted.org/packages/e9/7a/0ea425147b8110b8fd65a6c21cfd3bd130cdec7766604361429ef870d799/nodejs_wheel_binaries-22.17.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:885508615274a22499dd5314759c1cf96ba72de03e6485d73b3e5475e7f12662", size = 57925230, upload-time = "2025-06-29T20:23:56.81Z" },
97
+ { url = "https://files.pythonhosted.org/packages/23/5f/10a3f2ac08a839d065d9ccfd6d9df66bc46e100eaf87a8a5cf149eb3fb8e/nodejs_wheel_binaries-22.17.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90f38ce034a602bcab534d55cbe0390521e73e5dcffdd1c4b34354b932172af2", size = 58457829, upload-time = "2025-06-29T20:24:01.945Z" },
98
+ { url = "https://files.pythonhosted.org/packages/ed/a4/d2ca331e16eef0974eb53702df603c54f77b2a7e2007523ecdbf6cf61162/nodejs_wheel_binaries-22.17.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5eed087855b644c87001fe04036213193963ccd65e7f89949e9dbe28e7743d9b", size = 59778054, upload-time = "2025-06-29T20:24:07.14Z" },
99
+ { url = "https://files.pythonhosted.org/packages/be/2b/04e0e7f7305fe2ba30fd4610bfb432516e0f65379fe6c2902f4b7b1ad436/nodejs_wheel_binaries-22.17.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:715f413c81500f0770ea8936ef1fc2529b900da8054cbf6da67cec3ee308dc76", size = 60830079, upload-time = "2025-06-29T20:24:12.21Z" },
100
+ { url = "https://files.pythonhosted.org/packages/ce/67/12070b24b88040c2d694883f3dcb067052f748798f4c63f7c865769a5747/nodejs_wheel_binaries-22.17.0-py2.py3-none-win_amd64.whl", hash = "sha256:51165630493c8dd4acfe1cae1684b76940c9b03f7f355597d55e2d056a572ddd", size = 40117877, upload-time = "2025-06-29T20:24:17.51Z" },
101
+ { url = "https://files.pythonhosted.org/packages/2e/ec/53ac46af423527c23e40c7343189f2bce08a8337efedef4d8a33392cee23/nodejs_wheel_binaries-22.17.0-py2.py3-none-win_arm64.whl", hash = "sha256:fae56d172227671fccb04461d3cd2b26a945c6c7c7fc29edb8618876a39d8b4a", size = 38865278, upload-time = "2025-06-29T20:24:21.065Z" },
102
+ ]
103
+
104
+ [[package]]
105
+ name = "packaging"
106
+ version = "25.0"
107
+ source = { registry = "https://pypi.org/simple" }
108
+ sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }
109
+ wheels = [
110
+ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },
111
+ ]
112
+
113
+ [[package]]
114
+ name = "parso"
115
+ version = "0.8.4"
116
+ source = { registry = "https://pypi.org/simple" }
117
+ sdist = { url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d", size = 400609, upload-time = "2024-04-05T09:43:55.897Z" }
118
+ wheels = [
119
+ { url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650, upload-time = "2024-04-05T09:43:53.299Z" },
120
+ ]
121
+
122
+ [[package]]
123
+ name = "pudb"
124
+ version = "2025.1"
125
+ source = { registry = "https://pypi.org/simple" }
126
+ dependencies = [
127
+ { name = "jedi" },
128
+ { name = "packaging" },
129
+ { name = "pygments" },
130
+ { name = "urwid" },
131
+ { name = "urwid-readline" },
132
+ ]
133
+ sdist = { url = "https://files.pythonhosted.org/packages/93/40/8d17b16a1c2a36d8cc1befb5eda13310ad20fcb347e58bef5e104696e14a/pudb-2025.1.tar.gz", hash = "sha256:a528b29c69ce8b182a337872c5f046071f6d68d3415c6d7bf53bd27c264f58d0", size = 220623, upload-time = "2025-05-06T20:43:18.306Z" }
134
+ wheels = [
135
+ { url = "https://files.pythonhosted.org/packages/b1/01/069766294390d3e10c77dfb553171466d67ffb51bf72a437650c0a5db86a/pudb-2025.1-py3-none-any.whl", hash = "sha256:f642d42e6054c992b43c463742650aa879fe290d7d7ffdeb21f7d00dc4587a21", size = 89208, upload-time = "2025-05-06T20:43:17.101Z" },
136
+ ]
137
+
138
+ [[package]]
139
+ name = "pygments"
140
+ version = "2.19.2"
141
+ source = { registry = "https://pypi.org/simple" }
142
+ sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" }
143
+ wheels = [
144
+ { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" },
145
+ ]
146
+
147
+ [[package]]
148
+ name = "rich"
149
+ version = "11.0.0"
150
+ source = { registry = "https://pypi.org/simple" }
151
+ dependencies = [
152
+ { name = "colorama" },
153
+ { name = "commonmark" },
154
+ { name = "pygments" },
155
+ ]
156
+ sdist = { url = "https://files.pythonhosted.org/packages/eb/be/bd5d6c37f5de55f31cb9432e0d926ceeab1b2ee774bd696557b53bc15012/rich-11.0.0.tar.gz", hash = "sha256:c32a8340b21c75931f157466fefe81ae10b92c36a5ea34524dff3767238774a4", size = 199133, upload-time = "2022-01-09T10:34:56.219Z" }
157
+ wheels = [
158
+ { url = "https://files.pythonhosted.org/packages/a0/46/05afc812a59890e92dc7bea6bda777e3c06f57be71a8bde2c2568bf682dc/rich-11.0.0-py3-none-any.whl", hash = "sha256:d7a8086aa1fa7e817e3bba544eee4fd82047ef59036313147759c11475f0dafd", size = 215821, upload-time = "2022-01-09T10:34:53.82Z" },
159
+ ]
160
+
161
+ [[package]]
162
+ name = "ruff"
163
+ version = "0.12.4"
164
+ source = { registry = "https://pypi.org/simple" }
165
+ sdist = { url = "https://files.pythonhosted.org/packages/9b/ce/8d7dbedede481245b489b769d27e2934730791a9a82765cb94566c6e6abd/ruff-0.12.4.tar.gz", hash = "sha256:13efa16df6c6eeb7d0f091abae50f58e9522f3843edb40d56ad52a5a4a4b6873", size = 5131435, upload-time = "2025-07-17T17:27:19.138Z" }
166
+ wheels = [
167
+ { url = "https://files.pythonhosted.org/packages/ae/9f/517bc5f61bad205b7f36684ffa5415c013862dee02f55f38a217bdbe7aa4/ruff-0.12.4-py3-none-linux_armv6l.whl", hash = "sha256:cb0d261dac457ab939aeb247e804125a5d521b21adf27e721895b0d3f83a0d0a", size = 10188824, upload-time = "2025-07-17T17:26:31.412Z" },
168
+ { url = "https://files.pythonhosted.org/packages/28/83/691baae5a11fbbde91df01c565c650fd17b0eabed259e8b7563de17c6529/ruff-0.12.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:55c0f4ca9769408d9b9bac530c30d3e66490bd2beb2d3dae3e4128a1f05c7442", size = 10884521, upload-time = "2025-07-17T17:26:35.084Z" },
169
+ { url = "https://files.pythonhosted.org/packages/d6/8d/756d780ff4076e6dd035d058fa220345f8c458391f7edfb1c10731eedc75/ruff-0.12.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a8224cc3722c9ad9044da7f89c4c1ec452aef2cfe3904365025dd2f51daeae0e", size = 10277653, upload-time = "2025-07-17T17:26:37.897Z" },
170
+ { url = "https://files.pythonhosted.org/packages/8d/97/8eeee0f48ece153206dce730fc9e0e0ca54fd7f261bb3d99c0a4343a1892/ruff-0.12.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9949d01d64fa3672449a51ddb5d7548b33e130240ad418884ee6efa7a229586", size = 10485993, upload-time = "2025-07-17T17:26:40.68Z" },
171
+ { url = "https://files.pythonhosted.org/packages/49/b8/22a43d23a1f68df9b88f952616c8508ea6ce4ed4f15353b8168c48b2d7e7/ruff-0.12.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:be0593c69df9ad1465e8a2d10e3defd111fdb62dcd5be23ae2c06da77e8fcffb", size = 10022824, upload-time = "2025-07-17T17:26:43.564Z" },
172
+ { url = "https://files.pythonhosted.org/packages/cd/70/37c234c220366993e8cffcbd6cadbf332bfc848cbd6f45b02bade17e0149/ruff-0.12.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7dea966bcb55d4ecc4cc3270bccb6f87a337326c9dcd3c07d5b97000dbff41c", size = 11524414, upload-time = "2025-07-17T17:26:46.219Z" },
173
+ { url = "https://files.pythonhosted.org/packages/14/77/c30f9964f481b5e0e29dd6a1fae1f769ac3fd468eb76fdd5661936edd262/ruff-0.12.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:afcfa3ab5ab5dd0e1c39bf286d829e042a15e966b3726eea79528e2e24d8371a", size = 12419216, upload-time = "2025-07-17T17:26:48.883Z" },
174
+ { url = "https://files.pythonhosted.org/packages/6e/79/af7fe0a4202dce4ef62c5e33fecbed07f0178f5b4dd9c0d2fcff5ab4a47c/ruff-0.12.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c057ce464b1413c926cdb203a0f858cd52f3e73dcb3270a3318d1630f6395bb3", size = 11976756, upload-time = "2025-07-17T17:26:51.754Z" },
175
+ { url = "https://files.pythonhosted.org/packages/09/d1/33fb1fc00e20a939c305dbe2f80df7c28ba9193f7a85470b982815a2dc6a/ruff-0.12.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e64b90d1122dc2713330350626b10d60818930819623abbb56535c6466cce045", size = 11020019, upload-time = "2025-07-17T17:26:54.265Z" },
176
+ { url = "https://files.pythonhosted.org/packages/64/f4/e3cd7f7bda646526f09693e2e02bd83d85fff8a8222c52cf9681c0d30843/ruff-0.12.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2abc48f3d9667fdc74022380b5c745873499ff827393a636f7a59da1515e7c57", size = 11277890, upload-time = "2025-07-17T17:26:56.914Z" },
177
+ { url = "https://files.pythonhosted.org/packages/5e/d0/69a85fb8b94501ff1a4f95b7591505e8983f38823da6941eb5b6badb1e3a/ruff-0.12.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2b2449dc0c138d877d629bea151bee8c0ae3b8e9c43f5fcaafcd0c0d0726b184", size = 10348539, upload-time = "2025-07-17T17:26:59.381Z" },
178
+ { url = "https://files.pythonhosted.org/packages/16/a0/91372d1cb1678f7d42d4893b88c252b01ff1dffcad09ae0c51aa2542275f/ruff-0.12.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:56e45bb11f625db55f9b70477062e6a1a04d53628eda7784dce6e0f55fd549eb", size = 10009579, upload-time = "2025-07-17T17:27:02.462Z" },
179
+ { url = "https://files.pythonhosted.org/packages/23/1b/c4a833e3114d2cc0f677e58f1df6c3b20f62328dbfa710b87a1636a5e8eb/ruff-0.12.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:478fccdb82ca148a98a9ff43658944f7ab5ec41c3c49d77cd99d44da019371a1", size = 10942982, upload-time = "2025-07-17T17:27:05.343Z" },
180
+ { url = "https://files.pythonhosted.org/packages/ff/ce/ce85e445cf0a5dd8842f2f0c6f0018eedb164a92bdf3eda51984ffd4d989/ruff-0.12.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0fc426bec2e4e5f4c4f182b9d2ce6a75c85ba9bcdbe5c6f2a74fcb8df437df4b", size = 11343331, upload-time = "2025-07-17T17:27:08.652Z" },
181
+ { url = "https://files.pythonhosted.org/packages/35/cf/441b7fc58368455233cfb5b77206c849b6dfb48b23de532adcc2e50ccc06/ruff-0.12.4-py3-none-win32.whl", hash = "sha256:4de27977827893cdfb1211d42d84bc180fceb7b72471104671c59be37041cf93", size = 10267904, upload-time = "2025-07-17T17:27:11.814Z" },
182
+ { url = "https://files.pythonhosted.org/packages/ce/7e/20af4a0df5e1299e7368d5ea4350412226afb03d95507faae94c80f00afd/ruff-0.12.4-py3-none-win_amd64.whl", hash = "sha256:fe0b9e9eb23736b453143d72d2ceca5db323963330d5b7859d60d101147d461a", size = 11209038, upload-time = "2025-07-17T17:27:14.417Z" },
183
+ { url = "https://files.pythonhosted.org/packages/11/02/8857d0dfb8f44ef299a5dfd898f673edefb71e3b533b3b9d2db4c832dd13/ruff-0.12.4-py3-none-win_arm64.whl", hash = "sha256:0618ec4442a83ab545e5b71202a5c0ed7791e8471435b94e655b570a5031a98e", size = 10469336, upload-time = "2025-07-17T17:27:16.913Z" },
184
+ ]
185
+
186
+ [[package]]
187
+ name = "shellingham"
188
+ version = "1.5.4"
189
+ source = { registry = "https://pypi.org/simple" }
190
+ sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" }
191
+ wheels = [
192
+ { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" },
193
+ ]
194
+
195
+ [[package]]
196
+ name = "typer"
197
+ version = "0.16.0"
198
+ source = { registry = "https://pypi.org/simple" }
199
+ dependencies = [
200
+ { name = "click" },
201
+ { name = "rich" },
202
+ { name = "shellingham" },
203
+ { name = "typing-extensions" },
204
+ ]
205
+ sdist = { url = "https://files.pythonhosted.org/packages/c5/8c/7d682431efca5fd290017663ea4588bf6f2c6aad085c7f108c5dbc316e70/typer-0.16.0.tar.gz", hash = "sha256:af377ffaee1dbe37ae9440cb4e8f11686ea5ce4e9bae01b84ae7c63b87f1dd3b", size = 102625, upload-time = "2025-05-26T14:30:31.824Z" }
206
+ wheels = [
207
+ { url = "https://files.pythonhosted.org/packages/76/42/3efaf858001d2c2913de7f354563e3a3a2f0decae3efe98427125a8f441e/typer-0.16.0-py3-none-any.whl", hash = "sha256:1f79bed11d4d02d4310e3c1b7ba594183bcedb0ac73b27a9e5f28f6fb5b98855", size = 46317, upload-time = "2025-05-26T14:30:30.523Z" },
208
+ ]
209
+
210
+ [[package]]
211
+ name = "typing-extensions"
212
+ version = "4.14.1"
213
+ source = { registry = "https://pypi.org/simple" }
214
+ sdist = { url = "https://files.pythonhosted.org/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36", size = 107673, upload-time = "2025-07-04T13:28:34.16Z" }
215
+ wheels = [
216
+ { url = "https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76", size = 43906, upload-time = "2025-07-04T13:28:32.743Z" },
217
+ ]
218
+
219
+ [[package]]
220
+ name = "urwid"
221
+ version = "3.0.2"
222
+ source = { registry = "https://pypi.org/simple" }
223
+ dependencies = [
224
+ { name = "wcwidth" },
225
+ ]
226
+ sdist = { url = "https://files.pythonhosted.org/packages/46/2d/71550379ed6b34968e14f73b0cf8574dee160acb6b820a066ab238ef2d4f/urwid-3.0.2.tar.gz", hash = "sha256:e7cb70ba1e7ff45779a5a57e43c57581ee7de6ceefb56c432491a4a6ce81eb78", size = 855353, upload-time = "2025-05-07T10:48:51.381Z" }
227
+ wheels = [
228
+ { url = "https://files.pythonhosted.org/packages/b5/ee/2956918f14fd6e4310f7200108b53917f4da713d74c7ccd0d91a2e3a4f18/urwid-3.0.2-py3-none-any.whl", hash = "sha256:94ec1448d0178c881c01845c2b478cdc89f7b71bb65349466dbc99da1965eaac", size = 295994, upload-time = "2025-05-07T10:48:49.173Z" },
229
+ ]
230
+
231
+ [[package]]
232
+ name = "urwid-readline"
233
+ version = "0.15.1"
234
+ source = { registry = "https://pypi.org/simple" }
235
+ dependencies = [
236
+ { name = "urwid" },
237
+ ]
238
+ sdist = { url = "https://files.pythonhosted.org/packages/ad/70/be318554495555eba7d8ff6e489f6f74ddb225b24086ba4af62a82e723fd/urwid_readline-0.15.1.tar.gz", hash = "sha256:9301444b86d58f7d26388506b704f142cefd193888488b4070d3a0fdfcfc0f84", size = 9007, upload-time = "2024-09-22T17:51:55.144Z" }
239
+
240
+ [[package]]
241
+ name = "wcwidth"
242
+ version = "0.2.13"
243
+ source = { registry = "https://pypi.org/simple" }
244
+ sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", size = 101301, upload-time = "2024-01-06T02:10:57.829Z" }
245
+ wheels = [
246
+ { url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166, upload-time = "2024-01-06T02:10:55.763Z" },
247
+ ]
@@ -1,76 +0,0 @@
1
- # debug-dojo
2
-
3
- **debug-dojo** is a Python package providing utilities for enhanced debugging and inspection in the terminal. 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 PuDB. All tools can be installed at once or individually, allowing for flexible debugging setups.
4
-
5
- ## Features
6
-
7
- - **Simple API:** Install all tools or only what you need.
8
- - **PuDB integration:** Quickly enable the PuDB TUI debugger.
9
- - **Rich tracebacks:** Get readable, colorized tracebacks for easier debugging.
10
- - **Side-by-side object inspection:** Visually compare Python objects, their attributes, and methods in the terminal.
11
-
12
- ## Installation
13
-
14
- ```sh
15
- pip install debug-dojo
16
- ```
17
-
18
- ## Usage
19
-
20
- ### Install all debugging tools
21
-
22
- In the `PuDB` style, you can install all debugging tools and enter the debugging mode with a single command:
23
-
24
- ```python
25
- import debug_dojo.all; b()
26
- ```
27
-
28
- Where`b()` is a builtin-injected function that sets a breakpoint using PuDB's `set_trace()`.
29
- In the PuDB interface, you can use the following functions:
30
-
31
- - `i(object_1)` to inspect an object.
32
- - `c(object_1, object_2)` to compare two objects side-by-side.
33
-
34
-
35
- ### Use individual tools
36
-
37
- ```python
38
- from debug_dojo import install_inspect, use_pudb, use_rich_traceback
39
-
40
- install_inspect() # Enable object inspection helpers
41
- use_pudb() # Set up PuDB as the debugger
42
- use_rich_traceback() # Enable Rich tracebacks
43
- ```
44
-
45
- ### Compare objects side-by-side
46
-
47
- ```python
48
- from debug_dojo.compareres import inspect_objects_side_by_side
49
-
50
- a = {"foo": 1, "bar": 2}
51
- b = [1, 2, 3]
52
- inspect_objects_side_by_side(a, b)
53
- ```
54
-
55
- ## Development
56
-
57
- ### Run tests
58
-
59
- ```sh
60
- pytest
61
- ```
62
-
63
- ### Lint and type check
64
-
65
- ```sh
66
- ruff check src/debug_dojo --fix
67
- basedpyright src/debug_dojo
68
- ```
69
-
70
- ## License
71
-
72
- MIT License
73
-
74
- ---
75
-
76
- *Debugging made delightful!*
@@ -1,25 +0,0 @@
1
- [project]
2
- name = "debug-dojo"
3
- version = "0.1.0"
4
- description = "Debbugging dojo for Python developers"
5
- readme = "README.md"
6
- authors = [
7
- { name = "bwrob", email = "bartosz.marcin.wroblewski@gmail.com" },
8
- ]
9
- requires-python = ">=3.10"
10
- dependencies = ["pudb>=2016.1", "rich>=11.0.0"]
11
-
12
- [project.scripts]
13
- debug-dojo = "debug_dojo:main"
14
-
15
- [build-system]
16
- requires = ["uv_build>=0.7.0,<0.9"]
17
- build-backend = "uv_build"
18
-
19
- [tool.basedpyright]
20
- typeCheckingMode = "all"
21
- pythonVersion = "3.10"
22
- strict = ["src/debug_dojo/*"]
23
-
24
- [dependency-groups]
25
- dev = ["basedpyright>=1.31.0", "ruff>=0.12.4"]
@@ -1,22 +0,0 @@
1
- """Install all debugging tools for the debug_dojo package."""
2
-
3
- from .installers import (
4
- install_breakpoint,
5
- install_compare,
6
- install_inspect,
7
- use_pudb,
8
- use_rich_traceback,
9
- )
10
-
11
-
12
- def install_all() -> None:
13
- """Install debugging tools."""
14
- use_pudb()
15
- use_rich_traceback()
16
-
17
- install_inspect()
18
- install_compare()
19
- install_breakpoint()
20
-
21
-
22
- install_all()