debug-dojo 0.9.0__tar.gz → 0.10.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.
Files changed (66) hide show
  1. debug_dojo-0.10.0/.coveragerc +41 -0
  2. debug_dojo-0.10.0/.zizmor.yml +3 -0
  3. {debug_dojo-0.9.0 → debug_dojo-0.10.0}/LICENSE +2 -2
  4. debug_dojo-0.10.0/PKG-INFO +149 -0
  5. debug_dojo-0.10.0/README.md +121 -0
  6. debug_dojo-0.10.0/poe_tasks.toml +416 -0
  7. debug_dojo-0.10.0/pyproject.toml +108 -0
  8. debug_dojo-0.10.0/pyproject.toml.orig +98 -0
  9. debug_dojo-0.10.0/pytest.ini +23 -0
  10. debug_dojo-0.10.0/ruff.toml +77 -0
  11. debug_dojo-0.10.0/src/debug_dojo/.agents/skills/debug-dojo/SKILL.md +39 -0
  12. debug_dojo-0.10.0/src/debug_dojo/__init__.py +34 -0
  13. {debug_dojo-0.9.0 → debug_dojo-0.10.0}/src/debug_dojo/__main__.py +3 -1
  14. debug_dojo-0.10.0/src/debug_dojo/_core/__init__.py +3 -0
  15. debug_dojo-0.9.0/src/debug_dojo/_compare.py → debug_dojo-0.10.0/src/debug_dojo/_core/compare.py +20 -9
  16. debug_dojo-0.10.0/src/debug_dojo/_core/debugger/__init__.py +49 -0
  17. debug_dojo-0.10.0/src/debug_dojo/_core/debugger/breakpoints.py +123 -0
  18. debug_dojo-0.10.0/src/debug_dojo/_core/debugger/debugger.py +719 -0
  19. debug_dojo-0.10.0/src/debug_dojo/_core/debugger/session.py +182 -0
  20. debug_dojo-0.10.0/src/debug_dojo/_core/debugger/views.py +797 -0
  21. debug_dojo-0.10.0/src/debug_dojo/_core/execution.py +335 -0
  22. debug_dojo-0.10.0/src/debug_dojo/_core/installers.py +36 -0
  23. debug_dojo-0.10.0/src/debug_dojo/cli.py +409 -0
  24. debug_dojo-0.10.0/src/debug_dojo/install.py +7 -0
  25. debug_dojo-0.10.0/tach.toml +43 -0
  26. debug_dojo-0.10.0/tests/__init__.py +1 -0
  27. debug_dojo-0.10.0/tests/assets/main_breakpoint.py +18 -0
  28. debug_dojo-0.10.0/tests/assets/main_exception.py +18 -0
  29. debug_dojo-0.10.0/tests/assets/main_inspect.py +18 -0
  30. debug_dojo-0.10.0/tests/cli/__init__.py +1 -0
  31. debug_dojo-0.10.0/tests/cli/__snapshots__/test_cli.ambr +18 -0
  32. debug_dojo-0.10.0/tests/cli/test_cli.py +153 -0
  33. debug_dojo-0.10.0/tests/cli/test_cli_functionalities.py +37 -0
  34. debug_dojo-0.10.0/tests/cli/test_cli_run_targets.py +34 -0
  35. debug_dojo-0.10.0/tests/conftest.py +66 -0
  36. debug_dojo-0.10.0/tests/debugger/__init__.py +1 -0
  37. debug_dojo-0.10.0/tests/debugger/test_breakpoints.py +149 -0
  38. debug_dojo-0.10.0/tests/debugger/test_debugger.py +580 -0
  39. debug_dojo-0.10.0/tests/debugger/test_session.py +223 -0
  40. debug_dojo-0.10.0/tests/debugger/test_views.py +344 -0
  41. {debug_dojo-0.9.0 → debug_dojo-0.10.0}/tests/test_compare.py +40 -1
  42. debug_dojo-0.10.0/tests/test_execution.py +297 -0
  43. debug_dojo-0.10.0/tests/test_installers.py +37 -0
  44. debug_dojo-0.9.0/PKG-INFO +0 -145
  45. debug_dojo-0.9.0/README.md +0 -112
  46. debug_dojo-0.9.0/pyproject.toml +0 -88
  47. debug_dojo-0.9.0/setup.cfg +0 -4
  48. debug_dojo-0.9.0/src/debug_dojo/__init__.py +0 -23
  49. debug_dojo-0.9.0/src/debug_dojo/_cli.py +0 -147
  50. debug_dojo-0.9.0/src/debug_dojo/_config.py +0 -234
  51. debug_dojo-0.9.0/src/debug_dojo/_config_models.py +0 -182
  52. debug_dojo-0.9.0/src/debug_dojo/_execution.py +0 -177
  53. debug_dojo-0.9.0/src/debug_dojo/_gamification.py +0 -245
  54. debug_dojo-0.9.0/src/debug_dojo/_installers.py +0 -288
  55. debug_dojo-0.9.0/src/debug_dojo/install.py +0 -7
  56. debug_dojo-0.9.0/src/debug_dojo.egg-info/PKG-INFO +0 -145
  57. debug_dojo-0.9.0/src/debug_dojo.egg-info/SOURCES.txt +0 -25
  58. debug_dojo-0.9.0/src/debug_dojo.egg-info/dependency_links.txt +0 -1
  59. debug_dojo-0.9.0/src/debug_dojo.egg-info/entry_points.txt +0 -2
  60. debug_dojo-0.9.0/src/debug_dojo.egg-info/requires.txt +0 -9
  61. debug_dojo-0.9.0/src/debug_dojo.egg-info/top_level.txt +0 -1
  62. debug_dojo-0.9.0/tests/test_config.py +0 -86
  63. debug_dojo-0.9.0/tests/test_gamification.py +0 -146
  64. debug_dojo-0.9.0/tests/test_gamification_config.py +0 -64
  65. debug_dojo-0.9.0/tests/test_installers.py +0 -161
  66. {debug_dojo-0.9.0 → debug_dojo-0.10.0}/src/debug_dojo/py.typed +0 -0
@@ -0,0 +1,41 @@
1
+ [run]
2
+ branch = true
3
+ # core = sysmon
4
+ patch =
5
+ subprocess
6
+ _exit
7
+ source =
8
+ src/debug_dojo
9
+ tests
10
+ omit =
11
+ */__snapshots__/*
12
+ */site-packages/*
13
+ */tests/assets/*
14
+
15
+ [report]
16
+ show_missing = true
17
+ skip_covered = false
18
+ skip_empty = true
19
+ fail_under = 100
20
+ exclude_also =
21
+ pragma: no cover
22
+ def __repr__
23
+ if self\.debug:
24
+ raise AssertionError
25
+ raise NotImplementedError
26
+ return NotImplemented\b
27
+ if 0:
28
+ if __name__ == .__main__.:
29
+ if TYPE_CHECKING:
30
+ class .*\bProtocol\):
31
+ @(abc\.)?abstractmethod
32
+ @overload
33
+ @(typing\.)?overload
34
+ (typing\.)?assert_never
35
+ \.\.\.
36
+
37
+ [html]
38
+ directory = htmlcov
39
+
40
+ [xml]
41
+ output = coverage.xml
@@ -0,0 +1,3 @@
1
+ rules:
2
+ unpinned-uses:
3
+ disable: true
@@ -1,6 +1,6 @@
1
- # The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2025 to bwrob.
3
+ Copyright (c) 2026 bwrob
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,149 @@
1
+ Metadata-Version: 2.4
2
+ Name: debug-dojo
3
+ Version: 0.10.0
4
+ Summary: 🏣 debug dojo, a place for zen debugging
5
+ Author: bwrob
6
+ Author-email: bwrob <bartosz.marcin.wroblewski@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
+ Classifier: Topic :: Software Development :: Debuggers
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Typing :: Typed
20
+ Requires-Dist: ipython>=9.0.0
21
+ Requires-Dist: rich>=15.0.0
22
+ Requires-Python: >=3.12
23
+ Project-URL: Documentation, https://bwrob.github.io/debug-dojo/
24
+ Project-URL: Homepage, https://github.com/bwrob/debug-dojo
25
+ Project-URL: Issues, https://github.com/bwrob/debug-dojo/issues
26
+ Project-URL: Repository, https://github.com/bwrob/debug-dojo.git
27
+ Description-Content-Type: text/markdown
28
+
29
+ #
30
+
31
+ <p align="center">
32
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/docs/logo/banner.png?raw=true" alt="debug dojo" style="width:100%;"/>
33
+ </p>
34
+
35
+ <p align="center">
36
+ <em>🏣 debug dojo, a place for zen debugging</em>
37
+ </p>
38
+
39
+ <p align="center">
40
+ <a href="https://pypi.org/project/debug-dojo">
41
+ <img src="https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square" alt="PyPi Version">
42
+ </a>
43
+ <a href="https://pypi.org/pypi/debug-dojo/">
44
+ <img src="https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square" alt="PyPI pyversions">
45
+ </a>
46
+ <a href="https://pepy.tech/project/debug-dojo">
47
+ <img src="https://static.pepy.tech/badge/debug-dojo/month" alt="downloads">
48
+ </a>
49
+ <a href="https://github.com/bwrob/debug-dojo/blob/main/LICENSE">
50
+ <img src="https://img.shields.io/github/license/bwrob/debug-dojo.svg" alt="license">
51
+ </a>
52
+ <a href="https://results.pre-commit.ci/latest/github/bwrob/debug-dojo/main">
53
+ <img src="https://results.pre-commit.ci/badge/github/bwrob/debug-dojo/main.svg" alt="pre-commit.ci status">
54
+ </a>
55
+ </p>
56
+
57
+ [**debug-dojo**](https://bwrob.github.io/debug-dojo/) is a standalone,
58
+ zero-configuration Python debugger and runner built around `dpdb`—an IPython-powered
59
+ interactive debugger with [`rich`](https://github.com/Textualize/rich) terminal panels,
60
+ inline variable diffs, and built-in object inspection.
61
+
62
+ ## ✨ Features
63
+
64
+ - **Zero-Install & Zero-Config:** Run any script directly with
65
+ `uvx debug-dojo script.py`. Automatically discovers your project's `.venv` and leaves
66
+ no configuration, cache, or history files behind.
67
+ - **Opinionated `dpdb` Debugger:** Combines IPython tab completion and syntax
68
+ highlighting with Rich tables (`w`, `a`, `b`, `display`, `h`), panels (`whatis`,
69
+ `psource`, `pinfo`), adaptive source context, and an inline frame context banner
70
+ (`Δ Changed`, `↳ Line`, `↩ Return`, `👁 Watch`).
71
+ - **Automatic Post-Mortem:** Unhandled exceptions render a Rich traceback and drop
72
+ directly into a `dpdb` post-mortem session at the failing frame.
73
+ - **Built-in Inspection Shortcuts:** Injects `b()` (breakpoint), `p(obj)` (Rich print),
74
+ `i(obj)` (Rich inspect), and `c(obj1, obj2)` (side-by-side comparison) into
75
+ `builtins`.
76
+
77
+ ## 🚀 Quick Start
78
+
79
+ Run any Python script directly with `uvx`:
80
+
81
+ ```bash
82
+ uvx debug-dojo my_script.py
83
+ ```
84
+
85
+ Or install `debug-dojo` into an environment with `uv`:
86
+
87
+ ```bash
88
+ uv pip install debug-dojo
89
+ ```
90
+
91
+ ## 💻 CLI Usage
92
+
93
+ Run a Python script, executable command, or module directly with `debug-dojo` (or the
94
+ `dojo` alias), optionally seeding breakpoints from the command line without editing the
95
+ file:
96
+
97
+ ```console
98
+ debug-dojo my_script.py arg1 arg2
99
+ debug-dojo -b 42 -b process_data my_script.py
100
+ debug-dojo pytest -k test_feature
101
+ debug-dojo my_package.my_module
102
+ ```
103
+
104
+ ## 🐍 Usage in Code
105
+
106
+ Import `debug_dojo.install` in your Python code to configure `dpdb` and inject helpers
107
+ (`b`, `p`, `i`, `c`) into `builtins`:
108
+
109
+ ```python
110
+ import debug_dojo.install
111
+
112
+ object_1 = {"foo": 1, "bar": 2}
113
+ object_2 = [1, 2, 3]
114
+
115
+ # Pretty print an object with Rich
116
+ p(object_1)
117
+
118
+ # Inspect an object using Rich
119
+ i(object_1)
120
+
121
+ # Compare two objects side-by-side
122
+ c(object_1, object_2)
123
+
124
+ # Enter the dpdb debugger
125
+ # b()
126
+ ```
127
+
128
+ Or use the standard `pdb` / `ipdb`-compatible top-level functions and
129
+ `PYTHONBREAKPOINT` hook directly:
130
+
131
+ ```python
132
+ import debug_dojo
133
+
134
+ debug_dojo.set_trace()
135
+ # debug_dojo.post_mortem()
136
+ # debug_dojo.pm()
137
+ ```
138
+
139
+ ## 📚 Documentation
140
+
141
+ For CLI flags, `dpdb` interactive commands, and API reference, visit the
142
+ [official documentation](https://bwrob.github.io/debug-dojo/).
143
+
144
+ ## 🤝 Contributing
145
+
146
+ Contributions are welcome! Refer to the
147
+ [development guidelines](https://bwrob.github.io/debug-dojo/getting-started/#development-workflow)
148
+ for instructions on setting up the development environment and running verification
149
+ checks.
@@ -0,0 +1,121 @@
1
+ #
2
+
3
+ <p align="center">
4
+ <img src="https://github.com/bwrob/debug-dojo/blob/main/docs/logo/banner.png?raw=true" alt="debug dojo" style="width:100%;"/>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <em>🏣 debug dojo, a place for zen debugging</em>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://pypi.org/project/debug-dojo">
13
+ <img src="https://img.shields.io/pypi/v/debug-dojo.svg?style=flat-square" alt="PyPi Version">
14
+ </a>
15
+ <a href="https://pypi.org/pypi/debug-dojo/">
16
+ <img src="https://img.shields.io/pypi/pyversions/debug-dojo.svg?style=flat-square" alt="PyPI pyversions">
17
+ </a>
18
+ <a href="https://pepy.tech/project/debug-dojo">
19
+ <img src="https://static.pepy.tech/badge/debug-dojo/month" alt="downloads">
20
+ </a>
21
+ <a href="https://github.com/bwrob/debug-dojo/blob/main/LICENSE">
22
+ <img src="https://img.shields.io/github/license/bwrob/debug-dojo.svg" alt="license">
23
+ </a>
24
+ <a href="https://results.pre-commit.ci/latest/github/bwrob/debug-dojo/main">
25
+ <img src="https://results.pre-commit.ci/badge/github/bwrob/debug-dojo/main.svg" alt="pre-commit.ci status">
26
+ </a>
27
+ </p>
28
+
29
+ [**debug-dojo**](https://bwrob.github.io/debug-dojo/) is a standalone,
30
+ zero-configuration Python debugger and runner built around `dpdb`—an IPython-powered
31
+ interactive debugger with [`rich`](https://github.com/Textualize/rich) terminal panels,
32
+ inline variable diffs, and built-in object inspection.
33
+
34
+ ## ✨ Features
35
+
36
+ - **Zero-Install & Zero-Config:** Run any script directly with
37
+ `uvx debug-dojo script.py`. Automatically discovers your project's `.venv` and leaves
38
+ no configuration, cache, or history files behind.
39
+ - **Opinionated `dpdb` Debugger:** Combines IPython tab completion and syntax
40
+ highlighting with Rich tables (`w`, `a`, `b`, `display`, `h`), panels (`whatis`,
41
+ `psource`, `pinfo`), adaptive source context, and an inline frame context banner
42
+ (`Δ Changed`, `↳ Line`, `↩ Return`, `👁 Watch`).
43
+ - **Automatic Post-Mortem:** Unhandled exceptions render a Rich traceback and drop
44
+ directly into a `dpdb` post-mortem session at the failing frame.
45
+ - **Built-in Inspection Shortcuts:** Injects `b()` (breakpoint), `p(obj)` (Rich print),
46
+ `i(obj)` (Rich inspect), and `c(obj1, obj2)` (side-by-side comparison) into
47
+ `builtins`.
48
+
49
+ ## 🚀 Quick Start
50
+
51
+ Run any Python script directly with `uvx`:
52
+
53
+ ```bash
54
+ uvx debug-dojo my_script.py
55
+ ```
56
+
57
+ Or install `debug-dojo` into an environment with `uv`:
58
+
59
+ ```bash
60
+ uv pip install debug-dojo
61
+ ```
62
+
63
+ ## 💻 CLI Usage
64
+
65
+ Run a Python script, executable command, or module directly with `debug-dojo` (or the
66
+ `dojo` alias), optionally seeding breakpoints from the command line without editing the
67
+ file:
68
+
69
+ ```console
70
+ debug-dojo my_script.py arg1 arg2
71
+ debug-dojo -b 42 -b process_data my_script.py
72
+ debug-dojo pytest -k test_feature
73
+ debug-dojo my_package.my_module
74
+ ```
75
+
76
+ ## 🐍 Usage in Code
77
+
78
+ Import `debug_dojo.install` in your Python code to configure `dpdb` and inject helpers
79
+ (`b`, `p`, `i`, `c`) into `builtins`:
80
+
81
+ ```python
82
+ import debug_dojo.install
83
+
84
+ object_1 = {"foo": 1, "bar": 2}
85
+ object_2 = [1, 2, 3]
86
+
87
+ # Pretty print an object with Rich
88
+ p(object_1)
89
+
90
+ # Inspect an object using Rich
91
+ i(object_1)
92
+
93
+ # Compare two objects side-by-side
94
+ c(object_1, object_2)
95
+
96
+ # Enter the dpdb debugger
97
+ # b()
98
+ ```
99
+
100
+ Or use the standard `pdb` / `ipdb`-compatible top-level functions and
101
+ `PYTHONBREAKPOINT` hook directly:
102
+
103
+ ```python
104
+ import debug_dojo
105
+
106
+ debug_dojo.set_trace()
107
+ # debug_dojo.post_mortem()
108
+ # debug_dojo.pm()
109
+ ```
110
+
111
+ ## 📚 Documentation
112
+
113
+ For CLI flags, `dpdb` interactive commands, and API reference, visit the
114
+ [official documentation](https://bwrob.github.io/debug-dojo/).
115
+
116
+ ## 🤝 Contributing
117
+
118
+ Contributions are welcome! Refer to the
119
+ [development guidelines](https://bwrob.github.io/debug-dojo/getting-started/#development-workflow)
120
+ for instructions on setting up the development environment and running verification
121
+ checks.