gitbolt 0.0.0.dev8__tar.gz → 0.0.0.dev10__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.dev8 → gitbolt-0.0.0.dev10}/PKG-INFO +52 -2
  2. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/README.md +49 -0
  3. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/pyproject.toml +3 -2
  4. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/base.py +2 -0
  5. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/base.py +4 -0
  6. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/impl/simple.py +3 -1
  7. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/models.py +12 -0
  8. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt.egg-info/PKG-INFO +52 -2
  9. gitbolt-0.0.0.dev10/src/gitbolt.egg-info/requires.txt +8 -0
  10. gitbolt-0.0.0.dev8/src/gitbolt.egg-info/requires.txt +0 -7
  11. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/LICENSE +0 -0
  12. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/setup.cfg +0 -0
  13. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/__init__.py +0 -0
  14. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/_internal_init.py +0 -0
  15. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/add.py +0 -0
  16. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/constants.py +0 -0
  17. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/exceptions.py +0 -0
  18. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/__init__.py +0 -0
  19. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/_internal_init.py +0 -0
  20. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/add.py +0 -0
  21. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/constants.py +0 -0
  22. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/exceptions.py +0 -0
  23. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/impl/__init__.py +0 -0
  24. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/ls_tree.py +0 -0
  25. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/runner/__init__.py +0 -0
  26. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/runner/base.py +0 -0
  27. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/runner/simple_impl.py +0 -0
  28. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/git_subprocess/utils.py +0 -0
  29. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/ls_tree.py +0 -0
  30. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/py.typed +0 -0
  31. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/pytest_plugin.py +0 -0
  32. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt/utils.py +0 -0
  33. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt.egg-info/SOURCES.txt +0 -0
  34. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt.egg-info/dependency_links.txt +0 -0
  35. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/src/gitbolt.egg-info/entry_points.txt +0 -0
  36. {gitbolt-0.0.0.dev8 → gitbolt-0.0.0.dev10}/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.dev8
3
+ Version: 0.0.0.dev10
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,8 @@ 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.0dev3
30
+ Requires-Dist: vt-commons>=0.0.1.dev4
30
31
  Provides-Extra: pygit2
31
32
  Requires-Dist: pygit2; extra == "pygit2"
32
33
  Provides-Extra: test
@@ -62,6 +63,7 @@ Dynamic: license-file
62
63
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
63
64
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
64
65
  * 🧼 **Idiomatic Python:** Write commands in idiomatic Python at compile-time and be confident they’ll execute smoothly at runtime.
66
+ * 🎀 **Add-ons:** Special features provided to ease programming with git. These can be added if required.
65
67
 
66
68
  ---
67
69
 
@@ -140,6 +142,53 @@ status_out = git.status_subcmd.status()
140
142
  print(status_out)
141
143
  ```
142
144
 
145
+ ### 🪼 Modular Architecture
146
+
147
+ #### 🧑‍💻 Modular at the programmatic level
148
+
149
+ Commands are designed to be passed around as objects. This makes them modular and thus users can opt to use only
150
+ particular commands.
151
+
152
+ ```python
153
+ from gitbolt import get_git
154
+
155
+ git = get_git() # get git object for the current working directory
156
+ add_subcmd = git.add_subcmd
157
+ ls_tree_subcmd = git.ls_tree_subcmd
158
+
159
+ # now, functions can be written to accept only the required subcommands and nothing more than that.
160
+ ```
161
+
162
+ #### 📽️ Modular at project level
163
+
164
+ Only required commands and hence their implementations can be installed as per user requirement.
165
+
166
+ e.g.
167
+
168
+ - To install only the `git add` command related logic:
169
+ - ```shell
170
+ pip install gitbolt[add]
171
+ ```
172
+ - To install command logic related to `git add` and `git rm` commands:
173
+ - ```shell
174
+ pip install gitbolt[add,rm]
175
+ ```
176
+ - Install all porcelain related commands:
177
+ - ```shell
178
+ pip install gitbolt[porcelain]
179
+ ```
180
+ - Install high performance `pygit2` implementations:
181
+ - ```shell
182
+ pip install gitbolt[pygit2]
183
+ ```
184
+ - ```shell
185
+ pip install gitbolt[add,pygit2,rm]
186
+ ```
187
+ - At last, install every command's implementation:
188
+ - ```shell
189
+ pip install gitbolt[all]
190
+ ```
191
+
143
192
  ---
144
193
 
145
194
  ## 🧠 Strong Typing Everywhere
@@ -325,3 +374,4 @@ Transformers for formatting/parsing can be added later.
325
374
 
326
375
  * Support `pygit2` for direct, fast Git access.
327
376
  * Enable `porcelain` support using `pygit2` where required.
377
+ > `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.0dev8"
3
+ version = "0.0.0dev10"
4
4
  description = "Fast, flexible and type-safe Git commands in Python."
5
5
  requires-python = ">=3.12"
6
6
  readme = "README.md"
@@ -36,7 +36,8 @@ classifiers = [
36
36
  "Typing :: Typed"
37
37
  ]
38
38
  dependencies = [
39
- "vt-err-hndlr == 0.0.0dev1"
39
+ "vt-err-hndlr >= 0.0.0dev3",
40
+ "vt-commons >= 0.0.1.dev4",
40
41
  ]
41
42
 
42
43
  [project.optional-dependencies]
@@ -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,
@@ -168,7 +168,9 @@ class SimpleGitCommand(GitCommand, RootDirOp):
168
168
  self._version_subcmd = version_subcmd or VersionCommandImpl(self)
169
169
  self._ls_tree = ls_tree_subcmd or LsTreeCommandImpl(self.root_dir, self)
170
170
  self._add_subcmd = add_subcmd or AddCommandImpl(self.root_dir, self)
171
- self._subcmd_unchecked = subcmd_unchecked or UncheckedSubcmdImpl(self.root_dir, self)
171
+ self._subcmd_unchecked = subcmd_unchecked or UncheckedSubcmdImpl(
172
+ self.root_dir, self
173
+ )
172
174
 
173
175
  @override
174
176
  @property
@@ -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.dev10
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,8 @@ 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.0dev3
30
+ Requires-Dist: vt-commons>=0.0.1.dev4
30
31
  Provides-Extra: pygit2
31
32
  Requires-Dist: pygit2; extra == "pygit2"
32
33
  Provides-Extra: test
@@ -62,6 +63,7 @@ Dynamic: license-file
62
63
  * 📄 **Transparent Output:** Returns a Git command's `stdout` as-is.
63
64
  * 🧪 **Terminal Functions:** Git subcommands are terminal functions.
64
65
  * 🧼 **Idiomatic Python:** Write commands in idiomatic Python at compile-time and be confident they’ll execute smoothly at runtime.
66
+ * 🎀 **Add-ons:** Special features provided to ease programming with git. These can be added if required.
65
67
 
66
68
  ---
67
69
 
@@ -140,6 +142,53 @@ status_out = git.status_subcmd.status()
140
142
  print(status_out)
141
143
  ```
142
144
 
145
+ ### 🪼 Modular Architecture
146
+
147
+ #### 🧑‍💻 Modular at the programmatic level
148
+
149
+ Commands are designed to be passed around as objects. This makes them modular and thus users can opt to use only
150
+ particular commands.
151
+
152
+ ```python
153
+ from gitbolt import get_git
154
+
155
+ git = get_git() # get git object for the current working directory
156
+ add_subcmd = git.add_subcmd
157
+ ls_tree_subcmd = git.ls_tree_subcmd
158
+
159
+ # now, functions can be written to accept only the required subcommands and nothing more than that.
160
+ ```
161
+
162
+ #### 📽️ Modular at project level
163
+
164
+ Only required commands and hence their implementations can be installed as per user requirement.
165
+
166
+ e.g.
167
+
168
+ - To install only the `git add` command related logic:
169
+ - ```shell
170
+ pip install gitbolt[add]
171
+ ```
172
+ - To install command logic related to `git add` and `git rm` commands:
173
+ - ```shell
174
+ pip install gitbolt[add,rm]
175
+ ```
176
+ - Install all porcelain related commands:
177
+ - ```shell
178
+ pip install gitbolt[porcelain]
179
+ ```
180
+ - Install high performance `pygit2` implementations:
181
+ - ```shell
182
+ pip install gitbolt[pygit2]
183
+ ```
184
+ - ```shell
185
+ pip install gitbolt[add,pygit2,rm]
186
+ ```
187
+ - At last, install every command's implementation:
188
+ - ```shell
189
+ pip install gitbolt[all]
190
+ ```
191
+
143
192
  ---
144
193
 
145
194
  ## 🧠 Strong Typing Everywhere
@@ -325,3 +374,4 @@ Transformers for formatting/parsing can be added later.
325
374
 
326
375
  * Support `pygit2` for direct, fast Git access.
327
376
  * Enable `porcelain` support using `pygit2` where required.
377
+ > `pygit2` usage will automatically make all commands return in porcelain mode.
@@ -0,0 +1,8 @@
1
+ vt-err-hndlr>=0.0.0dev3
2
+ vt-commons>=0.0.1.dev4
3
+
4
+ [pygit2]
5
+ pygit2
6
+
7
+ [test]
8
+ pytest
@@ -1,7 +0,0 @@
1
- vt-err-hndlr==0.0.0dev1
2
-
3
- [pygit2]
4
- pygit2
5
-
6
- [test]
7
- pytest
File without changes
File without changes