wexample-wex-addon-dev-python 0.0.61__tar.gz → 0.0.63__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 (48) hide show
  1. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/PKG-INFO +73 -15
  2. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/README.md +69 -10
  3. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/pyproject.toml +4 -5
  4. wexample_wex_addon_dev_python-0.0.63/src/wexample_wex_addon_dev_python/config_value/python_package_readme_config_value.py +50 -0
  5. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/const/python.py +0 -0
  6. wexample_wex_addon_dev_python-0.0.63/src/wexample_wex_addon_dev_python/file/python_app_iml_file.py +41 -0
  7. wexample_wex_addon_dev_python-0.0.61/src/wexample_wex_addon_dev_python/file/python_package_toml_file.py → wexample_wex_addon_dev_python-0.0.63/src/wexample_wex_addon_dev_python/file/python_pyproject_toml_file.py +60 -77
  8. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/resources/__init__.py +0 -0
  9. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/resources/readme_templates/__init__.py +0 -0
  10. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/resources/readme_templates/tests.md.j2 +0 -0
  11. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/workdir/python_package_workdir.py +90 -220
  12. wexample_wex_addon_dev_python-0.0.63/src/wexample_wex_addon_dev_python/workdir/python_packages_suite_workdir.py +85 -0
  13. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/workdir/python_workdir.py +63 -67
  14. wexample_wex_addon_dev_python-0.0.61/src/wexample_wex_addon_dev_python/config_value/python_package_readme_config_value.py +0 -249
  15. wexample_wex_addon_dev_python-0.0.61/src/wexample_wex_addon_dev_python/resources/readme_templates/title.md.j2 +0 -5
  16. wexample_wex_addon_dev_python-0.0.61/src/wexample_wex_addon_dev_python/workdir/python_packages_suite_workdir.py +0 -173
  17. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/__init__.py +0 -0
  18. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/__pycache__/__init__.py +0 -0
  19. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/__init__.py +0 -0
  20. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/__init__.py +0 -0
  21. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/check/__init__.py +0 -0
  22. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/check/mypy.py +0 -0
  23. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/check/pylint.py +0 -0
  24. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/check/pyright.py +0 -0
  25. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/check.py +0 -0
  26. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/format/__init__.py +0 -0
  27. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/format/black.py +0 -0
  28. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/format/isort.py +0 -0
  29. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/code/format.py +0 -0
  30. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/examples/__init__.py +0 -0
  31. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/examples/utils/__init__.py +0 -0
  32. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/examples/utils/some_example_type.py +0 -0
  33. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/examples/validate.py +0 -0
  34. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/commands/release/__init__.py +0 -0
  35. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/config_value/__init__.py +0 -0
  36. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/config_value/__pycache__/__init__.py +0 -0
  37. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/const/__init__.py +0 -0
  38. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/const/__pycache__/__init__.py +0 -0
  39. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/const/package.py +0 -0
  40. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/file/__init__.py +0 -0
  41. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/file/__pycache__/__init__.py +0 -0
  42. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/middleware/__init__.py +0 -0
  43. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/middleware/__pycache__/__init__.py +0 -0
  44. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/middleware/each_python_file_middleware.py +0 -0
  45. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/py.typed +0 -0
  46. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/python_addon_manager.py +0 -0
  47. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/workdir/__init__.py +0 -0
  48. {wexample_wex_addon_dev_python-0.0.61 → wexample_wex_addon_dev_python-0.0.63}/src/wexample_wex_addon_dev_python/workdir/__pycache__/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-wex-addon-dev-python
3
- Version: 0.0.61
3
+ Version: 0.0.63
4
4
  Summary: Python dev addon for wex
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -11,13 +11,12 @@ Project-URL: homepage, https://github.com/wexample/python-wex-dev-python
11
11
  Requires-Python: >=3.10
12
12
  Requires-Dist: attrs>=23.1.0
13
13
  Requires-Dist: cattrs>=23.1.0
14
- Requires-Dist: jinja2
15
14
  Requires-Dist: networkx
16
15
  Requires-Dist: pylint
17
16
  Requires-Dist: pyright
18
- Requires-Dist: wexample-filestate-python==0.0.56
19
- Requires-Dist: wexample-wex-addon-app==0.0.53
20
- Requires-Dist: wexample-wex-core==6.0.65
17
+ Requires-Dist: wexample-filestate-python==0.0.58
18
+ Requires-Dist: wexample-wex-addon-app==0.0.55
19
+ Requires-Dist: wexample-wex-core==6.0.67
21
20
  Provides-Extra: dev
22
21
  Requires-Dist: pytest; extra == "dev"
23
22
  Requires-Dist: pytest-cov; extra == "dev"
@@ -25,10 +24,49 @@ Description-Content-Type: text/markdown
25
24
 
26
25
  # wexample-wex-addon-dev-python
27
26
 
28
- Version: 0.0.61
27
+ Version: 0.0.63
29
28
 
30
29
  Python dev addon for wex
31
30
 
31
+ ## Table of Contents
32
+
33
+ - [Status Compatibility](#status-compatibility)
34
+ - [Api Reference](#api-reference)
35
+ - [Tests](#tests)
36
+ - [Code Quality](#code-quality)
37
+ - [Versioning](#versioning)
38
+ - [Changelog](#changelog)
39
+ - [Migration Notes](#migration-notes)
40
+ - [Roadmap](#roadmap)
41
+ - [Security](#security)
42
+ - [Privacy](#privacy)
43
+ - [Support](#support)
44
+ - [Contribution Guidelines](#contribution-guidelines)
45
+ - [Maintainers](#maintainers)
46
+ - [License](#license)
47
+ - [Useful Links](#useful-links)
48
+ - [Suite Integration](#suite-integration)
49
+ - [Compatibility Matrix](#compatibility-matrix)
50
+ - [Dependencies](#dependencies)
51
+ - [Suite Signature](#suite-signature)
52
+
53
+
54
+ ## Status & Compatibility
55
+
56
+ **Maturity**: Production-ready
57
+
58
+ **Python Support**: >=3.10
59
+
60
+ **OS Support**: Linux, macOS, Windows
61
+
62
+ **Status**: Actively maintained
63
+
64
+ ## API Reference
65
+
66
+ Full API documentation is available in the source code docstrings.
67
+
68
+ Key modules and classes are documented with type hints for better IDE support.
69
+
32
70
  ## Tests
33
71
 
34
72
  This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
@@ -115,13 +153,13 @@ Breaking changes are clearly documented with upgrade paths and examples.
115
153
 
116
154
  Current limitations and planned features are tracked in the GitHub issues.
117
155
 
118
- See the [project roadmap](https://github.com/wexample/python-wex-dev-python/issues) for upcoming features and improvements.
156
+ See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_python/issues) for upcoming features and improvements.
119
157
 
120
158
  ## Security Policy
121
159
 
122
160
  ### Reporting Vulnerabilities
123
161
 
124
- If you discover a security vulnerability, please email security@wexample.com.
162
+ If you discover a security vulnerability, please email contact@wexample.com.
125
163
 
126
164
  **Do not** open public issues for security vulnerabilities.
127
165
 
@@ -144,7 +182,7 @@ Community support is available through GitHub Discussions.
144
182
 
145
183
  ## Contribution Guidelines
146
184
 
147
- We welcome contributions to the Wexample suite!
185
+ We welcome contributions to the Wexample suite!
148
186
 
149
187
  ### How to Contribute
150
188
 
@@ -162,19 +200,21 @@ See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the full list of contributors.
162
200
 
163
201
  ## License
164
202
 
165
- MIT
203
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
204
+
205
+ Free to use in both personal and commercial projects.
166
206
 
167
207
  ## Useful Links
168
208
 
169
- - **Homepage**: https://github.com/wexample/python-wex-dev-python
209
+ - **Homepage**: https://github.com/wexample/python-wex-addon-dev-python
170
210
  - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
171
- - **Issue Tracker**: https://github.com/wexample/python-wex-dev-python/issues
172
- - **Discussions**: https://github.com/wexample/python-wex-dev-python/discussions
211
+ - **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-python/issues
212
+ - **Discussions**: https://github.com/wexample/python-wex-addon-dev-python/discussions
173
213
  - **PyPI**: [pypi.org/project/wexample-wex-addon-dev-python](https://pypi.org/project/wexample-wex-addon-dev-python/)
174
214
 
175
215
  ## Integration in the Suite
176
216
 
177
- This package is part of the **Wexample Suite** — a collection of high-quality Python packages designed to work seamlessly together.
217
+ This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
178
218
 
179
219
  ### Related Packages
180
220
 
@@ -182,9 +222,27 @@ The suite includes packages for configuration management, file handling, prompts
182
222
 
183
223
  Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
184
224
 
225
+ ## Compatibility Matrix
226
+
227
+ This package is part of the Wexample suite and is compatible with other suite packages.
228
+
229
+ Refer to each package's documentation for specific version compatibility requirements.
230
+
231
+ ## Dependencies
232
+
233
+ - attrs: >=23.1.0
234
+ - cattrs: >=23.1.0
235
+ - networkx:
236
+ - pylint:
237
+ - pyright:
238
+ - wexample-filestate-python: ==0.0.58
239
+ - wexample-wex-addon-app: ==0.0.55
240
+ - wexample-wex-core: ==6.0.67
241
+
242
+
185
243
  # About us
186
244
 
187
- Wexample stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
245
+ [Wexample](https://wexample.com) stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
188
246
 
189
247
  This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
190
248
 
@@ -1,9 +1,48 @@
1
1
  # wexample-wex-addon-dev-python
2
2
 
3
- Version: 0.0.61
3
+ Version: 0.0.63
4
4
 
5
5
  Python dev addon for wex
6
6
 
7
+ ## Table of Contents
8
+
9
+ - [Status Compatibility](#status-compatibility)
10
+ - [Api Reference](#api-reference)
11
+ - [Tests](#tests)
12
+ - [Code Quality](#code-quality)
13
+ - [Versioning](#versioning)
14
+ - [Changelog](#changelog)
15
+ - [Migration Notes](#migration-notes)
16
+ - [Roadmap](#roadmap)
17
+ - [Security](#security)
18
+ - [Privacy](#privacy)
19
+ - [Support](#support)
20
+ - [Contribution Guidelines](#contribution-guidelines)
21
+ - [Maintainers](#maintainers)
22
+ - [License](#license)
23
+ - [Useful Links](#useful-links)
24
+ - [Suite Integration](#suite-integration)
25
+ - [Compatibility Matrix](#compatibility-matrix)
26
+ - [Dependencies](#dependencies)
27
+ - [Suite Signature](#suite-signature)
28
+
29
+
30
+ ## Status & Compatibility
31
+
32
+ **Maturity**: Production-ready
33
+
34
+ **Python Support**: >=3.10
35
+
36
+ **OS Support**: Linux, macOS, Windows
37
+
38
+ **Status**: Actively maintained
39
+
40
+ ## API Reference
41
+
42
+ Full API documentation is available in the source code docstrings.
43
+
44
+ Key modules and classes are documented with type hints for better IDE support.
45
+
7
46
  ## Tests
8
47
 
9
48
  This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
@@ -90,13 +129,13 @@ Breaking changes are clearly documented with upgrade paths and examples.
90
129
 
91
130
  Current limitations and planned features are tracked in the GitHub issues.
92
131
 
93
- See the [project roadmap](https://github.com/wexample/python-wex-dev-python/issues) for upcoming features and improvements.
132
+ See the [project roadmap](https://github.com/wexample/python-wex_addon_dev_python/issues) for upcoming features and improvements.
94
133
 
95
134
  ## Security Policy
96
135
 
97
136
  ### Reporting Vulnerabilities
98
137
 
99
- If you discover a security vulnerability, please email security@wexample.com.
138
+ If you discover a security vulnerability, please email contact@wexample.com.
100
139
 
101
140
  **Do not** open public issues for security vulnerabilities.
102
141
 
@@ -119,7 +158,7 @@ Community support is available through GitHub Discussions.
119
158
 
120
159
  ## Contribution Guidelines
121
160
 
122
- We welcome contributions to the Wexample suite!
161
+ We welcome contributions to the Wexample suite!
123
162
 
124
163
  ### How to Contribute
125
164
 
@@ -137,19 +176,21 @@ See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the full list of contributors.
137
176
 
138
177
  ## License
139
178
 
140
- MIT
179
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
180
+
181
+ Free to use in both personal and commercial projects.
141
182
 
142
183
  ## Useful Links
143
184
 
144
- - **Homepage**: https://github.com/wexample/python-wex-dev-python
185
+ - **Homepage**: https://github.com/wexample/python-wex-addon-dev-python
145
186
  - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
146
- - **Issue Tracker**: https://github.com/wexample/python-wex-dev-python/issues
147
- - **Discussions**: https://github.com/wexample/python-wex-dev-python/discussions
187
+ - **Issue Tracker**: https://github.com/wexample/python-wex-addon-dev-python/issues
188
+ - **Discussions**: https://github.com/wexample/python-wex-addon-dev-python/discussions
148
189
  - **PyPI**: [pypi.org/project/wexample-wex-addon-dev-python](https://pypi.org/project/wexample-wex-addon-dev-python/)
149
190
 
150
191
  ## Integration in the Suite
151
192
 
152
- This package is part of the **Wexample Suite** — a collection of high-quality Python packages designed to work seamlessly together.
193
+ This package is part of the Wexample Suite — a collection of high-quality, modular tools designed to work seamlessly together across multiple languages and environments.
153
194
 
154
195
  ### Related Packages
155
196
 
@@ -157,9 +198,27 @@ The suite includes packages for configuration management, file handling, prompts
157
198
 
158
199
  Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
159
200
 
201
+ ## Compatibility Matrix
202
+
203
+ This package is part of the Wexample suite and is compatible with other suite packages.
204
+
205
+ Refer to each package's documentation for specific version compatibility requirements.
206
+
207
+ ## Dependencies
208
+
209
+ - attrs: >=23.1.0
210
+ - cattrs: >=23.1.0
211
+ - networkx:
212
+ - pylint:
213
+ - pyright:
214
+ - wexample-filestate-python: ==0.0.58
215
+ - wexample-wex-addon-app: ==0.0.55
216
+ - wexample-wex-core: ==6.0.67
217
+
218
+
160
219
  # About us
161
220
 
162
- Wexample stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
221
+ [Wexample](https://wexample.com) stands as a cornerstone of the digital ecosystem — a collective of seasoned engineers, researchers, and creators driven by a relentless pursuit of technological excellence. More than a media platform, it has grown into a vibrant community where innovation meets craftsmanship, and where every line of code reflects a commitment to clarity, durability, and shared intelligence.
163
222
 
164
223
  This packages suite embodies this spirit. Trusted by professionals and enthusiasts alike, it delivers a consistent, high-quality foundation for modern development — open, elegant, and battle-tested. Its reputation is built on years of collaboration, refinement, and rigorous attention to detail, making it a natural choice for those who demand both robustness and beauty in their tools.
165
224
 
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "wexample-wex-addon-dev-python"
9
- version = "0.0.61"
9
+ version = "0.0.63"
10
10
  description = "Python dev addon for wex"
11
11
  authors = [
12
12
  { name = "weeger", email = "contact@wexample.com" },
@@ -20,13 +20,12 @@ classifiers = [
20
20
  dependencies = [
21
21
  "attrs>=23.1.0",
22
22
  "cattrs>=23.1.0",
23
- "jinja2",
24
23
  "networkx",
25
24
  "pylint",
26
25
  "pyright",
27
- "wexample-filestate-python==0.0.56",
28
- "wexample-wex-addon-app==0.0.53",
29
- "wexample-wex-core==6.0.65",
26
+ "wexample-filestate-python==0.0.58",
27
+ "wexample-wex-addon-app==0.0.55",
28
+ "wexample-wex-core==6.0.67",
30
29
  ]
31
30
 
32
31
  [project.readme]
@@ -0,0 +1,50 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from wexample_helpers.decorator.base_class import base_class
6
+ from wexample_wex_addon_app.config_value.app_readme_config_value import (
7
+ AppReadmeConfigValue,
8
+ )
9
+
10
+ if TYPE_CHECKING:
11
+ pass
12
+
13
+
14
+ @base_class
15
+ class PythonPackageReadmeContentConfigValue(AppReadmeConfigValue):
16
+ """README generation for Python packages."""
17
+
18
+ def _get_app_description(self) -> str:
19
+ """Extract description from pyproject.toml."""
20
+ return self.workdir.get_app_config().get("project", {}).get("description")
21
+
22
+ def _get_app_homepage(self) -> str:
23
+ """Extract homepage URL from pyproject.toml."""
24
+ project = self.workdir.get_app_config()
25
+ urls = (
26
+ project.get("urls", {}) if isinstance(project.get("urls", {}), dict) else {}
27
+ )
28
+ return urls.get("homepage") or urls.get("Homepage") or ""
29
+
30
+ def _get_project_license(self) -> str | None:
31
+ """Extract license information from pyproject.toml."""
32
+ project = self.workdir.get_app_config()
33
+ license_field = project.get("license", {})
34
+ if isinstance(license_field, dict):
35
+ return license_field.get("text", "") or license_field.get("file", "")
36
+ return str(license_field) if license_field else ""
37
+
38
+ def _get_template_context(self) -> dict:
39
+ """Build template context with Python-specific variables.
40
+
41
+ Adds python_version to the base context.
42
+ """
43
+ context = super()._get_template_context()
44
+
45
+ # Add Python-specific variable
46
+ context["python_version"] = (
47
+ self.workdir.get_app_config().get("project", {}).get("requires-python", "")
48
+ )
49
+
50
+ return context
@@ -0,0 +1,41 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Iterable
4
+ from typing import Any, ClassVar
5
+
6
+ from wexample_app.item.file.iml_file import ImlFile
7
+
8
+
9
+ class PythonAppImlFile(ImlFile):
10
+ """
11
+ IntelliJ IDEA .iml helper tailored for Python apps (src/tests layout, python module type).
12
+ """
13
+
14
+ MODULE_TYPE: ClassVar[str] = "PYTHON_MODULE"
15
+
16
+ def _default_exclude_folders(self) -> Iterable[dict[str, Any]]:
17
+ return (
18
+ {
19
+ "@url": f"{self.MODULE_DIR_URL}/dist",
20
+ },
21
+ )
22
+
23
+ def _default_module_attributes(self) -> dict[str, str]:
24
+ attrs = super()._default_module_attributes()
25
+ attrs.setdefault("@type", self.MODULE_TYPE)
26
+ return attrs
27
+
28
+ def _default_order_entries(self) -> Iterable[dict[str, Any]]:
29
+ return ({"@type": "sourceFolder", "@forTests": "false"},)
30
+
31
+ def _default_source_folders(self) -> Iterable[dict[str, Any]]:
32
+ return (
33
+ {
34
+ "@url": f"{self.MODULE_DIR_URL}/src",
35
+ "@isTestSource": "false",
36
+ },
37
+ {
38
+ "@url": f"{self.MODULE_DIR_URL}/tests",
39
+ "@isTestSource": "true",
40
+ },
41
+ )
@@ -8,35 +8,47 @@ from wexample_wex_addon_app.const.path import APP_PATH_README
8
8
 
9
9
  if TYPE_CHECKING:
10
10
  from tomlkit import TOMLDocument
11
- from wexample_wex_addon_app.workdir.code_base_workdir import (
12
- CodeBaseWorkdir,
13
- )
14
11
 
15
12
 
16
13
  @base_class
17
- class PythonPackageTomlFile(TomlFile):
14
+ class PythonPyprojectTomlFile(TomlFile):
18
15
  def add_dependency(
19
- self, spec: str, optional: bool = False, group: str = "dev"
16
+ self,
17
+ package_name: str,
18
+ version: str,
19
+ operator: str = "==",
20
+ optional: bool = False,
21
+ group: None | str = None,
20
22
  ) -> bool:
21
23
  from packaging.requirements import Requirement
22
24
  from packaging.utils import canonicalize_name
23
25
  from wexample_filestate_python.helpers.toml import toml_sort_string_array
24
26
 
25
- deps = self._get_deps_array(optional=optional, group=group)
27
+ spec = f"{package_name}{operator}{version}"
26
28
  new_req = Requirement(spec)
27
29
  new_name = canonicalize_name(new_req.name)
28
30
 
29
- old_spec = None
30
- for dep in deps:
31
- if canonicalize_name(Requirement(dep).name) == new_name:
32
- old_spec = dep
33
- break
31
+ deps = self._get_deps_array(optional=optional, group=group)
34
32
 
35
- self.remove_dependency_by_name(new_name, optional=optional, group=group)
33
+ # Look for existing dependency
34
+ old_spec = next(
35
+ (d for d in deps if canonicalize_name(Requirement(d).name) == new_name),
36
+ None,
37
+ )
38
+
39
+ # Remove old dep if exists
40
+ if old_spec:
41
+ deps.remove(old_spec)
36
42
 
43
+ # Add new version
37
44
  deps.append(spec)
45
+
46
+ # Sort array
38
47
  toml_sort_string_array(deps)
39
48
 
49
+ # Save file
50
+ self.write_parsed()
51
+
40
52
  return old_spec != spec
41
53
 
42
54
  def dumps(self, content: TOMLDocument | dict | None = None) -> str:
@@ -47,10 +59,10 @@ class PythonPackageTomlFile(TomlFile):
47
59
 
48
60
  content = content or self.read_parsed()
49
61
 
50
- package = self.find_package_workdir()
51
- import_name = package.get_package_import_name() if package else None
52
- project_name = package.get_package_name() if package else None
53
- project_version = package.get_project_version() if package else None
62
+ workdir = self.get_parent_item()
63
+ import_name = workdir.get_package_import_name()
64
+ project_name = workdir.get_package_name()
65
+ project_version = workdir.get_project_version()
54
66
 
55
67
  self._enforce_build_system(content)
56
68
  self._enforce_pdm_build(content, import_name)
@@ -65,40 +77,21 @@ class PythonPackageTomlFile(TomlFile):
65
77
 
66
78
  return result
67
79
 
68
- def find_package_workdir(self) -> CodeBaseWorkdir | None:
69
- from wexample_wex_addon_app.workdir.code_base_workdir import CodeBaseWorkdir
70
-
71
- return self.find_closest(CodeBaseWorkdir)
72
-
73
- def list_dependencies(
80
+ def get_dependencies_versions(
74
81
  self, optional: bool = False, group: str = "dev"
75
- ) -> list[str]:
76
- deps = self._get_deps_array(optional=optional, group=group)
77
- return [str(x) for x in list(deps)]
78
-
79
- def list_dependency_names(
80
- self,
81
- canonicalize_names: bool = True,
82
- optional: bool = False,
83
- group: str = "dev",
84
- ) -> list[str]:
85
- """Return dependency package names derived from list_dependencies().
86
-
87
- If canonicalize_names is True, names are normalized using packaging's
88
- canonicalize_name for robust comparisons (dash/underscore, case, etc.).
89
- """
82
+ ) -> dict[str, str]:
90
83
  from packaging.requirements import Requirement
91
84
  from packaging.utils import canonicalize_name
92
85
 
93
- names: list[str] = []
94
- for spec in self.list_dependencies(optional=optional, group=group):
95
- try:
96
- name = Requirement(spec).name
97
- names.append(canonicalize_name(name) if canonicalize_names else name)
98
- except Exception:
99
- # Skip unparsable entries when deriving names
100
- continue
101
- return names
86
+ deps = self._get_deps_array(optional=optional, group=group)
87
+
88
+ map = {}
89
+ for spec in list(deps):
90
+ req = Requirement(spec)
91
+ # name: version
92
+ map[canonicalize_name(req.name)] = str(req.specifier)
93
+
94
+ return map
102
95
 
103
96
  def optional_group_array(self, group: str):
104
97
  """Ensure and return project.optional-dependencies[group] as multi-line array."""
@@ -197,34 +190,28 @@ class PythonPackageTomlFile(TomlFile):
197
190
  project_tbl["requires-python"] = ">=3.10"
198
191
 
199
192
  # Add description if available
200
- package = self.find_package_workdir()
201
- if package:
202
- description = package.get_config().search("global.description")
203
- if not description.is_none():
204
- project_tbl["description"] = description.get_str()
193
+ workdir = self.get_parent_item()
194
+ description = workdir.get_config().search("global.description")
195
+ if not description.is_none():
196
+ project_tbl["description"] = description.get_str()
205
197
 
206
198
  # Add authors if available
207
- if package:
208
- from tomlkit import array, inline_table
199
+ from tomlkit import array, inline_table
209
200
 
210
- author_name = package.search_in_package_or_suite_config(
211
- "global.authors.name"
212
- )
213
- author_email = package.search_in_package_or_suite_config(
214
- "global.authors.email"
215
- )
201
+ author_name = workdir.search_in_package_or_suite_config("global.authors.name")
202
+ author_email = workdir.search_in_package_or_suite_config("global.authors.email")
216
203
 
217
- if not author_name.is_none() or not author_email.is_none():
218
- authors_arr = array()
219
- author_tbl = inline_table()
204
+ if not author_name.is_none() or not author_email.is_none():
205
+ authors_arr = array()
206
+ author_tbl = inline_table()
220
207
 
221
- if not author_name.is_none():
222
- author_tbl["name"] = author_name.get_str()
223
- if not author_email.is_none():
224
- author_tbl["email"] = author_email.get_str()
208
+ if not author_name.is_none():
209
+ author_tbl["name"] = author_name.get_str()
210
+ if not author_email.is_none():
211
+ author_tbl["email"] = author_email.get_str()
225
212
 
226
- authors_arr.append(author_tbl)
227
- project_tbl["authors"] = authors_arr
213
+ authors_arr.append(author_tbl)
214
+ project_tbl["authors"] = authors_arr
228
215
 
229
216
  # Add classifiers (standard Python package metadata)
230
217
  project_tbl["classifiers"] = [
@@ -234,14 +221,11 @@ class PythonPackageTomlFile(TomlFile):
234
221
  ]
235
222
 
236
223
  # Add README if it exists
237
- if package:
238
- pass
239
-
240
- readme_file = package.find_by_name(APP_PATH_README)
241
- if readme_file:
242
- readme_tbl, _ = toml_ensure_table(project_tbl, ["readme"])
243
- readme_tbl["file"] = str(APP_PATH_README)
244
- readme_tbl["content-type"] = "text/markdown"
224
+ readme_file = workdir.find_by_name(APP_PATH_README)
225
+ if readme_file:
226
+ readme_tbl, _ = toml_ensure_table(project_tbl, ["readme"])
227
+ readme_tbl["file"] = str(APP_PATH_README)
228
+ readme_tbl["content-type"] = "text/markdown"
245
229
 
246
230
  # Add MIT license
247
231
  license_tbl, _ = toml_ensure_table(project_tbl, ["license"])
@@ -305,7 +289,6 @@ class PythonPackageTomlFile(TomlFile):
305
289
 
306
290
  toml_sort_string_array(dev_arr)
307
291
 
308
- # --- Unified dependency accessors (runtime vs optional) ---
309
292
  def _get_deps_array(self, optional: bool = False, group: str = "dev"):
310
293
  """Return TOML array for runtime deps or optional group (multiline)."""
311
294
  return (