gitbolt 0.0.0.dev7__tar.gz → 0.0.0.dev9__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 (36) hide show
  1. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/PKG-INFO +53 -3
  2. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/README.md +49 -0
  3. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/pyproject.toml +4 -4
  4. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/base.py +2 -0
  5. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/base.py +4 -0
  6. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/models.py +12 -0
  7. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt.egg-info/PKG-INFO +53 -3
  8. gitbolt-0.0.0.dev9/src/gitbolt.egg-info/requires.txt +7 -0
  9. gitbolt-0.0.0.dev7/src/gitbolt.egg-info/requires.txt +0 -5
  10. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/LICENSE +0 -0
  11. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/setup.cfg +0 -0
  12. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/__init__.py +0 -0
  13. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/_internal_init.py +0 -0
  14. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/add.py +0 -0
  15. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/constants.py +0 -0
  16. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/exceptions.py +0 -0
  17. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/__init__.py +0 -0
  18. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/_internal_init.py +0 -0
  19. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/add.py +0 -0
  20. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/constants.py +0 -0
  21. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/exceptions.py +0 -0
  22. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/impl/__init__.py +0 -0
  23. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/impl/simple.py +0 -0
  24. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/ls_tree.py +0 -0
  25. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/runner/__init__.py +0 -0
  26. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/runner/base.py +0 -0
  27. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/runner/simple_impl.py +0 -0
  28. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/git_subprocess/utils.py +0 -0
  29. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/ls_tree.py +0 -0
  30. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/py.typed +0 -0
  31. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/pytest_plugin.py +0 -0
  32. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt/utils.py +0 -0
  33. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt.egg-info/SOURCES.txt +0 -0
  34. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt.egg-info/dependency_links.txt +0 -0
  35. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt.egg-info/entry_points.txt +0 -0
  36. {gitbolt-0.0.0.dev7 → gitbolt-0.0.0.dev9}/src/gitbolt.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitbolt
3
- Version: 0.0.0.dev7
3
+ Version: 0.0.0.dev9
4
4
  Summary: Fast, flexible and type-safe Git commands in Python.
5
5
  Author-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
6
6
  Maintainer-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
@@ -26,10 +26,11 @@ Classifier: Typing :: Typed
26
26
  Requires-Python: >=3.12
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE
29
- Requires-Dist: vt-err-hndlr==0.0.0dev1
30
- Requires-Dist: pytest
29
+ Requires-Dist: vt-err-hndlr>=0.0.0dev1
31
30
  Provides-Extra: pygit2
32
31
  Requires-Dist: pygit2; extra == "pygit2"
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest; extra == "test"
33
34
  Dynamic: license-file
34
35
 
35
36
  # 🚀 Gitbolt
@@ -61,6 +62,7 @@ Dynamic: license-file
61
62
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
62
63
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
63
64
  * 🧼 **Idiomatic Python:** Write commands in idiomatic Python at compile-time and be confident they’ll execute smoothly at runtime.
65
+ * 🎀 **Add-ons:** Special features provided to ease programming with git. These can be added if required.
64
66
 
65
67
  ---
66
68
 
@@ -139,6 +141,53 @@ status_out = git.status_subcmd.status()
139
141
  print(status_out)
140
142
  ```
141
143
 
144
+ ### 🪼 Modular Architecture
145
+
146
+ #### 🧑‍💻 Modular at the programmatic level
147
+
148
+ Commands are designed to be passed around as objects. This makes them modular and thus users can opt to use only
149
+ particular commands.
150
+
151
+ ```python
152
+ from gitbolt import get_git
153
+
154
+ git = get_git() # get git object for the current working directory
155
+ add_subcmd = git.add_subcmd
156
+ ls_tree_subcmd = git.ls_tree_subcmd
157
+
158
+ # now, functions can be written to accept only the required subcommands and nothing more than that.
159
+ ```
160
+
161
+ #### 📽️ Modular at project level
162
+
163
+ Only required commands and hence their implementations can be installed as per user requirement.
164
+
165
+ e.g.
166
+
167
+ - To install only the `git add` command related logic:
168
+ - ```shell
169
+ pip install gitbolt[add]
170
+ ```
171
+ - To install command logic related to `git add` and `git rm` commands:
172
+ - ```shell
173
+ pip install gitbolt[add,rm]
174
+ ```
175
+ - Install all porcelain related commands:
176
+ - ```shell
177
+ pip install gitbolt[porcelain]
178
+ ```
179
+ - Install high performance `pygit2` implementations:
180
+ - ```shell
181
+ pip install gitbolt[pygit2]
182
+ ```
183
+ - ```shell
184
+ pip install gitbolt[add,pygit2,rm]
185
+ ```
186
+ - At last, install every command's implementation:
187
+ - ```shell
188
+ pip install gitbolt[all]
189
+ ```
190
+
142
191
  ---
143
192
 
144
193
  ## 🧠 Strong Typing Everywhere
@@ -324,3 +373,4 @@ Transformers for formatting/parsing can be added later.
324
373
 
325
374
  * Support `pygit2` for direct, fast Git access.
326
375
  * Enable `porcelain` support using `pygit2` where required.
376
+ > `pygit2` usage will automatically make all commands return in porcelain mode.
@@ -27,6 +27,7 @@
27
27
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
28
28
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
29
29
  * 🧼 **Idiomatic Python:** Write commands in idiomatic Python at compile-time and be confident they’ll execute smoothly at runtime.
30
+ * 🎀 **Add-ons:** Special features provided to ease programming with git. These can be added if required.
30
31
 
31
32
  ---
32
33
 
@@ -105,6 +106,53 @@ status_out = git.status_subcmd.status()
105
106
  print(status_out)
106
107
  ```
107
108
 
109
+ ### 🪼 Modular Architecture
110
+
111
+ #### 🧑‍💻 Modular at the programmatic level
112
+
113
+ Commands are designed to be passed around as objects. This makes them modular and thus users can opt to use only
114
+ particular commands.
115
+
116
+ ```python
117
+ from gitbolt import get_git
118
+
119
+ git = get_git() # get git object for the current working directory
120
+ add_subcmd = git.add_subcmd
121
+ ls_tree_subcmd = git.ls_tree_subcmd
122
+
123
+ # now, functions can be written to accept only the required subcommands and nothing more than that.
124
+ ```
125
+
126
+ #### 📽️ Modular at project level
127
+
128
+ Only required commands and hence their implementations can be installed as per user requirement.
129
+
130
+ e.g.
131
+
132
+ - To install only the `git add` command related logic:
133
+ - ```shell
134
+ pip install gitbolt[add]
135
+ ```
136
+ - To install command logic related to `git add` and `git rm` commands:
137
+ - ```shell
138
+ pip install gitbolt[add,rm]
139
+ ```
140
+ - Install all porcelain related commands:
141
+ - ```shell
142
+ pip install gitbolt[porcelain]
143
+ ```
144
+ - Install high performance `pygit2` implementations:
145
+ - ```shell
146
+ pip install gitbolt[pygit2]
147
+ ```
148
+ - ```shell
149
+ pip install gitbolt[add,pygit2,rm]
150
+ ```
151
+ - At last, install every command's implementation:
152
+ - ```shell
153
+ pip install gitbolt[all]
154
+ ```
155
+
108
156
  ---
109
157
 
110
158
  ## 🧠 Strong Typing Everywhere
@@ -290,3 +338,4 @@ Transformers for formatting/parsing can be added later.
290
338
 
291
339
  * Support `pygit2` for direct, fast Git access.
292
340
  * Enable `porcelain` support using `pygit2` where required.
341
+ > `pygit2` usage will automatically make all commands return in porcelain mode.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gitbolt"
3
- version = "0.0.0dev7"
3
+ version = "0.0.0dev9"
4
4
  description = "Fast, flexible and type-safe Git commands in Python."
5
5
  requires-python = ">=3.12"
6
6
  readme = "README.md"
@@ -36,19 +36,19 @@ classifiers = [
36
36
  "Typing :: Typed"
37
37
  ]
38
38
  dependencies = [
39
- "vt-err-hndlr == 0.0.0dev1",
40
- "pytest"
39
+ "vt-err-hndlr >= 0.0.0dev1"
41
40
  ]
42
41
 
43
42
  [project.optional-dependencies]
44
43
  pygit2 = ['pygit2']
44
+ test = ['pytest']
45
45
 
46
46
  [dependency-groups]
47
47
  # TODO: report the mypy recent version (1.16.0, 1.16.1 issue) RuntimeError: ('Not implemented', <class 'mypy.types.TypeGuardedType'>)
48
48
  # btw, this error doesn't show in the latest developer version. So, this error will go away with 1.17.0 relase
49
49
  dev = ["mypy==1.15.0", "ruff"]
50
50
  doc = ['sphinx', 'sphinx-argparse']
51
- test = ['pytest-cov']
51
+ test = ["pytest", 'pytest-cov']
52
52
  multitest = ['tox']
53
53
 
54
54
 
@@ -154,6 +154,8 @@ class Add(GitSubCommand, RootDirOp, Protocol):
154
154
  Interface for ``git add`` command.
155
155
  """
156
156
 
157
+ # TODO: `pathspec: str` -> `pathspec_or_path: str | Path`.
158
+ # This will make a convenience method for python use.
157
159
  @overload
158
160
  @abstractmethod
159
161
  def add(
@@ -459,6 +459,10 @@ class UncheckedSubcmd(GitSubcmdCommand, RootDirOp, Protocol):
459
459
  def _subcmd_from_git(self, git: "Git") -> Self:
460
460
  return self
461
461
 
462
+ # TODO: the static type-safety of `run()` is not correct.
463
+ # `run([..], text=True, _input=b'<some-str>')` is incorrect
464
+ # as this should raise static-type check safety issue because text=True and _input is bytes. Similarly
465
+ # `run([..], text=False, _input='<some-bytes>')` does not raise issue as well.
462
466
  @overload
463
467
  def run(
464
468
  self,
@@ -368,6 +368,17 @@ class GitLogEnvVars(TypedDict, total=False):
368
368
  """
369
369
 
370
370
 
371
+ class GitGPGEnvVars(TypedDict, total=False):
372
+ """
373
+ Environment variables related to GPG and git.
374
+ """
375
+
376
+ GNUPGHOME: Path
377
+ """
378
+ GPG will use this path for operations.
379
+ """
380
+
381
+
371
382
  class GitEnvVars(
372
383
  GitCommitEnvVars,
373
384
  GitEditorEnvVars,
@@ -377,6 +388,7 @@ class GitEnvVars(
377
388
  GitRepoEnvVars,
378
389
  GitNetworkEnvVars,
379
390
  GitSysEnvVars,
391
+ GitGPGEnvVars,
380
392
  ):
381
393
  """
382
394
  Environment variables that control Git's runtime behavior.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitbolt
3
- Version: 0.0.0.dev7
3
+ Version: 0.0.0.dev9
4
4
  Summary: Fast, flexible and type-safe Git commands in Python.
5
5
  Author-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
6
6
  Maintainer-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
@@ -26,10 +26,11 @@ Classifier: Typing :: Typed
26
26
  Requires-Python: >=3.12
27
27
  Description-Content-Type: text/markdown
28
28
  License-File: LICENSE
29
- Requires-Dist: vt-err-hndlr==0.0.0dev1
30
- Requires-Dist: pytest
29
+ Requires-Dist: vt-err-hndlr>=0.0.0dev1
31
30
  Provides-Extra: pygit2
32
31
  Requires-Dist: pygit2; extra == "pygit2"
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest; extra == "test"
33
34
  Dynamic: license-file
34
35
 
35
36
  # 🚀 Gitbolt
@@ -61,6 +62,7 @@ Dynamic: license-file
61
62
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
62
63
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
63
64
  * 🧼 **Idiomatic Python:** Write commands in idiomatic Python at compile-time and be confident they’ll execute smoothly at runtime.
65
+ * 🎀 **Add-ons:** Special features provided to ease programming with git. These can be added if required.
64
66
 
65
67
  ---
66
68
 
@@ -139,6 +141,53 @@ status_out = git.status_subcmd.status()
139
141
  print(status_out)
140
142
  ```
141
143
 
144
+ ### 🪼 Modular Architecture
145
+
146
+ #### 🧑‍💻 Modular at the programmatic level
147
+
148
+ Commands are designed to be passed around as objects. This makes them modular and thus users can opt to use only
149
+ particular commands.
150
+
151
+ ```python
152
+ from gitbolt import get_git
153
+
154
+ git = get_git() # get git object for the current working directory
155
+ add_subcmd = git.add_subcmd
156
+ ls_tree_subcmd = git.ls_tree_subcmd
157
+
158
+ # now, functions can be written to accept only the required subcommands and nothing more than that.
159
+ ```
160
+
161
+ #### 📽️ Modular at project level
162
+
163
+ Only required commands and hence their implementations can be installed as per user requirement.
164
+
165
+ e.g.
166
+
167
+ - To install only the `git add` command related logic:
168
+ - ```shell
169
+ pip install gitbolt[add]
170
+ ```
171
+ - To install command logic related to `git add` and `git rm` commands:
172
+ - ```shell
173
+ pip install gitbolt[add,rm]
174
+ ```
175
+ - Install all porcelain related commands:
176
+ - ```shell
177
+ pip install gitbolt[porcelain]
178
+ ```
179
+ - Install high performance `pygit2` implementations:
180
+ - ```shell
181
+ pip install gitbolt[pygit2]
182
+ ```
183
+ - ```shell
184
+ pip install gitbolt[add,pygit2,rm]
185
+ ```
186
+ - At last, install every command's implementation:
187
+ - ```shell
188
+ pip install gitbolt[all]
189
+ ```
190
+
142
191
  ---
143
192
 
144
193
  ## 🧠 Strong Typing Everywhere
@@ -324,3 +373,4 @@ Transformers for formatting/parsing can be added later.
324
373
 
325
374
  * Support `pygit2` for direct, fast Git access.
326
375
  * Enable `porcelain` support using `pygit2` where required.
376
+ > `pygit2` usage will automatically make all commands return in porcelain mode.
@@ -0,0 +1,7 @@
1
+ vt-err-hndlr>=0.0.0dev1
2
+
3
+ [pygit2]
4
+ pygit2
5
+
6
+ [test]
7
+ pytest
@@ -1,5 +0,0 @@
1
- vt-err-hndlr==0.0.0dev1
2
- pytest
3
-
4
- [pygit2]
5
- pygit2
File without changes
File without changes