dev-shell 0.10.1__tar.gz → 0.11.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 (41) hide show
  1. {dev_shell-0.10.1 → dev_shell-0.11.0}/.gitignore +10 -7
  2. dev_shell-0.11.0/.pre-commit-config.yaml +7 -0
  3. dev_shell-0.11.0/.pre-commit-hooks.yaml +13 -0
  4. dev_shell-0.11.0/PKG-INFO +231 -0
  5. dev_shell-0.11.0/README.md +214 -0
  6. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/__init__.py +1 -1
  7. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/base_cmd2_app.py +1 -1
  8. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/bootstrap-source.py +10 -1
  9. dev_shell-0.11.0/dev_shell/command_sets/__init__.py +43 -0
  10. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/command_sets/dev_shell_commands.py +4 -1
  11. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/dev_shell_app.py +8 -8
  12. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/__init__.py +2 -2
  13. dev_shell-0.11.0/dev_shell/tests/test_readme.py +47 -0
  14. dev_shell-0.11.0/dev_shell/tests/test_readme_history.py +9 -0
  15. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/utils/colorful.py +20 -14
  16. {dev_shell-0.10.1 → dev_shell-0.11.0}/devshell.py +10 -1
  17. {dev_shell-0.10.1 → dev_shell-0.11.0}/noxfile.py +1 -0
  18. {dev_shell-0.10.1 → dev_shell-0.11.0}/pyproject.toml +4 -1
  19. dev_shell-0.10.1/PKG-INFO +0 -154
  20. dev_shell-0.10.1/README.md +0 -137
  21. dev_shell-0.10.1/dev_shell/command_sets/__init__.py +0 -10
  22. dev_shell-0.10.1/uv.lock +0 -1578
  23. {dev_shell-0.10.1 → dev_shell-0.11.0}/.editorconfig +0 -0
  24. {dev_shell-0.10.1 → dev_shell-0.11.0}/.github/workflows/tests.yml +0 -0
  25. {dev_shell-0.10.1 → dev_shell-0.11.0}/.idea/.gitignore +0 -0
  26. {dev_shell-0.10.1 → dev_shell-0.11.0}/.run/Template Python tests.run.xml +0 -0
  27. {dev_shell-0.10.1 → dev_shell-0.11.0}/.run/Unittests __all__.run.xml +0 -0
  28. {dev_shell-0.10.1 → dev_shell-0.11.0}/LICENSE +0 -0
  29. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/__main__.py +0 -0
  30. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/config.py +0 -0
  31. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/constants.py +0 -0
  32. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/constants.py +0 -0
  33. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/fixtures.py +0 -0
  34. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/test_bootstrap.py +0 -0
  35. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/test_dev_shell_app.py +0 -0
  36. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/test_doctests.py +0 -0
  37. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/test_project_setup.py +0 -0
  38. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/tests/test_source_file.py +0 -0
  39. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/utils/__init__.py +0 -0
  40. {dev_shell-0.10.1 → dev_shell-0.11.0}/dev_shell/utils/subprocess_utils.py +0 -0
  41. {dev_shell-0.10.1 → dev_shell-0.11.0}/dist/.gitignore +0 -0
@@ -1,11 +1,4 @@
1
1
  .*
2
- *.egg-info
3
- __pycache__
4
- /dist/
5
- /build/
6
- /coverage.*
7
- *.orig
8
-
9
2
  !.github
10
3
  !.run
11
4
  !.editorconfig
@@ -13,3 +6,13 @@ __pycache__
13
6
  !.pre-commit-config.yaml
14
7
  !.pre-commit-hooks.yaml
15
8
  !.gitkeep
9
+
10
+ *.egg-info
11
+ __pycache__
12
+ /dist/
13
+ /build/
14
+ /coverage.*
15
+ *.orig
16
+
17
+ # This is a library, not an application — consumers manage their own lock file
18
+ uv.lock
@@ -0,0 +1,7 @@
1
+ # pre-commit plugin configuration
2
+ # See https://pre-commit.com for more information
3
+ repos:
4
+ - repo: https://github.com/jedie/cli-base-utilities
5
+ rev: v0.30.0
6
+ hooks:
7
+ - id: update-readme-history
@@ -0,0 +1,13 @@
1
+ # https://pre-commit.com/#creating-new-hooks
2
+ - id: update-readme-history
3
+ name: cli-base-utilities
4
+ description: >-
5
+ Update history in README.md from git log.
6
+ entry: "python -m cli_base update-readme-history -v"
7
+ language: python
8
+ language_version: python3
9
+ require_serial: true
10
+ pass_filenames: false
11
+ always_run: true
12
+ verbose: true
13
+ stages: [pre-commit, post-rewrite, pre-push]
@@ -0,0 +1,231 @@
1
+ Metadata-Version: 2.4
2
+ Name: dev-shell
3
+ Version: 0.11.0
4
+ Summary: Developer shell for easy startup...
5
+ Project-URL: Documentation, https://github.com/jedie/dev-shell
6
+ Project-URL: Source, https://github.com/jedie/dev-shell
7
+ Author-email: Jens Diemer <dev-shell@jensdiemer.de>
8
+ License: GPL-3.0-or-later
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.12
11
+ Requires-Dist: cli-base-utilities>=0.28.0
12
+ Requires-Dist: cmd2
13
+ Requires-Dist: gnureadline; sys_platform != 'win32'
14
+ Requires-Dist: pyreadline3; sys_platform == 'win32'
15
+ Requires-Dist: rich
16
+ Description-Content-Type: text/markdown
17
+
18
+ # A "dev-shell" for Python projects ;)
19
+
20
+ **Note: The continuation of this project is uncertain!**
21
+
22
+ [![tests](https://github.com/jedie/dev-shell/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/dev-shell/actions/workflows/tests.yml)
23
+ [![codecov](https://codecov.io/github/jedie/dev_shell/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/dev_shell)
24
+ [![dev_shell @ PyPi](https://img.shields.io/pypi/v/dev_shell?label=dev_shell%20%40%20PyPi)](https://pypi.org/project/dev_shell/)
25
+ [![Python Versions](https://img.shields.io/pypi/pyversions/dev_shell)](https://github.com/jedie/dev-shell/blob/main/pyproject.toml)
26
+ [![License GPL-3.0-or-later](https://img.shields.io/pypi/l/dev_shell)](https://github.com/jedie/dev-shell/blob/main/LICENSE)
27
+
28
+
29
+ This small project is intended to improve the start-up for collaborators.
30
+
31
+ The idea is to make the project setup as simple as possible. Just clone the sources and start a script and you're done ;)
32
+
33
+ Why in hell not just a `Makefile`? Because it doesn't out-of-the-box under Windows and MacOS, the dev-shell does ;)
34
+
35
+ Run Tests? Just start the script and call the "run test command".
36
+
37
+ The "dev-shell" is the base to create a CLI and a shell. It also shows how to make a project bootstrap as simply as possible, e.g.:
38
+
39
+
40
+ At least `uv` is needed. Install e.g.: via pipx:
41
+ ```bash
42
+ apt-get install pipx
43
+ pipx install uv
44
+ ```
45
+
46
+ Clone the project and just start the CLI help commands.
47
+ A virtual environment will be created/updated automatically.
48
+
49
+ ```bash
50
+ ~$ git clone https://github.com/jedie/dev-shell.git
51
+ ~$ cd dev-shell
52
+ ~/dev-shell$ devshell.py --help
53
+ ~/dev-shell$ devshell.py test
54
+ ```
55
+
56
+ The output looks like:
57
+
58
+ [comment]: <> (✂✂✂ auto generated main help start ✂✂✂)
59
+ ```
60
+ Cmd2 Commands
61
+ ─────────────
62
+ alias help history macro quit set shortcuts
63
+
64
+ dev-shell commands
65
+ ──────────────────
66
+ coverage install publish test version
67
+ fix_code_style list_venv_packages pyupgrade update
68
+ ```
69
+ [comment]: <> (✂✂✂ auto generated main help end ✂✂✂)
70
+
71
+
72
+
73
+
74
+ ## compatibility
75
+
76
+ | dev-shell version | OS | Python version |
77
+ |-------------------|-------------------------|---------------------|
78
+ | >=v0.10.0 | Linux + MacOS + Windows | 3.14, 3.13, 3.12 |
79
+ | >=v0.7.0 | Linux + MacOS + Windows | 3.11, 3.10, 3.9 |
80
+ | >=v0.5.0 | Linux + MacOS + Windows | 3.10, 3.9, 3.8, 3.7 |
81
+ | >=v0.0.1 | Linux + MacOS + Windows | 3.9, 3.8, 3.7 |
82
+
83
+ See also:
84
+ * github test configuration: [.github/workflows/test.yml](https://github.com/jedie/dev-shell/blob/main/.github/workflows/test.yml)
85
+ * Nox configuration: [noxfile.py](https://github.com/jedie/dev-shell/blob/main/noxfile.py)
86
+
87
+ ## History
88
+
89
+ [comment]: <> (✂✂✂ auto generated history start ✂✂✂)
90
+
91
+ * [v0.11.0](https://github.com/jedie/dev-shell/compare/v0.10.2...v0.11.0)
92
+ * 2026-06-11 - Remove uv.lock from this repo: It's a library not a project
93
+ * 2026-06-11 - nox: reuse venv
94
+ * 2026-06-11 - NEW: CategorizedCommandSet replacement for @cmd2.with_default_category()
95
+ * 2026-06-11 - fix linting
96
+ * 2026-06-11 - Update requirements
97
+ * 2026-05-29 - Bump uv from 0.11.6 to 0.11.15
98
+ * 2026-04-10 - Bump uv from 0.10.4 to 0.11.6
99
+ * 2026-04-08 - Bump cryptography from 46.0.6 to 46.0.7
100
+ * 2026-03-30 - Bump pygments from 2.19.2 to 2.20.0
101
+ * 2026-03-29 - Bump cryptography from 46.0.5 to 46.0.6
102
+ * [v0.10.2](https://github.com/jedie/dev-shell/compare/v0.10.1...v0.10.2)
103
+ * 2026-02-19 - apply manageprojects updates
104
+ * 2026-02-19 - Bugfix colorful helpers if a Path instance should be printed.
105
+ * [v0.10.1](https://github.com/jedie/dev-shell/compare/v0.10.0...v0.10.1)
106
+ * 2026-02-10 - Bugfix text color styles
107
+ * [v0.10.0](https://github.com/jedie/dev-shell/compare/v0.9.1...v0.10.0)
108
+ * 2026-02-10 - Cleanup
109
+ * 2026-02-09 - Update project
110
+
111
+ <details><summary>Expand older history entries ...</summary>
112
+
113
+ * [v0.9.1](https://github.com/jedie/dev-shell/compare/v0.9.0...v0.9.1)
114
+ * 2025-03-11 - Fix usage as package in external projects
115
+ * [v0.9.0](https://github.com/jedie/dev-shell/compare/v0.8.0...v0.9.0)
116
+ * 2025-03-11 - fix publish
117
+ * 2025-03-11 - Replace `poetry` with `uv`
118
+ * [v0.8.0](https://github.com/jedie/dev-shell/compare/v0.7.0...v0.8.0)
119
+ * 2024-04-09 - Bump version to v0.8.0
120
+ * 2024-04-09 - Remove "gnureadline" as dependency and update boot script
121
+ * 2024-04-09 - Remove "gnureadline" as dependency
122
+ * 2023-07-09 - Update requirements
123
+ * [v0.7.0](https://github.com/jedie/dev-shell/compare/v0.6.1...v0.7.0)
124
+ * 2023-04-25 - Bugfix RedirectStdOutErr
125
+ * 2023-04-25 - Update test matrix
126
+ * 2023-04-25 - Update requirements
127
+ * 2022-09-19 - skip linting (we use darker)
128
+ * 2022-09-19 - CI: cache packages
129
+ * [v0.6.1](https://github.com/jedie/dev-shell/compare/v0.6.0...v0.6.1)
130
+ * 2022-09-02 - Update README.md
131
+ * 2022-09-02 - v0.6.1 - update tests adn README
132
+ * 2022-09-02 - remove "pytest-flake8" and "pytest-isort"
133
+ * 2022-09-02 - update requirements
134
+ * 2022-09-02 - Call "poetry update" with "-v"
135
+ * 2022-09-02 - skip Poetry v1.2.0
136
+ * 2022-09-02 - Set default timeout to 5Min.
137
+ * [v0.6.0](https://github.com/jedie/dev-shell/compare/v0.5.0...v0.6.0)
138
+ * 2022-07-19 - updates
139
+ * 2022-07-19 - dd "pyupgrade" as shell command
140
+ * 2022-07-19 - Update README.md
141
+ * 2022-07-19 - Update requirements
142
+ * [v0.5.0](https://github.com/jedie/dev-shell/compare/v0.4.0...v0.5.0)
143
+ * 2022-05-29 - update flake8 config
144
+ * 2022-05-29 - simplify isort config
145
+ * 2022-05-29 - fix isort checks
146
+ * 2022-05-29 - v0.5.0.rc1
147
+ * 2022-05-29 - update tox settings
148
+ * 2022-05-29 - line_length = 100
149
+ * 2022-05-29 - call github tests via tox
150
+ * 2022-05-29 - Add "tox" and "poetry" commands
151
+ * 2022-05-29 - Test also with Python 3.10
152
+ * 2022-05-29 - Update requirements
153
+ * [v0.4.0](https://github.com/jedie/dev-shell/compare/v0.3.0...v0.4.0)
154
+ * 2022-02-28 - Release v0.4.0
155
+ * 2022-02-28 - Update requirements
156
+ * [v0.3.0](https://github.com/jedie/dev-shell/compare/v0.2.4...v0.3.0)
157
+ * 2022-01-30 - Remove "flynt" form linting/fix code style
158
+ * [v0.2.4](https://github.com/jedie/dev-shell/compare/v0.2.3...v0.2.4)
159
+ * 2022-01-22 - Switch to darker and use pytest-darker
160
+ * 2022-01-22 - update requirements
161
+ * [v0.2.3](https://github.com/jedie/dev-shell/compare/v0.2.2...v0.2.3)
162
+ * 2021-11-15 - Fix #29 - Flynt args can be change via CommandSet
163
+ * 2021-11-15 - update requirements
164
+ * 2021-11-15 - Update test.yml
165
+ * [v0.2.2](https://github.com/jedie/dev-shell/compare/v0.2.1...v0.2.2)
166
+ * 2021-04-12 - include source "bootstrap" file
167
+ * [v0.2.1](https://github.com/jedie/dev-shell/compare/v0.2.0...v0.2.1)
168
+ * 2021-04-12 - Handle if "poetry-publish" is not installed
169
+ * [v0.2.0](https://github.com/jedie/dev-shell/compare/v0.1.0...v0.2.0)
170
+ * 2021-04-11 - Fix flake8 call: Remove arguments and add .flake8 config file
171
+ * 2021-04-11 - Update dependencies + add "update" command
172
+ * 2021-04-11 - Release 0.2.0rc1
173
+ * 2021-04-11 - Fix #24 test under windows
174
+ * 2021-04-10 - The DocTest will not work on Windows. Replace it with a normal test ;)
175
+ * 2021-04-10 - Bugfix error on Windows: File "C:\Users\sysop\PycharmProjects\dev-shell\dev_shell\utils\subprocess_utils.py", line 125, in prepare_popenargs command = shutil.which(command_path, path=bin_path) File "C:\Users\sysop\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 1441, in which if any(cmd.lower().endswith(ext.lower()) for ext in pathext): File "C:\Users\sysop\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 1441, in <genexpr> if any(cmd.lower().endswith(ext.lower()) for ext in pathext): AttributeError: 'WindowsPath' object has no attribute 'lower' EXCEPTION of type 'AttributeError' occurred with message: ''WindowsPath' object has no attribute 'lower''
176
+ * 2021-04-10 - Replace "SubprocessMock" with a simple function
177
+ * 2021-04-10 - Bugfix calls outside the project directory...
178
+ * 2021-04-10 - Do linting via tests
179
+ * 2021-04-10 - Update also "setuptools", too.
180
+ * 2021-04-05 - fix tests
181
+ * 2021-04-05 - code style
182
+ * 2021-04-05 - recognize "--update" and "--help" calls better
183
+ * 2021-04-05 - remove "max-parallel"
184
+ * 2021-03-26 - Rename: "dev-shell.py => devshell.py" and add tests for it
185
+ * 2021-03-26 - Auto update .venv if poetry.lock changed
186
+ * 2021-03-22 - Update README.md
187
+ * 2021-03-22 - Remove "path" argument from flynt and autopep8
188
+ * [v0.1.0](https://github.com/jedie/dev-shell/compare/v0.0.2...v0.1.0)
189
+ * 2021-03-22 - release v0.1.0
190
+ * 2021-03-22 - Better "run as CLI" implementation
191
+ * 2021-03-22 - Update README.md
192
+ * 2021-03-19 - Bugfix handle of sys.exit() and return code (Imporant for CI usage)
193
+ * 2021-03-22 - Update test.yml
194
+ * 2021-03-20 - +!.github
195
+ * 2021-03-20 - Update dev-shell.py
196
+ * 2021-03-20 - add gitignore
197
+ * 2021-03-19 - Bugfix subprocess call: Don't feed shutil.which() with Path() instance
198
+ * [v0.0.2](https://github.com/jedie/dev-shell/compare/v0.0.1...v0.0.2)
199
+ * 2021-03-19 - refactor colorful
200
+ * [v0.0.1](https://github.com/jedie/dev-shell/compare/ad5dca7...v0.0.1)
201
+ * 2021-03-19 - activate codecov.io
202
+ * 2021-03-19 - Run linters on github actions
203
+ * 2021-03-19 - Bugfix linting
204
+ * 2021-03-19 - bump to version v0.0.1
205
+ * 2021-03-19 - refactor and add linting and "fix_code_style" commands
206
+ * 2021-03-19 - fix code style
207
+ * 2021-03-19 - subprocess utils: Search for command in PATH
208
+ * 2021-03-19 - update requirements
209
+ * 2021-03-19 - Create a generic CmdAppBaseTestCase
210
+ * 2021-03-19 - code cleanup
211
+ * 2021-03-19 - Update README.md
212
+ * 2021-03-19 - Bugfix Python 3.7 subprocess calls with Path() instances
213
+ * 2021-03-19 - Bugfixes for windows
214
+ * 2021-03-19 - Test on macos, too - TODO: Add windows support
215
+ * 2021-03-19 - Update README
216
+ * 2021-03-18 - add readme
217
+ * 2021-03-18 - bugfix github action
218
+ * 2021-03-18 - Activate github actions
219
+ * 2021-03-18 - make it alive
220
+ * 2021-03-18 - init
221
+ * 2021-03-18 - Initial commit
222
+
223
+ </details>
224
+
225
+
226
+ [comment]: <> (✂✂✂ auto generated history end ✂✂✂)
227
+
228
+ ## Project links
229
+
230
+ * Github: https://github.com/jedie/dev-shell/
231
+ * PyPi: https://pypi.org/project/dev-shell/
@@ -0,0 +1,214 @@
1
+ # A "dev-shell" for Python projects ;)
2
+
3
+ **Note: The continuation of this project is uncertain!**
4
+
5
+ [![tests](https://github.com/jedie/dev-shell/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/dev-shell/actions/workflows/tests.yml)
6
+ [![codecov](https://codecov.io/github/jedie/dev_shell/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/dev_shell)
7
+ [![dev_shell @ PyPi](https://img.shields.io/pypi/v/dev_shell?label=dev_shell%20%40%20PyPi)](https://pypi.org/project/dev_shell/)
8
+ [![Python Versions](https://img.shields.io/pypi/pyversions/dev_shell)](https://github.com/jedie/dev-shell/blob/main/pyproject.toml)
9
+ [![License GPL-3.0-or-later](https://img.shields.io/pypi/l/dev_shell)](https://github.com/jedie/dev-shell/blob/main/LICENSE)
10
+
11
+
12
+ This small project is intended to improve the start-up for collaborators.
13
+
14
+ The idea is to make the project setup as simple as possible. Just clone the sources and start a script and you're done ;)
15
+
16
+ Why in hell not just a `Makefile`? Because it doesn't out-of-the-box under Windows and MacOS, the dev-shell does ;)
17
+
18
+ Run Tests? Just start the script and call the "run test command".
19
+
20
+ The "dev-shell" is the base to create a CLI and a shell. It also shows how to make a project bootstrap as simply as possible, e.g.:
21
+
22
+
23
+ At least `uv` is needed. Install e.g.: via pipx:
24
+ ```bash
25
+ apt-get install pipx
26
+ pipx install uv
27
+ ```
28
+
29
+ Clone the project and just start the CLI help commands.
30
+ A virtual environment will be created/updated automatically.
31
+
32
+ ```bash
33
+ ~$ git clone https://github.com/jedie/dev-shell.git
34
+ ~$ cd dev-shell
35
+ ~/dev-shell$ devshell.py --help
36
+ ~/dev-shell$ devshell.py test
37
+ ```
38
+
39
+ The output looks like:
40
+
41
+ [comment]: <> (✂✂✂ auto generated main help start ✂✂✂)
42
+ ```
43
+ Cmd2 Commands
44
+ ─────────────
45
+ alias help history macro quit set shortcuts
46
+
47
+ dev-shell commands
48
+ ──────────────────
49
+ coverage install publish test version
50
+ fix_code_style list_venv_packages pyupgrade update
51
+ ```
52
+ [comment]: <> (✂✂✂ auto generated main help end ✂✂✂)
53
+
54
+
55
+
56
+
57
+ ## compatibility
58
+
59
+ | dev-shell version | OS | Python version |
60
+ |-------------------|-------------------------|---------------------|
61
+ | >=v0.10.0 | Linux + MacOS + Windows | 3.14, 3.13, 3.12 |
62
+ | >=v0.7.0 | Linux + MacOS + Windows | 3.11, 3.10, 3.9 |
63
+ | >=v0.5.0 | Linux + MacOS + Windows | 3.10, 3.9, 3.8, 3.7 |
64
+ | >=v0.0.1 | Linux + MacOS + Windows | 3.9, 3.8, 3.7 |
65
+
66
+ See also:
67
+ * github test configuration: [.github/workflows/test.yml](https://github.com/jedie/dev-shell/blob/main/.github/workflows/test.yml)
68
+ * Nox configuration: [noxfile.py](https://github.com/jedie/dev-shell/blob/main/noxfile.py)
69
+
70
+ ## History
71
+
72
+ [comment]: <> (✂✂✂ auto generated history start ✂✂✂)
73
+
74
+ * [v0.11.0](https://github.com/jedie/dev-shell/compare/v0.10.2...v0.11.0)
75
+ * 2026-06-11 - Remove uv.lock from this repo: It's a library not a project
76
+ * 2026-06-11 - nox: reuse venv
77
+ * 2026-06-11 - NEW: CategorizedCommandSet replacement for @cmd2.with_default_category()
78
+ * 2026-06-11 - fix linting
79
+ * 2026-06-11 - Update requirements
80
+ * 2026-05-29 - Bump uv from 0.11.6 to 0.11.15
81
+ * 2026-04-10 - Bump uv from 0.10.4 to 0.11.6
82
+ * 2026-04-08 - Bump cryptography from 46.0.6 to 46.0.7
83
+ * 2026-03-30 - Bump pygments from 2.19.2 to 2.20.0
84
+ * 2026-03-29 - Bump cryptography from 46.0.5 to 46.0.6
85
+ * [v0.10.2](https://github.com/jedie/dev-shell/compare/v0.10.1...v0.10.2)
86
+ * 2026-02-19 - apply manageprojects updates
87
+ * 2026-02-19 - Bugfix colorful helpers if a Path instance should be printed.
88
+ * [v0.10.1](https://github.com/jedie/dev-shell/compare/v0.10.0...v0.10.1)
89
+ * 2026-02-10 - Bugfix text color styles
90
+ * [v0.10.0](https://github.com/jedie/dev-shell/compare/v0.9.1...v0.10.0)
91
+ * 2026-02-10 - Cleanup
92
+ * 2026-02-09 - Update project
93
+
94
+ <details><summary>Expand older history entries ...</summary>
95
+
96
+ * [v0.9.1](https://github.com/jedie/dev-shell/compare/v0.9.0...v0.9.1)
97
+ * 2025-03-11 - Fix usage as package in external projects
98
+ * [v0.9.0](https://github.com/jedie/dev-shell/compare/v0.8.0...v0.9.0)
99
+ * 2025-03-11 - fix publish
100
+ * 2025-03-11 - Replace `poetry` with `uv`
101
+ * [v0.8.0](https://github.com/jedie/dev-shell/compare/v0.7.0...v0.8.0)
102
+ * 2024-04-09 - Bump version to v0.8.0
103
+ * 2024-04-09 - Remove "gnureadline" as dependency and update boot script
104
+ * 2024-04-09 - Remove "gnureadline" as dependency
105
+ * 2023-07-09 - Update requirements
106
+ * [v0.7.0](https://github.com/jedie/dev-shell/compare/v0.6.1...v0.7.0)
107
+ * 2023-04-25 - Bugfix RedirectStdOutErr
108
+ * 2023-04-25 - Update test matrix
109
+ * 2023-04-25 - Update requirements
110
+ * 2022-09-19 - skip linting (we use darker)
111
+ * 2022-09-19 - CI: cache packages
112
+ * [v0.6.1](https://github.com/jedie/dev-shell/compare/v0.6.0...v0.6.1)
113
+ * 2022-09-02 - Update README.md
114
+ * 2022-09-02 - v0.6.1 - update tests adn README
115
+ * 2022-09-02 - remove "pytest-flake8" and "pytest-isort"
116
+ * 2022-09-02 - update requirements
117
+ * 2022-09-02 - Call "poetry update" with "-v"
118
+ * 2022-09-02 - skip Poetry v1.2.0
119
+ * 2022-09-02 - Set default timeout to 5Min.
120
+ * [v0.6.0](https://github.com/jedie/dev-shell/compare/v0.5.0...v0.6.0)
121
+ * 2022-07-19 - updates
122
+ * 2022-07-19 - dd "pyupgrade" as shell command
123
+ * 2022-07-19 - Update README.md
124
+ * 2022-07-19 - Update requirements
125
+ * [v0.5.0](https://github.com/jedie/dev-shell/compare/v0.4.0...v0.5.0)
126
+ * 2022-05-29 - update flake8 config
127
+ * 2022-05-29 - simplify isort config
128
+ * 2022-05-29 - fix isort checks
129
+ * 2022-05-29 - v0.5.0.rc1
130
+ * 2022-05-29 - update tox settings
131
+ * 2022-05-29 - line_length = 100
132
+ * 2022-05-29 - call github tests via tox
133
+ * 2022-05-29 - Add "tox" and "poetry" commands
134
+ * 2022-05-29 - Test also with Python 3.10
135
+ * 2022-05-29 - Update requirements
136
+ * [v0.4.0](https://github.com/jedie/dev-shell/compare/v0.3.0...v0.4.0)
137
+ * 2022-02-28 - Release v0.4.0
138
+ * 2022-02-28 - Update requirements
139
+ * [v0.3.0](https://github.com/jedie/dev-shell/compare/v0.2.4...v0.3.0)
140
+ * 2022-01-30 - Remove "flynt" form linting/fix code style
141
+ * [v0.2.4](https://github.com/jedie/dev-shell/compare/v0.2.3...v0.2.4)
142
+ * 2022-01-22 - Switch to darker and use pytest-darker
143
+ * 2022-01-22 - update requirements
144
+ * [v0.2.3](https://github.com/jedie/dev-shell/compare/v0.2.2...v0.2.3)
145
+ * 2021-11-15 - Fix #29 - Flynt args can be change via CommandSet
146
+ * 2021-11-15 - update requirements
147
+ * 2021-11-15 - Update test.yml
148
+ * [v0.2.2](https://github.com/jedie/dev-shell/compare/v0.2.1...v0.2.2)
149
+ * 2021-04-12 - include source "bootstrap" file
150
+ * [v0.2.1](https://github.com/jedie/dev-shell/compare/v0.2.0...v0.2.1)
151
+ * 2021-04-12 - Handle if "poetry-publish" is not installed
152
+ * [v0.2.0](https://github.com/jedie/dev-shell/compare/v0.1.0...v0.2.0)
153
+ * 2021-04-11 - Fix flake8 call: Remove arguments and add .flake8 config file
154
+ * 2021-04-11 - Update dependencies + add "update" command
155
+ * 2021-04-11 - Release 0.2.0rc1
156
+ * 2021-04-11 - Fix #24 test under windows
157
+ * 2021-04-10 - The DocTest will not work on Windows. Replace it with a normal test ;)
158
+ * 2021-04-10 - Bugfix error on Windows: File "C:\Users\sysop\PycharmProjects\dev-shell\dev_shell\utils\subprocess_utils.py", line 125, in prepare_popenargs command = shutil.which(command_path, path=bin_path) File "C:\Users\sysop\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 1441, in which if any(cmd.lower().endswith(ext.lower()) for ext in pathext): File "C:\Users\sysop\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 1441, in <genexpr> if any(cmd.lower().endswith(ext.lower()) for ext in pathext): AttributeError: 'WindowsPath' object has no attribute 'lower' EXCEPTION of type 'AttributeError' occurred with message: ''WindowsPath' object has no attribute 'lower''
159
+ * 2021-04-10 - Replace "SubprocessMock" with a simple function
160
+ * 2021-04-10 - Bugfix calls outside the project directory...
161
+ * 2021-04-10 - Do linting via tests
162
+ * 2021-04-10 - Update also "setuptools", too.
163
+ * 2021-04-05 - fix tests
164
+ * 2021-04-05 - code style
165
+ * 2021-04-05 - recognize "--update" and "--help" calls better
166
+ * 2021-04-05 - remove "max-parallel"
167
+ * 2021-03-26 - Rename: "dev-shell.py => devshell.py" and add tests for it
168
+ * 2021-03-26 - Auto update .venv if poetry.lock changed
169
+ * 2021-03-22 - Update README.md
170
+ * 2021-03-22 - Remove "path" argument from flynt and autopep8
171
+ * [v0.1.0](https://github.com/jedie/dev-shell/compare/v0.0.2...v0.1.0)
172
+ * 2021-03-22 - release v0.1.0
173
+ * 2021-03-22 - Better "run as CLI" implementation
174
+ * 2021-03-22 - Update README.md
175
+ * 2021-03-19 - Bugfix handle of sys.exit() and return code (Imporant for CI usage)
176
+ * 2021-03-22 - Update test.yml
177
+ * 2021-03-20 - +!.github
178
+ * 2021-03-20 - Update dev-shell.py
179
+ * 2021-03-20 - add gitignore
180
+ * 2021-03-19 - Bugfix subprocess call: Don't feed shutil.which() with Path() instance
181
+ * [v0.0.2](https://github.com/jedie/dev-shell/compare/v0.0.1...v0.0.2)
182
+ * 2021-03-19 - refactor colorful
183
+ * [v0.0.1](https://github.com/jedie/dev-shell/compare/ad5dca7...v0.0.1)
184
+ * 2021-03-19 - activate codecov.io
185
+ * 2021-03-19 - Run linters on github actions
186
+ * 2021-03-19 - Bugfix linting
187
+ * 2021-03-19 - bump to version v0.0.1
188
+ * 2021-03-19 - refactor and add linting and "fix_code_style" commands
189
+ * 2021-03-19 - fix code style
190
+ * 2021-03-19 - subprocess utils: Search for command in PATH
191
+ * 2021-03-19 - update requirements
192
+ * 2021-03-19 - Create a generic CmdAppBaseTestCase
193
+ * 2021-03-19 - code cleanup
194
+ * 2021-03-19 - Update README.md
195
+ * 2021-03-19 - Bugfix Python 3.7 subprocess calls with Path() instances
196
+ * 2021-03-19 - Bugfixes for windows
197
+ * 2021-03-19 - Test on macos, too - TODO: Add windows support
198
+ * 2021-03-19 - Update README
199
+ * 2021-03-18 - add readme
200
+ * 2021-03-18 - bugfix github action
201
+ * 2021-03-18 - Activate github actions
202
+ * 2021-03-18 - make it alive
203
+ * 2021-03-18 - init
204
+ * 2021-03-18 - Initial commit
205
+
206
+ </details>
207
+
208
+
209
+ [comment]: <> (✂✂✂ auto generated history end ✂✂✂)
210
+
211
+ ## Project links
212
+
213
+ * Github: https://github.com/jedie/dev-shell/
214
+ * PyPi: https://pypi.org/project/dev-shell/
@@ -4,5 +4,5 @@ Developer shell for easy startup...
4
4
  """
5
5
 
6
6
  # See https://packaging.python.org/en/latest/specifications/version-specifiers/
7
- __version__ = '0.10.1'
7
+ __version__ = '0.11.0'
8
8
  __author__ = 'Jens Diemer <dev-shell@jensdiemer.de>'
@@ -21,7 +21,7 @@ class DevShellBaseApp(cmd2.Cmd):
21
21
  delattr(cmd2.Cmd, 'do_run_pyscript')
22
22
 
23
23
  def __init__(self, *args, config: DevShellConfig, **kwargs):
24
- kwargs.update(dict(persistent_history_file='.history', allow_cli_args=False))
24
+ kwargs.update({'persistent_history_file': '.history', 'allow_cli_args': False})
25
25
  super().__init__(*args, **kwargs)
26
26
 
27
27
  self.config = config
@@ -70,12 +70,21 @@ def main(argv):
70
70
  if not uv_bin:
71
71
  print_uv_error_and_exit()
72
72
 
73
+ first_run = not Path(VIRTUAL_ENV).is_dir()
74
+
75
+ # Always sync: creates venv if missing, regenerates uv.lock, installs deps:
76
+ verbose_check_call(uv_bin, 'sync')
77
+
78
+ if first_run:
79
+ # Activate git pre-commit hooks:
80
+ verbose_check_call(uv_bin, 'run', '--active', '-m', 'pre_commit', 'install')
81
+
73
82
  # The cmd2 shell should not abort on Ctrl-C => ignore "Interrupt from keyboard" signal:
74
83
  signal.signal(signal.SIGINT, noop_signal_handler)
75
84
 
76
85
  # Call our entry point CLI:
77
86
  try:
78
- verbose_check_call(uv_bin, 'run', '-m', 'dev_shell', *argv[1:])
87
+ verbose_check_call(uv_bin, 'run', '--active', '-m', 'dev_shell', *argv[1:])
79
88
  except subprocess.CalledProcessError as err:
80
89
  sys.exit(err.returncode)
81
90
 
@@ -0,0 +1,43 @@
1
+ import inspect
2
+
3
+ import cmd2
4
+ from cmd2 import CommandSet
5
+
6
+ from dev_shell.config import DevShellConfig
7
+
8
+
9
+ class CategorizedCommandSet(CommandSet):
10
+ """
11
+ A cmd2 CommandSet that automatically groups all do_* methods under a help category.
12
+
13
+ Set the class attribute `category` in a subclass to assign all its commands to that
14
+ category in the help output. The categorization happens once at class definition time
15
+ via __init_subclass__, so there is no runtime overhead per instance.
16
+
17
+ Example::
18
+
19
+ class MyCommands(CategorizedCommandSet):
20
+ category = 'My Commands'
21
+
22
+ def do_hello(self, statement):
23
+ ...
24
+ """
25
+
26
+ category = None
27
+
28
+ def __init_subclass__(cls, **kwargs):
29
+ super().__init_subclass__(**kwargs)
30
+ if category := getattr(cls, 'category', None):
31
+ cmd2.utils.categorize(
32
+ [v for k, v in inspect.getmembers(cls, predicate=inspect.isfunction) if k.startswith('do_')],
33
+ category,
34
+ )
35
+
36
+
37
+ class DevShellBaseCommandSet(CategorizedCommandSet):
38
+ category = 'dev-shell commands'
39
+
40
+ def __init__(self, config: DevShellConfig):
41
+ super().__init__()
42
+
43
+ self.config = config
@@ -23,7 +23,6 @@ except ModuleNotFoundError:
23
23
  publish_package = None
24
24
 
25
25
 
26
- @cmd2.with_default_category('dev-shell commands')
27
26
  class DevShellCommandSet(DevShellBaseCommandSet):
28
27
  """
29
28
  This command set may be used in external project, too.
@@ -99,6 +98,10 @@ class DevShellCommandSet(DevShellBaseCommandSet):
99
98
  # Install new dependencies in current .venv:
100
99
  tools_executor.verbose_check_call('uv', 'sync')
101
100
 
101
+ if tools_executor.is_executable('pre-commit'):
102
+ # Update git pre-commit hooks:
103
+ tools_executor.verbose_check_call('pre-commit', 'autoupdate')
104
+
102
105
  print(bright_green('\n\nPlease restart the shell !\n'))
103
106
  sys.exit(0) # Stop cmd
104
107
 
@@ -27,16 +27,16 @@ def get_devshell_app_kwargs():
27
27
  config = DevShellConfig(package_module=dev_shell)
28
28
 
29
29
  # initialize all CommandSet() with context:
30
- kwargs = dict(
31
- config=config
32
- )
30
+ kwargs = {
31
+ 'config': config,
32
+ }
33
33
 
34
- app_kwargs = dict(
35
- config=config,
36
- command_sets=[
34
+ app_kwargs = {
35
+ 'config': config,
36
+ 'command_sets': [
37
37
  DevShellCommandSet(**kwargs),
38
- ]
39
- )
38
+ ],
39
+ }
40
40
  return app_kwargs
41
41
 
42
42
 
@@ -4,7 +4,7 @@ from pathlib import Path
4
4
 
5
5
  from bx_py_utils.test_utils.deny_requests import deny_any_real_request
6
6
  from cli_base.cli_tools.verbosity import MAX_LOG_LEVEL, setup_logging
7
- from rich import print # noqa
7
+ from rich import print
8
8
  from typeguard import install_import_hook
9
9
 
10
10
 
@@ -17,7 +17,7 @@ def pre_configure_tests() -> None:
17
17
 
18
18
  # Hacky way to display more "assert"-Context in failing tests:
19
19
  _MIN_MAX_DIFF = unittest.util._MAX_LENGTH - unittest.util._MIN_DIFF_LEN
20
- unittest.util._MAX_LENGTH = int(os.environ.get('UNITTEST_MAX_LENGTH', 2000))
20
+ unittest.util._MAX_LENGTH = int(os.environ.get('UNITTEST_MAX_LENGTH', '2000'))
21
21
  unittest.util._MIN_DIFF_LEN = unittest.util._MAX_LENGTH - _MIN_MAX_DIFF
22
22
 
23
23
  # Deny any request via docket/urllib3 because tests they should mock all requests: