wexample-helpers-git 0.2.0__tar.gz → 6.1.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 (15) hide show
  1. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/PKG-INFO +153 -2
  2. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/README.md +151 -0
  3. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/pyproject.toml +2 -2
  4. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/helpers/git.py +7 -10
  5. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/__init__.py +0 -0
  6. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/__pycache__/__init__.py +0 -0
  7. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/const/__init__.py +0 -0
  8. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/const/common.py +0 -0
  9. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/helpers/__init__.py +0 -0
  10. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/helpers/__pycache__/__init__.py +0 -0
  11. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/helpers/git_retryable_callback_manager.py +0 -0
  12. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/helpers/repo.py +0 -0
  13. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/src/wexample_helpers_git/py.typed +0 -0
  14. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/tests/helpers/__init__.py +0 -0
  15. {wexample_helpers_git-0.2.0 → wexample_helpers_git-6.1.0}/tests/helpers/test_helper_git.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wexample-helpers-git
3
- Version: 0.2.0
3
+ Version: 6.1.0
4
4
  Summary: Some python basic helpers for git.
5
5
  Author-Email: weeger <contact@wexample.com>
6
6
  License: MIT
@@ -12,7 +12,7 @@ Requires-Python: >=3.10
12
12
  Requires-Dist: attrs>=23.1.0
13
13
  Requires-Dist: cattrs>=23.1.0
14
14
  Requires-Dist: gitpython
15
- Requires-Dist: wexample-helpers>=2.0.0
15
+ Requires-Dist: wexample-helpers>=6.7.0
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest; extra == "dev"
18
18
  Requires-Dist: pytest-cov; extra == "dev"
@@ -20,6 +20,127 @@ Description-Content-Type: text/markdown
20
20
 
21
21
  # helpers_git
22
22
 
23
+ Version: 6.1.0
24
+
25
+ Some python basic helpers for git.
26
+
27
+ ## Table of Contents
28
+
29
+ - [Tests](#tests)
30
+ - [Suite Integration](#suite-integration)
31
+ - [Dependencies](#dependencies)
32
+ - [Versioning](#versioning)
33
+ - [License](#license)
34
+ - [Suite Integration](#suite-integration)
35
+ - [Suite Signature](#suite-signature)
36
+ - [Introduction](#introduction)
37
+ - [Roadmap](#roadmap)
38
+ - [Status Compatibility](#status-compatibility)
39
+ - [Useful Links](#useful-links)
40
+ - [Migration Notes](#migration-notes)
41
+
42
+ ## Tests
43
+
44
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
45
+
46
+ ### Installation
47
+
48
+ First, install the required testing dependencies:
49
+ ```bash
50
+ .venv/bin/python -m pip install pytest pytest-cov
51
+ ```
52
+
53
+ ### Basic Usage
54
+
55
+ Run all tests with coverage:
56
+ ```bash
57
+ .venv/bin/python -m pytest --cov --cov-report=html
58
+ ```
59
+
60
+ ### Common Commands
61
+ ```bash
62
+ # Run tests with coverage for a specific module
63
+ .venv/bin/python -m pytest --cov=your_module
64
+
65
+ # Show which lines are not covered
66
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
67
+
68
+ # Generate an HTML coverage report
69
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
70
+
71
+ # Combine terminal and HTML reports
72
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
73
+
74
+ # Run specific test file with coverage
75
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
76
+ ```
77
+
78
+ ### Viewing HTML Reports
79
+
80
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
81
+
82
+ ### Coverage Threshold
83
+
84
+ To enforce a minimum coverage percentage:
85
+ ```bash
86
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
87
+ ```
88
+
89
+ This will cause the test suite to fail if coverage drops below 80%.
90
+
91
+ ## Integration in the Suite
92
+
93
+ 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.
94
+
95
+ ### Related Packages
96
+
97
+ The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
98
+
99
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
100
+
101
+ ## Dependencies
102
+
103
+ - attrs: >=23.1.0
104
+ - cattrs: >=23.1.0
105
+ - gitpython:
106
+ - wexample-helpers: >=6.7.0
107
+
108
+ ## Versioning & Compatibility Policy
109
+
110
+ Wexample packages follow **Semantic Versioning** (SemVer):
111
+
112
+ - **MAJOR**: Breaking changes
113
+ - **MINOR**: New features, backward compatible
114
+ - **PATCH**: Bug fixes, backward compatible
115
+
116
+ We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
117
+
118
+ ## License
119
+
120
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
121
+
122
+ Free to use in both personal and commercial projects.
123
+
124
+ ## Integration in the Suite
125
+
126
+ 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.
127
+
128
+ ### Related Packages
129
+
130
+ The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
131
+
132
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
133
+
134
+ # About us
135
+
136
+ [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.
137
+
138
+ 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.
139
+
140
+ Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
141
+
142
+ # helpers_git
143
+
23
144
  Version: 0.2.0
24
145
 
25
146
  Some python basic helpers for git.
@@ -170,3 +291,33 @@ See the [project roadmap](https://github.com/wexample/python-helpers_git/issues)
170
291
  When upgrading between major versions, refer to the migration guides in the documentation.
171
292
 
172
293
  Breaking changes are clearly documented with upgrade paths and examples.
294
+
295
+ ## Known Limitations & Roadmap
296
+
297
+ Current limitations and planned features are tracked in the GitHub issues.
298
+
299
+ See the [project roadmap](https://github.com/wexample/python-helpers_git/issues) for upcoming features and improvements.
300
+
301
+ ## Status & Compatibility
302
+
303
+ **Maturity**: Production-ready
304
+
305
+ **Python Support**: >=3.10
306
+
307
+ **OS Support**: Linux, macOS, Windows
308
+
309
+ **Status**: Actively maintained
310
+
311
+ ## Useful Links
312
+
313
+ - **Homepage**: https://github.com/wexample/python-helpers-git
314
+ - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
315
+ - **Issue Tracker**: https://github.com/wexample/python-helpers-git/issues
316
+ - **Discussions**: https://github.com/wexample/python-helpers-git/discussions
317
+ - **PyPI**: [pypi.org/project/helpers_git](https://pypi.org/project/helpers_git/)
318
+
319
+ ## Migration Notes
320
+
321
+ When upgrading between major versions, refer to the migration guides in the documentation.
322
+
323
+ Breaking changes are clearly documented with upgrade paths and examples.
@@ -1,5 +1,126 @@
1
1
  # helpers_git
2
2
 
3
+ Version: 6.1.0
4
+
5
+ Some python basic helpers for git.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Tests](#tests)
10
+ - [Suite Integration](#suite-integration)
11
+ - [Dependencies](#dependencies)
12
+ - [Versioning](#versioning)
13
+ - [License](#license)
14
+ - [Suite Integration](#suite-integration)
15
+ - [Suite Signature](#suite-signature)
16
+ - [Introduction](#introduction)
17
+ - [Roadmap](#roadmap)
18
+ - [Status Compatibility](#status-compatibility)
19
+ - [Useful Links](#useful-links)
20
+ - [Migration Notes](#migration-notes)
21
+
22
+ ## Tests
23
+
24
+ This project uses `pytest` for testing and `pytest-cov` for code coverage analysis.
25
+
26
+ ### Installation
27
+
28
+ First, install the required testing dependencies:
29
+ ```bash
30
+ .venv/bin/python -m pip install pytest pytest-cov
31
+ ```
32
+
33
+ ### Basic Usage
34
+
35
+ Run all tests with coverage:
36
+ ```bash
37
+ .venv/bin/python -m pytest --cov --cov-report=html
38
+ ```
39
+
40
+ ### Common Commands
41
+ ```bash
42
+ # Run tests with coverage for a specific module
43
+ .venv/bin/python -m pytest --cov=your_module
44
+
45
+ # Show which lines are not covered
46
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing
47
+
48
+ # Generate an HTML coverage report
49
+ .venv/bin/python -m pytest --cov=your_module --cov-report=html
50
+
51
+ # Combine terminal and HTML reports
52
+ .venv/bin/python -m pytest --cov=your_module --cov-report=term-missing --cov-report=html
53
+
54
+ # Run specific test file with coverage
55
+ .venv/bin/python -m pytest tests/test_file.py --cov=your_module --cov-report=term-missing
56
+ ```
57
+
58
+ ### Viewing HTML Reports
59
+
60
+ After generating an HTML report, open `htmlcov/index.html` in your browser to view detailed line-by-line coverage information.
61
+
62
+ ### Coverage Threshold
63
+
64
+ To enforce a minimum coverage percentage:
65
+ ```bash
66
+ .venv/bin/python -m pytest --cov=your_module --cov-fail-under=80
67
+ ```
68
+
69
+ This will cause the test suite to fail if coverage drops below 80%.
70
+
71
+ ## Integration in the Suite
72
+
73
+ 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.
74
+
75
+ ### Related Packages
76
+
77
+ The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
78
+
79
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
80
+
81
+ ## Dependencies
82
+
83
+ - attrs: >=23.1.0
84
+ - cattrs: >=23.1.0
85
+ - gitpython:
86
+ - wexample-helpers: >=6.7.0
87
+
88
+ ## Versioning & Compatibility Policy
89
+
90
+ Wexample packages follow **Semantic Versioning** (SemVer):
91
+
92
+ - **MAJOR**: Breaking changes
93
+ - **MINOR**: New features, backward compatible
94
+ - **PATCH**: Bug fixes, backward compatible
95
+
96
+ We maintain backward compatibility within major versions and provide clear migration guides for breaking changes.
97
+
98
+ ## License
99
+
100
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
101
+
102
+ Free to use in both personal and commercial projects.
103
+
104
+ ## Integration in the Suite
105
+
106
+ 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.
107
+
108
+ ### Related Packages
109
+
110
+ The suite includes packages for configuration management, file handling, prompts, and more. Each package can be used independently or as part of the integrated suite.
111
+
112
+ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the complete package ecosystem.
113
+
114
+ # About us
115
+
116
+ [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.
117
+
118
+ 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.
119
+
120
+ Wexample cultivates a culture of mastery. Each package, each contribution carries the mark of a community that values precision, ethics, and innovation — a community proud to shape the future of digital craftsmanship.
121
+
122
+ # helpers_git
123
+
3
124
  Version: 0.2.0
4
125
 
5
126
  Some python basic helpers for git.
@@ -150,3 +271,33 @@ See the [project roadmap](https://github.com/wexample/python-helpers_git/issues)
150
271
  When upgrading between major versions, refer to the migration guides in the documentation.
151
272
 
152
273
  Breaking changes are clearly documented with upgrade paths and examples.
274
+
275
+ ## Known Limitations & Roadmap
276
+
277
+ Current limitations and planned features are tracked in the GitHub issues.
278
+
279
+ See the [project roadmap](https://github.com/wexample/python-helpers_git/issues) for upcoming features and improvements.
280
+
281
+ ## Status & Compatibility
282
+
283
+ **Maturity**: Production-ready
284
+
285
+ **Python Support**: >=3.10
286
+
287
+ **OS Support**: Linux, macOS, Windows
288
+
289
+ **Status**: Actively maintained
290
+
291
+ ## Useful Links
292
+
293
+ - **Homepage**: https://github.com/wexample/python-helpers-git
294
+ - **Documentation**: [docs.wexample.com](https://docs.wexample.com)
295
+ - **Issue Tracker**: https://github.com/wexample/python-helpers-git/issues
296
+ - **Discussions**: https://github.com/wexample/python-helpers-git/discussions
297
+ - **PyPI**: [pypi.org/project/helpers_git](https://pypi.org/project/helpers_git/)
298
+
299
+ ## Migration Notes
300
+
301
+ When upgrading between major versions, refer to the migration guides in the documentation.
302
+
303
+ Breaking changes are clearly documented with upgrade paths and examples.
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "wexample-helpers-git"
9
- version = "0.2.0"
9
+ version = "6.1.0"
10
10
  description = "Some python basic helpers for git."
11
11
  authors = [
12
12
  { name = "weeger", email = "contact@wexample.com" },
@@ -21,7 +21,7 @@ dependencies = [
21
21
  "attrs>=23.1.0",
22
22
  "cattrs>=23.1.0",
23
23
  "gitpython",
24
- "wexample-helpers>=2.0.0",
24
+ "wexample-helpers>=6.7.0",
25
25
  ]
26
26
 
27
27
  [project.readme]
@@ -77,7 +77,6 @@ def git_ensure_upstream(
77
77
  Returns the upstream (e.g., "origin/main").
78
78
  """
79
79
  from wexample_helpers.helpers.file import file_resolve_path
80
- from wexample_helpers.helpers.shell import shell_run
81
80
 
82
81
  cwd_resolved = file_resolve_path(cwd)
83
82
  branch = git_current_branch(cwd=cwd_resolved, inherit_stdio=False)
@@ -96,8 +95,8 @@ def git_ensure_upstream(
96
95
  upstream = f"{default_remote}/{branch}"
97
96
  except Exception:
98
97
  # Remote branch likely does not exist yet; create it and set upstream in one go.
99
- shell_run(
100
- ["git", "push", "-u", default_remote, branch],
98
+ git_run(
99
+ ["push", "-u", default_remote, branch],
101
100
  inherit_stdio=inherit_stdio,
102
101
  cwd=cwd_resolved,
103
102
  retries=3,
@@ -235,10 +234,9 @@ def git_pull_rebase_autostash(
235
234
  ) -> None:
236
235
  """Pull latest changes with rebase and autostash to preserve local modifications."""
237
236
  from wexample_helpers.helpers.file import file_resolve_path
238
- from wexample_helpers.helpers.shell import shell_run
239
237
 
240
- shell_run(
241
- ["git", "pull", "--rebase", "--autostash"],
238
+ git_run(
239
+ ["pull", "--rebase", "--autostash"],
242
240
  inherit_stdio=inherit_stdio,
243
241
  cwd=file_resolve_path(cwd),
244
242
  retries=3,
@@ -336,10 +334,9 @@ def git_push_tag(
336
334
  ) -> ShellResult:
337
335
  """Push a specific tag to the remote."""
338
336
  from wexample_helpers.helpers.file import file_resolve_path
339
- from wexample_helpers.helpers.shell import shell_run
340
337
 
341
- return shell_run(
342
- ["git", "push", (remote or "origin"), tag],
338
+ return git_run(
339
+ ["push", (remote or "origin"), tag],
343
340
  inherit_stdio=inherit_stdio,
344
341
  cwd=file_resolve_path(cwd),
345
342
  retries=3,
@@ -378,7 +375,7 @@ def git_set_upstream(
378
375
  "git",
379
376
  "branch",
380
377
  "--set-upstream-to",
381
- f"{(remote or "origin")}/{branch}",
378
+ f"{(remote or 'origin')}/{branch}",
382
379
  branch,
383
380
  ],
384
381
  inherit_stdio=inherit_stdio,