git-project 0.0.37__tar.gz → 0.0.39__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 (68) hide show
  1. {git_project-0.0.37 → git_project-0.0.39}/.gitignore +22 -0
  2. git_project-0.0.39/PKG-INFO +262 -0
  3. {git_project-0.0.37 → git_project-0.0.39}/_version.py +2 -2
  4. git_project-0.0.39/docs/api.rst +110 -0
  5. git_project-0.0.39/docs/changelog.rst +128 -0
  6. {git_project-0.0.37 → git_project-0.0.39}/docs/conf.py +4 -3
  7. git_project-0.0.39/docs/contributing.rst +29 -0
  8. {git_project-0.0.37 → git_project-0.0.39}/docs/index.rst +3 -0
  9. {git_project-0.0.37 → git_project-0.0.39}/docs/intro.rst +1 -1
  10. git_project-0.0.37/docs/changelog.rst → git_project-0.0.39/docs/license.rst +4 -10
  11. git_project-0.0.39/docs/plugins.rst +31 -0
  12. {git_project-0.0.37 → git_project-0.0.39}/pyproject.toml +61 -31
  13. {git_project-0.0.37 → git_project-0.0.39}/requirements.txt +1 -1
  14. git_project-0.0.39/src/git_project/__init__.py +185 -0
  15. git_project-0.0.39/src/git_project/_contributing.py +142 -0
  16. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/commandline.py +20 -17
  17. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/configobj.py +62 -21
  18. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/exception.py +7 -0
  19. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/git.py +120 -66
  20. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/gitproject.py +11 -8
  21. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/main.py +25 -0
  22. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/parsermanager.py +2 -3
  23. git_project-0.0.39/src/git_project/plugin.py +266 -0
  24. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/pluginmanager.py +8 -7
  25. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/project.py +37 -17
  26. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/runnable.py +16 -4
  27. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/scopedobj.py +41 -12
  28. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/shell.py +44 -17
  29. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/substitutable.py +37 -5
  30. {git_project-0.0.37 → git_project-0.0.39}/tests/test_confobj.py +23 -0
  31. {git_project-0.0.37 → git_project-0.0.39}/tests/test_git.py +147 -0
  32. {git_project-0.0.37 → git_project-0.0.39}/tests/test_main.py +9 -0
  33. git_project-0.0.39/tests/test_parsermanager.py +34 -0
  34. {git_project-0.0.37 → git_project-0.0.39}/tests/test_project.py +29 -8
  35. {git_project-0.0.37 → git_project-0.0.39}/tests/test_scopedobj.py +33 -0
  36. {git_project-0.0.37 → git_project-0.0.39}/tests/test_shell.py +9 -0
  37. git_project-0.0.37/PKG-INFO +0 -78
  38. git_project-0.0.37/build/lib/git_project/__init__.py +0 -33
  39. git_project-0.0.37/build/lib/git_project/commandline.py +0 -164
  40. git_project-0.0.37/build/lib/git_project/configobj.py +0 -300
  41. git_project-0.0.37/build/lib/git_project/exception.py +0 -30
  42. git_project-0.0.37/build/lib/git_project/git.py +0 -873
  43. git_project-0.0.37/build/lib/git_project/gitproject.py +0 -61
  44. git_project-0.0.37/build/lib/git_project/main.py +0 -63
  45. git_project-0.0.37/build/lib/git_project/parsermanager.py +0 -360
  46. git_project-0.0.37/build/lib/git_project/plugin.py +0 -118
  47. git_project-0.0.37/build/lib/git_project/pluginmanager.py +0 -54
  48. git_project-0.0.37/build/lib/git_project/project.py +0 -197
  49. git_project-0.0.37/build/lib/git_project/runnable.py +0 -71
  50. git_project-0.0.37/build/lib/git_project/scopedobj.py +0 -207
  51. git_project-0.0.37/build/lib/git_project/shell.py +0 -119
  52. git_project-0.0.37/build/lib/git_project/substitutable.py +0 -139
  53. git_project-0.0.37/docs/license.rst +0 -241
  54. git_project-0.0.37/src/git_project/__init__.py +0 -127
  55. git_project-0.0.37/src/git_project/plugin.py +0 -122
  56. git_project-0.0.37/test.out +0 -18
  57. {git_project-0.0.37 → git_project-0.0.39}/CONTRIBUTORS +0 -0
  58. {git_project-0.0.37 → git_project-0.0.39}/COPYING +0 -0
  59. {git_project-0.0.37 → git_project-0.0.39}/MANIFEST.in +0 -0
  60. {git_project-0.0.37 → git_project-0.0.39}/docs/Makefile +0 -0
  61. {git_project-0.0.37 → git_project-0.0.39}/docs/authors.rst +0 -0
  62. {git_project-0.0.37 → git_project-0.0.39}/docs/make.bat +0 -0
  63. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/test_support/__init__.py +0 -0
  64. {git_project-0.0.37 → git_project-0.0.39}/src/git_project/test_support/common.py +0 -0
  65. {git_project-0.0.37 → git_project-0.0.39}/tests/conftest.py +0 -0
  66. {git_project-0.0.37 → git_project-0.0.39}/tests/test_gitproject.py +0 -0
  67. {git_project-0.0.37 → git_project-0.0.39}/tests/test_runnable.py +0 -0
  68. {git_project-0.0.37 → git_project-0.0.39}/tests/test_substitutable.py +0 -0
@@ -26,3 +26,25 @@
26
26
 
27
27
  # Python egg metadata, regenerated from source files by setuptools.
28
28
  /*.egg-info
29
+
30
+ # Python bytecode cache directories.
31
+ __pycache__/
32
+
33
+ # Version file generated by vcs-versioning.
34
+ /_version.py
35
+
36
+ # Setuptools build folder.
37
+ /build/
38
+
39
+ # Editor backup files.
40
+ *~
41
+
42
+ # Coverage data. The coverage config sets parallel, so each run also writes
43
+ # .coverage.<host>.<pid>.<random> files for coverage combine.
44
+ .coverage*
45
+
46
+ # Coverage HTML report.
47
+ /htmlcov/
48
+
49
+ # Sphinx build output.
50
+ /docs/_build/
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.5
2
+ Name: git-project
3
+ Version: 0.0.39
4
+ Summary: The extensible stupid project manager
5
+ Author-email: "David A. Greene" <dag@obbligato.org>
6
+ License-Expression: AGPL-3.0-or-later
7
+ License-File: COPYING
8
+ Keywords: development,git,project
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Topic :: Software Development :: Version Control :: Git
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: progressbar2>=4.4.2
18
+ Requires-Dist: pygit2>=1.18.2
19
+ Provides-Extra: test
20
+ Requires-Dist: pytest; extra == 'test'
21
+ Requires-Dist: pytest-console-scripts; extra == 'test'
22
+ Requires-Dist: pytest-cov; extra == 'test'
23
+ Requires-Dist: setuptools; extra == 'test'
24
+ Description-Content-Type: text/x-rst
25
+
26
+
27
+ ===================================================
28
+ git-project - The extensible stupid project manager
29
+ ===================================================
30
+
31
+ |VersionImageLink|_
32
+
33
+ |PythonVersionImageLink|_
34
+
35
+ .. |VersionImageLink| image:: https://img.shields.io/pypi/v/git-project.svg
36
+ .. _VersionImageLink: https://pypi.org/project/git-project
37
+ .. |PythonVersionImageLink| image:: https://img.shields.io/pypi/pyversions/git-project.svg
38
+ .. _PythonVersionImageLink: https://pypi.org/project/git-project
39
+
40
+
41
+ -------
42
+
43
+ .. contents:: Table of Contents
44
+
45
+
46
+ Installation
47
+ ============
48
+ ::
49
+
50
+ pip install git-project
51
+ pip install git-project-core-plugins
52
+
53
+ git-project needs Python 3.10 or later.
54
+
55
+ Overview
56
+ ========
57
+
58
+ git-project is a git extension for managing development work in a git
59
+ repository. By itself it does almost nothing. It provides ``-h``,
60
+ ``--version`` and ``--menu``, and plugins provide the commands.
61
+
62
+ `git-project-core-plugins
63
+ <https://github.com/greened/git-project-core-plugins>`_ provides the basic
64
+ commands, among them ``clone``, ``init``, ``worktree``, ``branch``, ``run``
65
+ and ``config``. Install it alongside git-project.
66
+
67
+ git-project aims to make switching between tasks in a repository fast,
68
+ without losing the state of the tasks you set aside. For example, the core
69
+ plugins can give each worktree its own build directory, so moving to another
70
+ worktree does not rebuild everything.
71
+
72
+ Projects
73
+ ========
74
+
75
+ git-project runs under the name of a link to it, and that name selects the
76
+ *active project*. If ``git-fizzbin`` is a symlink to ``git-project``, then
77
+ ``git fizzbin <command>`` runs git-project with ``fizzbin`` as the active
78
+ project. Run as ``git-project`` itself, the active project is ``project``.
79
+ These docs write ``git <project>`` for whichever name you use.
80
+
81
+ Create the link yourself, in a directory on your ``PATH``::
82
+
83
+ ln -s "$(command -v git-project)" ~/.local/bin/git-fizzbin
84
+
85
+ Each project keeps its settings apart from the others, so one repository can
86
+ hold several projects, each run through its own link.
87
+
88
+ Configuration
89
+ =============
90
+
91
+ git-project stores its settings in the repository's git config. A project's
92
+ settings live in a section named after the project. git-project changes
93
+ ``.`` and ``_`` in the name to ``-``, so the project ``fizz_bin`` uses the
94
+ section ``fizz-bin``.
95
+
96
+ Whenever they are missing, git-project sets two values in the project
97
+ section: ``branch``, the repository's main branch, and ``remote``, which is
98
+ ``origin``.
99
+
100
+ Plugins keep their own settings in subsections of the project section. For
101
+ example, a project with one worktree might hold::
102
+
103
+ [fizzbin]
104
+ branch = main
105
+ remote = origin
106
+ srcdir = /src
107
+ [fizzbin "worktree.main"]
108
+ builddir = {srcdir}/build
109
+
110
+ A key can hold more than one value. On every run, git-project also checks
111
+ the config file and stops if one section holds the same ``key = value`` line
112
+ twice.
113
+
114
+ Scopes
115
+ ======
116
+
117
+ A *scope* is a subsection that a plugin makes active for the current run.
118
+ While a scope is active, a value set in the scope overrides the same key in
119
+ the project section. For example, when you run inside a worktree, the core
120
+ plugins' ``worktree`` plugin makes that worktree's subsection a scope. A
121
+ value set for one worktree then applies only there.
122
+
123
+ The name of an active scope is also a substitution variable, and its value
124
+ is the scope's identifier. In the example above, ``{worktree}`` is ``main``
125
+ inside the ``main`` worktree.
126
+
127
+ Substitution
128
+ ============
129
+
130
+ Some values are *substituted* before they are used, for example the
131
+ commands that the ``run`` plugin runs. Substitution replaces ``{name}`` with
132
+ the value of ``name``. A name can be:
133
+
134
+ * a key in the project section
135
+ * a key in the object being substituted, or in an active scope
136
+ * the name of an active scope, as above
137
+ * one of these built-in names
138
+
139
+ ``project``
140
+ The active project's section name
141
+ ``branch``
142
+ The checked-out branch, or during a rebase the branch being rebased
143
+ ``gitdir``
144
+ The repository's git directory
145
+ ``git_common_dir``
146
+ The git directory that all worktrees share
147
+ ``git_workdir``
148
+ The root of the current worktree
149
+
150
+ Substitution repeats until the value stops changing, so a value can name
151
+ another value that itself contains ``{name}``. A value may not name itself.
152
+ To write a literal brace, write ``{{}`` for ``{`` and ``{}}`` for ``}``.
153
+
154
+ **A value is evaluated as Python.** git-project substitutes a value by
155
+ evaluating it as a Python f-string. So ``{1+1}`` becomes ``2``, and any
156
+ Python expression in braces runs when the value is substituted. Treat the
157
+ git config as code, and do not include config from a source you do not
158
+ trust. A value that contains a ``'`` cannot be substituted.
159
+
160
+ Getting help
161
+ ============
162
+
163
+ ``git <project> -h`` lists the commands that the installed plugins provide.
164
+ Use ``-h`` there, because git turns ``git <project> --help`` into a request
165
+ for a man page. After a command name ``--help`` works as usual, and with the
166
+ core plugins installed ``git <project> help <command>`` shows a command's
167
+ full manual.
168
+
169
+ ``--menu`` lists a command's subcommands, arguments and options in a form meant
170
+ for tools.
171
+
172
+ License
173
+ =======
174
+ `git-project` is distributed under the terms of the `GNU Affero General Public License v3.0 or later`_.
175
+
176
+ .. _`GNU Affero General Public License v3.0 or later`: https://spdx.org/licenses/AGPL-3.0-or-later.html
177
+
178
+
179
+ ..
180
+ SPDX-FileCopyrightText: 2024-present David A. Greene <dag@obbligato.org>
181
+
182
+ ..
183
+ SPDX-License-Identifier: AGPL-3.0-or-later
184
+
185
+ ..
186
+ Copyright 2023 David A. Greene
187
+
188
+ ..
189
+ This file is part of git-project
190
+
191
+ ..
192
+ git-project is free software: you can redistribute it and/or modify it under
193
+ the terms of the GNU Affero General Public License as published by the Free
194
+ Software Foundation, either version 3 of the License, or (at your option)
195
+ any later version.
196
+
197
+ ..
198
+ This program is distributed in the hope that it will be useful, but WITHOUT
199
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
200
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
201
+ more details.
202
+
203
+ ..
204
+ You should have received a copy of the GNU Affero General Public License
205
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
206
+
207
+ Authors
208
+ =======
209
+ *git-project* is written and maintained by |author|.
210
+
211
+ .. |author| replace:: `David Greene`_
212
+ .. _David Greene: https://github.com/greened
213
+
214
+
215
+ `0.0.39`_ - 2026-09-30
216
+ ----------------------
217
+ Added
218
+ .....
219
+ - A guide to writing plugins, in the ``git_project.plugin`` module
220
+ documentation, with the run lifecycle in ``git_project.main``.
221
+ - A guide to working on git-project itself, in the ``git_project._contributing``
222
+ module documentation.
223
+
224
+ Changed
225
+ .......
226
+ - The PyPI description now ends with the newest release's changelog section
227
+ and a link to the full changelog.
228
+ - ``git <project> -h`` now opens with a summary of git-project and of how the
229
+ link name selects a project. It showed only the usage and the arguments
230
+ before.
231
+ - The package description is rewritten. It now explains projects,
232
+ configuration, scopes and substitution, and it warns that a substituted
233
+ value is evaluated as Python. It also says to ask for help with
234
+ ``git <project> -h``, because git sends ``git <project> --help`` to a man
235
+ page.
236
+
237
+ Fixed
238
+ .....
239
+ - The package description named the GNU General Public License. git-project
240
+ is licensed under the GNU Affero General Public License v3.0 or later, as
241
+ its source headers and ``pyproject.toml`` already said.
242
+ - The package description now says how to create the ``git-<project>`` link
243
+ that selects a project.
244
+ - ``ScopedConfigObject.get_scope`` found only the topmost scope. With more
245
+ than one scope pushed, a lower scope was never found, so a ``{name}``
246
+ substitution naming it could not be resolved.
247
+ - ``ParserManager.get_or_add_parser`` passed its name and key to
248
+ ``add_parser`` in the wrong order. A parser it created was registered under
249
+ the name and shown to the user as the key.
250
+ - A project whose name contains ``.`` or ``_``, such as one run through a
251
+ ``git-fizz_bin`` link, lost its settings between runs. Its values were
252
+ written to the ``fizz-bin`` section but read back from ``fizz_bin``.
253
+ - ``iter_command`` raised ``NameError`` instead of running. Its exit check
254
+ read the status before the process had finished and then named two
255
+ variables that do not exist. It now waits for the command, and a failure
256
+ reports the exit status and the command's standard error.
257
+
258
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.39...HEAD
259
+ .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
260
+ .. _0.0.38: https://github.com/greened/git-project/compare/v0.0.37...v0.0.38
261
+
262
+ `Full Changelog <https://github.com/greened/git-project/blob/master/docs/changelog.rst>`_
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.0.37'
22
- __version_tuple__ = version_tuple = (0, 0, 37)
21
+ __version__ = version = '0.0.39'
22
+ __version_tuple__ = version_tuple = (0, 0, 39)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -0,0 +1,110 @@
1
+ ..
2
+ SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
3
+
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
+
7
+ ..
8
+ Copyright 2026 David A. Greene
9
+
10
+ ..
11
+ This file is part of git-project
12
+
13
+ ..
14
+ git-project is free software: you can redistribute it and/or modify it under
15
+ the terms of the GNU Affero General Public License as published by the Free
16
+ Software Foundation, either version 3 of the License, or (at your option)
17
+ any later version.
18
+
19
+ ..
20
+ This program is distributed in the hope that it will be useful, but WITHOUT
21
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23
+ more details.
24
+
25
+ ..
26
+ You should have received a copy of the GNU Affero General Public License
27
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
+
29
+ API reference
30
+ =============
31
+
32
+ .. currentmodule:: git_project
33
+
34
+ Configuration objects
35
+ ---------------------
36
+
37
+ .. automodule:: git_project.configobj
38
+
39
+ .. automodule:: git_project.scopedobj
40
+
41
+ .. automodule:: git_project.substitutable
42
+
43
+ .. automodule:: git_project.runnable
44
+
45
+ .. currentmodule:: git_project
46
+
47
+ .. autoclass:: ConfigObject
48
+ :members:
49
+
50
+ .. autoclass:: ScopedConfigObject
51
+ :members:
52
+
53
+ .. autoclass:: SubstitutableConfigObject
54
+ :members:
55
+
56
+ .. autoclass:: RunnableConfigObject
57
+ :members:
58
+
59
+ Projects
60
+ --------
61
+
62
+ .. autoclass:: Project
63
+ :members:
64
+
65
+ .. autoclass:: GitProject
66
+ :members:
67
+
68
+ Plugins and the command line
69
+ ----------------------------
70
+
71
+ .. autoclass:: Plugin
72
+ :members:
73
+
74
+ .. autoclass:: PluginManager
75
+ :members:
76
+
77
+ .. autoclass:: ParserManager
78
+ :members:
79
+
80
+ .. autofunction:: add_top_level_command
81
+
82
+ .. autofunction:: get_or_add_top_level_command
83
+
84
+ .. autofunction:: parse_arguments
85
+
86
+ .. autofunction:: main_impl
87
+
88
+ Git
89
+ ---
90
+
91
+ .. autoclass:: Git
92
+ :members:
93
+
94
+ Shell commands
95
+ --------------
96
+
97
+ .. automodule:: git_project.shell
98
+
99
+ .. currentmodule:: git_project
100
+
101
+ .. autofunction:: run_command_with_shell
102
+
103
+ .. autofunction:: iter_command
104
+
105
+ .. autofunction:: capture_command
106
+
107
+ Errors
108
+ ------
109
+
110
+ .. autoclass:: GitProjectException
@@ -0,0 +1,128 @@
1
+ ..
2
+ SPDX-FileCopyrightText: 2023-present David A. Greene <dag@obbligato.org>
3
+
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
+
7
+ ..
8
+ Copyright 2023 David A. Greene
9
+
10
+ ..
11
+ This file is part of git-project
12
+
13
+ ..
14
+ git-project is free software: you can redistribute it and/or modify it under
15
+ the terms of the GNU Affero General Public License as published by the Free
16
+ Software Foundation, either version 3 of the License, or (at your option)
17
+ any later version.
18
+
19
+ ..
20
+ This program is distributed in the hope that it will be useful, but WITHOUT
21
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23
+ more details.
24
+
25
+ ..
26
+ You should have received a copy of the GNU Affero General Public License
27
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
+
29
+ ChangeLog
30
+ =========
31
+ `Unreleased`_
32
+ -------------
33
+
34
+ `0.0.39`_ - 2026-09-30
35
+ ----------------------
36
+ Added
37
+ .....
38
+ - A guide to writing plugins, in the ``git_project.plugin`` module
39
+ documentation, with the run lifecycle in ``git_project.main``.
40
+ - A guide to working on git-project itself, in the ``git_project._contributing``
41
+ module documentation.
42
+
43
+ Changed
44
+ .......
45
+ - The PyPI description now ends with the newest release's changelog section
46
+ and a link to the full changelog.
47
+ - ``git <project> -h`` now opens with a summary of git-project and of how the
48
+ link name selects a project. It showed only the usage and the arguments
49
+ before.
50
+ - The package description is rewritten. It now explains projects,
51
+ configuration, scopes and substitution, and it warns that a substituted
52
+ value is evaluated as Python. It also says to ask for help with
53
+ ``git <project> -h``, because git sends ``git <project> --help`` to a man
54
+ page.
55
+
56
+ Fixed
57
+ .....
58
+ - The package description named the GNU General Public License. git-project
59
+ is licensed under the GNU Affero General Public License v3.0 or later, as
60
+ its source headers and ``pyproject.toml`` already said.
61
+ - The package description now says how to create the ``git-<project>`` link
62
+ that selects a project.
63
+ - ``ScopedConfigObject.get_scope`` found only the topmost scope. With more
64
+ than one scope pushed, a lower scope was never found, so a ``{name}``
65
+ substitution naming it could not be resolved.
66
+ - ``ParserManager.get_or_add_parser`` passed its name and key to
67
+ ``add_parser`` in the wrong order. A parser it created was registered under
68
+ the name and shown to the user as the key.
69
+ - A project whose name contains ``.`` or ``_``, such as one run through a
70
+ ``git-fizz_bin`` link, lost its settings between runs. Its values were
71
+ written to the ``fizz-bin`` section but read back from ``fizz_bin``.
72
+ - ``iter_command`` raised ``NameError`` instead of running. Its exit check
73
+ read the status before the process had finished and then named two
74
+ variables that do not exist. It now waits for the command, and a failure
75
+ reports the exit status and the command's standard error.
76
+
77
+ `0.0.38`_ - 2026-09-24
78
+ ----------------------
79
+ Added
80
+ .....
81
+ - ``prune_branch`` takes a ``keep_remote_branch`` keyword. It previously
82
+ deleted the branch from every project remote as well as locally, so retiring
83
+ a local branch destroyed the remote copy with it.
84
+
85
+ Changed
86
+ .......
87
+ - Python 3.10 or later is now required. ``list_heads`` needs it, and 1.15.1 is
88
+ the last pygit2 that supports 3.9, so on 3.9 there is no installable pygit2
89
+ carrying the API.
90
+ - pygit2 1.18.2 or later is now required, up from 1.15.1. The old range still
91
+ resolved, so the package installed cleanly and then raised ``AttributeError``
92
+ in use.
93
+
94
+ Fixed
95
+ .....
96
+ - ``git <project> clone`` did not work at all. ``Git.clone`` required an ssh ID,
97
+ so the clone paths raised ``TypeError``. The ID is now optional, and a
98
+ keypair is simply not offered when there is none. This also fixes
99
+ ``fetch_remote``, ``remote_branch_exists`` and ``delete_remote_branch`` for
100
+ any repository that never set ``ssh.id``.
101
+ - ``remote_branch_exists`` called ``Remote.ls_remotes()``, which pygit2 1.20
102
+ removed. It now calls ``list_heads()`` and reads the fields off the
103
+ ``RemoteHead`` objects.
104
+ - A ``Git`` re-pointed at a path with no repository stayed attached to the
105
+ previous one. ``has_repo`` answered ``True``, so later work ran against the
106
+ repository the caller had left. It now detaches, and ``has_repo`` answers
107
+ ``False``.
108
+ - A ``Git`` built outside any repository named a missing private field rather
109
+ than the real fault. ``reinit`` set the repository only when discovery
110
+ succeeded, so most accessors raised ``AttributeError``. ``config`` named
111
+ ``_config`` rather than ``_repo``, and ``committish_exists`` raised nothing
112
+ at all and answered ``False``, which said the committish was absent. The
113
+ repository accessors now raise ``GitProjectException`` naming the path that
114
+ was searched.
115
+ - The Issues link on the PyPI project page returned 404. The URL named
116
+ ``unknown/greened`` instead of ``greened/git-project``, a leftover from
117
+ hatch's project template.
118
+ - The PyPI long description stopped at the separator after the badges, so
119
+ everything from Installation on went unpublished. A second readme fragment
120
+ now carries the rest.
121
+ - The Sphinx docs rendered no module documentation at all. ``automodule`` was
122
+ asked for ``git-project``, which is not an importable name; it now asks for
123
+ ``git_project``. No declared environment supplied Sphinx either, so a
124
+ ``docs`` environment with Sphinx is now declared.
125
+
126
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.39...HEAD
127
+ .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
128
+ .. _0.0.38: https://github.com/greened/git-project/compare/v0.0.37...v0.0.38
@@ -29,14 +29,16 @@
29
29
  project = 'git-project'
30
30
  copyright = '2024, David A. Greene'
31
31
  author = 'David A. Greene'
32
- release = '0.0.21'
32
+ import importlib.metadata
33
+
34
+ release = importlib.metadata.version('git-project')
33
35
 
34
36
  # -- General configuration ---------------------------------------------------
35
37
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
36
38
 
37
39
  extensions = ['sphinx.ext.extlinks', 'sphinx.ext.autodoc']
40
+ autodoc_member_order = 'bysource'
38
41
 
39
- templates_path = ['_templates']
40
42
  exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
41
43
 
42
44
 
@@ -45,7 +47,6 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
45
47
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
46
48
 
47
49
  html_theme = 'alabaster'
48
- html_static_path = ['_static']
49
50
 
50
51
 
51
52
  # -- Options for extlinks -------------------------------------------------
@@ -0,0 +1,29 @@
1
+ ..
2
+ SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
3
+
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
+
7
+ ..
8
+ Copyright 2026 David A. Greene
9
+
10
+ ..
11
+ This file is part of git-project
12
+
13
+ ..
14
+ git-project is free software: you can redistribute it and/or modify it under
15
+ the terms of the GNU Affero General Public License as published by the Free
16
+ Software Foundation, either version 3 of the License, or (at your option)
17
+ any later version.
18
+
19
+ ..
20
+ This program is distributed in the hope that it will be useful, but WITHOUT
21
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23
+ more details.
24
+
25
+ ..
26
+ You should have received a copy of the GNU Affero General Public License
27
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
+
29
+ .. automodule:: git_project._contributing
@@ -34,6 +34,9 @@ Welcome to git-project's documentation!
34
34
  :caption: Contents:
35
35
 
36
36
  intro.rst
37
+ plugins.rst
38
+ contributing.rst
39
+ api.rst
37
40
  authors.rst
38
41
  changelog.rst
39
42
  license.rst
@@ -26,4 +26,4 @@
26
26
  You should have received a copy of the GNU Affero General Public License
27
27
  along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
28
 
29
- .. automodule:: git-project
29
+ .. automodule:: git_project
@@ -26,14 +26,8 @@
26
26
  You should have received a copy of the GNU Affero General Public License
27
27
  along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
28
 
29
- ChangeLog
30
- =========
31
- `Unreleased`_
32
- -------------
33
- Added
34
- .....
29
+ License
30
+ =======
35
31
 
36
- Fixed
37
- .....
38
-
39
- .. _Unreleased: https://github.com/greened/git-project/changes/0.0.1...HEAD
32
+ .. literalinclude:: ../COPYING
33
+ :language: text
@@ -0,0 +1,31 @@
1
+ ..
2
+ SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
3
+
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
+
7
+ ..
8
+ Copyright 2026 David A. Greene
9
+
10
+ ..
11
+ This file is part of git-project
12
+
13
+ ..
14
+ git-project is free software: you can redistribute it and/or modify it under
15
+ the terms of the GNU Affero General Public License as published by the Free
16
+ Software Foundation, either version 3 of the License, or (at your option)
17
+ any later version.
18
+
19
+ ..
20
+ This program is distributed in the hope that it will be useful, but WITHOUT
21
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23
+ more details.
24
+
25
+ ..
26
+ You should have received a copy of the GNU Affero General Public License
27
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
+
29
+ .. automodule:: git_project.plugin
30
+
31
+ .. automodule:: git_project.main