gitbolt 0.0.0.dev8__py3-none-any.whl → 0.0.0.dev9__py3-none-any.whl

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.
gitbolt/base.py CHANGED
@@ -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,
gitbolt/models.py CHANGED
@@ -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.dev8
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,7 +26,7 @@ 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
29
+ Requires-Dist: vt-err-hndlr>=0.0.0dev1
30
30
  Provides-Extra: pygit2
31
31
  Requires-Dist: pygit2; extra == "pygit2"
32
32
  Provides-Extra: test
@@ -62,6 +62,7 @@ Dynamic: license-file
62
62
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
63
63
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
64
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.
65
66
 
66
67
  ---
67
68
 
@@ -140,6 +141,53 @@ status_out = git.status_subcmd.status()
140
141
  print(status_out)
141
142
  ```
142
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
+
143
191
  ---
144
192
 
145
193
  ## 🧠 Strong Typing Everywhere
@@ -325,3 +373,4 @@ Transformers for formatting/parsing can be added later.
325
373
 
326
374
  * Support `pygit2` for direct, fast Git access.
327
375
  * Enable `porcelain` support using `pygit2` where required.
376
+ > `pygit2` usage will automatically make all commands return in porcelain mode.
@@ -1,18 +1,18 @@
1
1
  gitbolt/__init__.py,sha256=SyV-PMv4Ul_k8sh7Y76Y4hUku1N5s-4ViyDpVbfRDOI,1176
2
2
  gitbolt/_internal_init.py,sha256=alSsIMgBWHmOdUo7P1ewftR12xPv8vb3ZgECuVsRMwk,485
3
3
  gitbolt/add.py,sha256=F16d0SQfLrjbpUzJIjKFwGU4KLSjqtYLOA9oZ5gdNS0,31731
4
- gitbolt/base.py,sha256=Vhd4GkTu3OscngXRJVfUMxVDY5Ilu6WVZvuhNw4dgFA,9649
4
+ gitbolt/base.py,sha256=KIWqAVaTUzKfcsfiWY5NXGrZ-WSeBkGvo_pk86mpWEs,9771
5
5
  gitbolt/constants.py,sha256=DTdG44PiJ-2XbScPcvvUOMGVDjddH-j7pORO42fjgiE,206
6
6
  gitbolt/exceptions.py,sha256=7YvR7whZYM1hlWZk4GxHbeNgJ0KJXElg5VFA1Vi-fiA,989
7
7
  gitbolt/ls_tree.py,sha256=PrDSoh4Pnqh6g4AfX8kwgez_zHYaH4yqknULbFbisUY,6269
8
- gitbolt/models.py,sha256=iwIO-ugHYiKS57I_LPo3uDFEQlAtu2mnn5AjZHHQg04,18828
8
+ gitbolt/models.py,sha256=ExIYraiqD_WlwouUady0UtnZ8Vi9FlkzOZkWoCmOMz4,19040
9
9
  gitbolt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  gitbolt/pytest_plugin.py,sha256=Gto30Ofmfz8kJ_AuBrEhqENmWoDlpMnsrpQWzHDmUi4,833
11
11
  gitbolt/utils.py,sha256=XftX3LIKtfzjQaUZUF3QYaFJFM-QdFjc05ZrZSMSdeM,6315
12
12
  gitbolt/git_subprocess/__init__.py,sha256=yEyJKH_iXFBkdgQMwE8vnHnhVTrjs2RkQUjUCF25SzU,590
13
13
  gitbolt/git_subprocess/_internal_init.py,sha256=C6jfsbjXhIFHaDH9GE-wLPAN9WMlUU57rRLWvfpZuAs,255
14
14
  gitbolt/git_subprocess/add.py,sha256=1PA9XonqFi2O941eBwIPMobSNgEJ0tgFYxlkVXSe1K4,17277
15
- gitbolt/git_subprocess/base.py,sha256=iAL_aFiywqbZGuPHTqY03ve5O0bYkdyLzmdzc30mM4E,17756
15
+ gitbolt/git_subprocess/base.py,sha256=1tXy5kgmY_2e6jofuqEFY0y-yXTSgGD5SF7hwoMr4xU,18075
16
16
  gitbolt/git_subprocess/constants.py,sha256=3qHXbNjPf_DOhTPNHi3_bcvIpvtqvgFtpGoTJLYmTWk,250
17
17
  gitbolt/git_subprocess/exceptions.py,sha256=cx4YKzxeBRSRKoF-oakZLpFUGrAHiGj1FtMIsiK5oHc,4063
18
18
  gitbolt/git_subprocess/ls_tree.py,sha256=MmM3qh-kvkD_tGQG9yliLx-reY_5TIVEArvAXJN6rP4,13200
@@ -22,9 +22,9 @@ gitbolt/git_subprocess/impl/simple.py,sha256=sjdby07SlLfdKpGlLedN9nYEAWxkGqy-rlJ
22
22
  gitbolt/git_subprocess/runner/__init__.py,sha256=LPxbj3AwKLXyDxxCLwAVtl5b5SKjaNDj99lkKz6VSOU,177
23
23
  gitbolt/git_subprocess/runner/base.py,sha256=Sof2WaNyYULiObRF7WjaGs7-yGrdyeHUXchE2tg1820,1562
24
24
  gitbolt/git_subprocess/runner/simple_impl.py,sha256=JvKCQ_MITguuMn3f3hVQwfAukymkIqFdli5f2fxin54,2524
25
- gitbolt-0.0.0.dev8.dist-info/licenses/LICENSE,sha256=pOzr5bMWS6mHi3vro8d5vw0qW1i14rVq2XFrDuystVY,11372
26
- gitbolt-0.0.0.dev8.dist-info/METADATA,sha256=sioQ-E59oXr5auqJiY0iOJNrI_1rBiSBtHDQ4_ZtGmE,11287
27
- gitbolt-0.0.0.dev8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- gitbolt-0.0.0.dev8.dist-info/entry_points.txt,sha256=Q078Wjss4skreUs8hzAEJ8sUcH4Rhjc9emZ4jRXCiBM,52
29
- gitbolt-0.0.0.dev8.dist-info/top_level.txt,sha256=QCXclkzSPZjgamcwB6XuKJexaJ1as_TLUUSGdIDA7VY,8
30
- gitbolt-0.0.0.dev8.dist-info/RECORD,,
25
+ gitbolt-0.0.0.dev9.dist-info/licenses/LICENSE,sha256=pOzr5bMWS6mHi3vro8d5vw0qW1i14rVq2XFrDuystVY,11372
26
+ gitbolt-0.0.0.dev9.dist-info/METADATA,sha256=_XD_9kFZ2UrJT6apE-rKe_CUnbi6HAmZB0vEp3jdv94,12710
27
+ gitbolt-0.0.0.dev9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ gitbolt-0.0.0.dev9.dist-info/entry_points.txt,sha256=Q078Wjss4skreUs8hzAEJ8sUcH4Rhjc9emZ4jRXCiBM,52
29
+ gitbolt-0.0.0.dev9.dist-info/top_level.txt,sha256=QCXclkzSPZjgamcwB6XuKJexaJ1as_TLUUSGdIDA7VY,8
30
+ gitbolt-0.0.0.dev9.dist-info/RECORD,,