git-project 0.0.38__tar.gz → 0.0.40__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 (63) hide show
  1. {git_project-0.0.38 → git_project-0.0.40}/.gitignore +2 -1
  2. {git_project-0.0.38 → git_project-0.0.40}/MANIFEST.in +2 -1
  3. git_project-0.0.40/PKG-INFO +251 -0
  4. {git_project-0.0.38 → git_project-0.0.40}/_version.py +2 -2
  5. {git_project-0.0.38 → git_project-0.0.40}/docs/Makefile +2 -1
  6. git_project-0.0.40/docs/api.rst +110 -0
  7. {git_project-0.0.38 → git_project-0.0.40}/docs/authors.rst +2 -2
  8. git_project-0.0.40/docs/changelog.rst +160 -0
  9. {git_project-0.0.38 → git_project-0.0.40}/docs/conf.py +23 -15
  10. git_project-0.0.40/docs/contributing.rst +134 -0
  11. {git_project-0.0.38 → git_project-0.0.40}/docs/index.rst +5 -2
  12. {git_project-0.0.38 → git_project-0.0.40}/docs/intro.rst +2 -2
  13. git_project-0.0.40/docs/license.rst +33 -0
  14. {git_project-0.0.38 → git_project-0.0.40}/docs/make.bat +2 -2
  15. git_project-0.0.40/docs/plugins.rst +31 -0
  16. {git_project-0.0.38 → git_project-0.0.40}/pyproject.toml +37 -60
  17. {git_project-0.0.38 → git_project-0.0.40}/requirements.txt +2 -1
  18. git_project-0.0.40/src/git_project/__init__.py +211 -0
  19. git_project-0.0.40/src/git_project/commandline.py +150 -0
  20. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/configobj.py +99 -63
  21. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/exception.py +18 -4
  22. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/git.py +188 -131
  23. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/gitproject.py +19 -18
  24. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/main.py +39 -10
  25. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/parsermanager.py +74 -54
  26. git_project-0.0.40/src/git_project/plugin.py +263 -0
  27. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/pluginmanager.py +16 -8
  28. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/project.py +53 -39
  29. git_project-0.0.40/src/git_project/py.typed +0 -0
  30. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/runnable.py +22 -9
  31. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/scopedobj.py +70 -42
  32. git_project-0.0.40/src/git_project/shell.py +167 -0
  33. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/substitutable.py +65 -31
  34. git_project-0.0.40/src/git_project/test_support/__init__.py +74 -0
  35. {git_project-0.0.38 → git_project-0.0.40}/src/git_project/test_support/common.py +191 -148
  36. git_project-0.0.38/src/git_project/test_support/__init__.py → git_project-0.0.40/tests/conftest.py +30 -15
  37. git_project-0.0.40/tests/test_confobj.py +294 -0
  38. git_project-0.0.40/tests/test_git.py +1217 -0
  39. {git_project-0.0.38 → git_project-0.0.40}/tests/test_gitproject.py +9 -8
  40. {git_project-0.0.38 → git_project-0.0.40}/tests/test_main.py +22 -16
  41. git_project-0.0.40/tests/test_parsermanager.py +39 -0
  42. git_project-0.0.40/tests/test_project.py +210 -0
  43. git_project-0.0.40/tests/test_runnable.py +293 -0
  44. git_project-0.0.40/tests/test_scopedobj.py +228 -0
  45. git_project-0.0.40/tests/test_shell.py +55 -0
  46. git_project-0.0.40/tests/test_substitutable.py +706 -0
  47. git_project-0.0.38/PKG-INFO +0 -155
  48. git_project-0.0.38/docs/changelog.rst +0 -84
  49. git_project-0.0.38/docs/license.rst +0 -241
  50. git_project-0.0.38/src/git_project/__init__.py +0 -127
  51. git_project-0.0.38/src/git_project/commandline.py +0 -163
  52. git_project-0.0.38/src/git_project/plugin.py +0 -122
  53. git_project-0.0.38/src/git_project/shell.py +0 -127
  54. git_project-0.0.38/tests/conftest.py +0 -40
  55. git_project-0.0.38/tests/test_confobj.py +0 -260
  56. git_project-0.0.38/tests/test_git.py +0 -1066
  57. git_project-0.0.38/tests/test_project.py +0 -195
  58. git_project-0.0.38/tests/test_runnable.py +0 -267
  59. git_project-0.0.38/tests/test_scopedobj.py +0 -183
  60. git_project-0.0.38/tests/test_shell.py +0 -28
  61. git_project-0.0.38/tests/test_substitutable.py +0 -589
  62. {git_project-0.0.38 → git_project-0.0.40}/CONTRIBUTORS +0 -0
  63. {git_project-0.0.38 → git_project-0.0.40}/COPYING +0 -0
@@ -13,7 +13,8 @@
13
13
 
14
14
  # This program is distributed in the hope that it will be useful, but WITHOUT
15
15
  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17
+ # details.
17
18
 
18
19
  # You should have received a copy of the GNU Affero General Public License along
19
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
@@ -13,7 +13,8 @@
13
13
 
14
14
  # This program is distributed in the hope that it will be useful, but WITHOUT
15
15
  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17
+ # details.
17
18
 
18
19
  # You should have received a copy of the GNU Affero General Public License along
19
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
@@ -0,0 +1,251 @@
1
+ Metadata-Version: 2.5
2
+ Name: git-project
3
+ Version: 0.0.40
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 Affero General Public License
201
+ for 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.40`_ - 2026-10-05
216
+ ----------------------
217
+ Added
218
+ .....
219
+ - ``capture_command`` takes a list of arguments as well as a string.
220
+ - The package ships a ``py.typed`` marker, so mypy checks code that
221
+ uses git-project against its annotations.
222
+
223
+ Changed
224
+ .......
225
+ - ``GitProjectException`` is now ``GitProjectError``. The old name still
226
+ works as an alias, and a later release removes it.
227
+ - The ``git_project._contributing`` module is gone. The guide to working
228
+ on git-project is in the docs only, and its Tests section is now the
229
+ ``git_project.test_support`` package documentation.
230
+
231
+ Fixed
232
+ .....
233
+ - ``substitute_value``, ``substitute_command`` and ``run`` shared one
234
+ default ``formats`` dict across calls, and ``substitute_value`` added its
235
+ names to it. So within one process, an object could resolve a name it does
236
+ not define to another object's value. Each call now works on its own copy,
237
+ and a ``formats`` dict passed in is no longer changed.
238
+ - Removing one value of a config key failed when the value held a space.
239
+ It was split into several arguments to ``git config --unset``. The pattern
240
+ now reaches git as given, so a pattern escaped twice to get through that
241
+ split must be escaped once.
242
+ - ``Git.get_git_common_dir`` returns an absolute path in a worktree that plain
243
+ ``git worktree add`` made. It returned the relative path that git writes, so
244
+ ``{git_common_dir}`` substituted ``../..`` there.
245
+
246
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.40...HEAD
247
+ .. _0.0.40: https://github.com/greened/git-project/compare/v0.0.39...v0.0.40
248
+ .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
249
+ .. _0.0.38: https://github.com/greened/git-project/compare/v0.0.37...v0.0.38
250
+
251
+ `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.38'
22
- __version_tuple__ = version_tuple = (0, 0, 38)
21
+ __version__ = version = '0.0.40'
22
+ __version_tuple__ = version_tuple = (0, 0, 40)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -13,7 +13,8 @@
13
13
 
14
14
  # This program is distributed in the hope that it will be useful, but WITHOUT
15
15
  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17
+ # details.
17
18
 
18
19
  # You should have received a copy of the GNU Affero General Public License along
19
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
@@ -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 Affero General Public License
23
+ for 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:: GitProjectError
@@ -19,8 +19,8 @@
19
19
  ..
20
20
  This program is distributed in the hope that it will be useful, but WITHOUT
21
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.
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
23
+ for more details.
24
24
 
25
25
  ..
26
26
  You should have received a copy of the GNU Affero General Public License
@@ -0,0 +1,160 @@
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 Affero General Public License
23
+ for 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.40`_ - 2026-10-05
35
+ ----------------------
36
+ Added
37
+ .....
38
+ - ``capture_command`` takes a list of arguments as well as a string.
39
+ - The package ships a ``py.typed`` marker, so mypy checks code that
40
+ uses git-project against its annotations.
41
+
42
+ Changed
43
+ .......
44
+ - ``GitProjectException`` is now ``GitProjectError``. The old name still
45
+ works as an alias, and a later release removes it.
46
+ - The ``git_project._contributing`` module is gone. The guide to working
47
+ on git-project is in the docs only, and its Tests section is now the
48
+ ``git_project.test_support`` package documentation.
49
+
50
+ Fixed
51
+ .....
52
+ - ``substitute_value``, ``substitute_command`` and ``run`` shared one
53
+ default ``formats`` dict across calls, and ``substitute_value`` added its
54
+ names to it. So within one process, an object could resolve a name it does
55
+ not define to another object's value. Each call now works on its own copy,
56
+ and a ``formats`` dict passed in is no longer changed.
57
+ - Removing one value of a config key failed when the value held a space.
58
+ It was split into several arguments to ``git config --unset``. The pattern
59
+ now reaches git as given, so a pattern escaped twice to get through that
60
+ split must be escaped once.
61
+ - ``Git.get_git_common_dir`` returns an absolute path in a worktree that plain
62
+ ``git worktree add`` made. It returned the relative path that git writes, so
63
+ ``{git_common_dir}`` substituted ``../..`` there.
64
+
65
+ `0.0.39`_ - 2026-09-30
66
+ ----------------------
67
+ Added
68
+ .....
69
+ - A guide to writing plugins, in the ``git_project.plugin`` module
70
+ documentation, with the run lifecycle in ``git_project.main``.
71
+ - A guide to working on git-project itself, in the ``git_project._contributing``
72
+ module documentation.
73
+
74
+ Changed
75
+ .......
76
+ - The PyPI description now ends with the newest release's changelog section
77
+ and a link to the full changelog.
78
+ - ``git <project> -h`` now opens with a summary of git-project and of how the
79
+ link name selects a project. It showed only the usage and the arguments
80
+ before.
81
+ - The package description is rewritten. It now explains projects,
82
+ configuration, scopes and substitution, and it warns that a substituted
83
+ value is evaluated as Python. It also says to ask for help with
84
+ ``git <project> -h``, because git sends ``git <project> --help`` to a man
85
+ page.
86
+
87
+ Fixed
88
+ .....
89
+ - The package description named the GNU General Public License. git-project
90
+ is licensed under the GNU Affero General Public License v3.0 or later, as
91
+ its source headers and ``pyproject.toml`` already said.
92
+ - The package description now says how to create the ``git-<project>`` link
93
+ that selects a project.
94
+ - ``ScopedConfigObject.get_scope`` found only the topmost scope. With more
95
+ than one scope pushed, a lower scope was never found, so a ``{name}``
96
+ substitution naming it could not be resolved.
97
+ - ``ParserManager.get_or_add_parser`` passed its name and key to
98
+ ``add_parser`` in the wrong order. A parser it created was registered under
99
+ the name and shown to the user as the key.
100
+ - A project whose name contains ``.`` or ``_``, such as one run through a
101
+ ``git-fizz_bin`` link, lost its settings between runs. Its values were
102
+ written to the ``fizz-bin`` section but read back from ``fizz_bin``.
103
+ - ``iter_command`` raised ``NameError`` instead of running. Its exit check
104
+ read the status before the process had finished and then named two
105
+ variables that do not exist. It now waits for the command, and a failure
106
+ reports the exit status and the command's standard error.
107
+
108
+ `0.0.38`_ - 2026-09-24
109
+ ----------------------
110
+ Added
111
+ .....
112
+ - ``prune_branch`` takes a ``keep_remote_branch`` keyword. It previously
113
+ deleted the branch from every project remote as well as locally, so retiring
114
+ a local branch destroyed the remote copy with it.
115
+
116
+ Changed
117
+ .......
118
+ - Python 3.10 or later is now required. ``list_heads`` needs it, and 1.15.1 is
119
+ the last pygit2 that supports 3.9, so on 3.9 there is no installable pygit2
120
+ carrying the API.
121
+ - pygit2 1.18.2 or later is now required, up from 1.15.1. The old range still
122
+ resolved, so the package installed cleanly and then raised ``AttributeError``
123
+ in use.
124
+
125
+ Fixed
126
+ .....
127
+ - ``git <project> clone`` did not work at all. ``Git.clone`` required an ssh ID,
128
+ so the clone paths raised ``TypeError``. The ID is now optional, and a
129
+ keypair is simply not offered when there is none. This also fixes
130
+ ``fetch_remote``, ``remote_branch_exists`` and ``delete_remote_branch`` for
131
+ any repository that never set ``ssh.id``.
132
+ - ``remote_branch_exists`` called ``Remote.ls_remotes()``, which pygit2 1.20
133
+ removed. It now calls ``list_heads()`` and reads the fields off the
134
+ ``RemoteHead`` objects.
135
+ - A ``Git`` re-pointed at a path with no repository stayed attached to the
136
+ previous one. ``has_repo`` answered ``True``, so later work ran against the
137
+ repository the caller had left. It now detaches, and ``has_repo`` answers
138
+ ``False``.
139
+ - A ``Git`` built outside any repository named a missing private field rather
140
+ than the real fault. ``reinit`` set the repository only when discovery
141
+ succeeded, so most accessors raised ``AttributeError``. ``config`` named
142
+ ``_config`` rather than ``_repo``, and ``committish_exists`` raised nothing
143
+ at all and answered ``False``, which said the committish was absent. The
144
+ repository accessors now raise ``GitProjectException`` naming the path that
145
+ was searched.
146
+ - The Issues link on the PyPI project page returned 404. The URL named
147
+ ``unknown/greened`` instead of ``greened/git-project``, a leftover from
148
+ hatch's project template.
149
+ - The PyPI long description stopped at the separator after the badges, so
150
+ everything from Installation on went unpublished. A second readme fragment
151
+ now carries the rest.
152
+ - The Sphinx docs rendered no module documentation at all. ``automodule`` was
153
+ asked for ``git-project``, which is not an importable name; it now asks for
154
+ ``git_project``. No declared environment supplied Sphinx either, so a
155
+ ``docs`` environment with Sphinx is now declared.
156
+
157
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.40...HEAD
158
+ .. _0.0.40: https://github.com/greened/git-project/compare/v0.0.39...v0.0.40
159
+ .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
160
+ .. _0.0.38: https://github.com/greened/git-project/compare/v0.0.37...v0.0.38
@@ -13,11 +13,14 @@
13
13
 
14
14
  # This program is distributed in the hope that it will be useful, but WITHOUT
15
15
  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16
+ # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17
+ # details.
17
18
 
18
19
  # You should have received a copy of the GNU Affero General Public License along
19
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
20
21
 
22
+ import importlib.metadata
23
+
21
24
  # Configuration file for the Sphinx documentation builder.
22
25
  #
23
26
  # For the full list of built-in configuration values, see the documentation:
@@ -26,32 +29,37 @@
26
29
  # -- Project information -----------------------------------------------------
27
30
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
28
31
 
29
- project = 'git-project'
30
- copyright = '2024, David A. Greene'
31
- author = 'David A. Greene'
32
- release = '0.0.21'
32
+ project = "git-project"
33
+ project_copyright = "2024, David A. Greene"
34
+ author = "David A. Greene"
35
+ release = importlib.metadata.version("git-project")
33
36
 
34
37
  # -- General configuration ---------------------------------------------------
35
38
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
36
39
 
37
- extensions = ['sphinx.ext.extlinks', 'sphinx.ext.autodoc']
38
-
39
- templates_path = ['_templates']
40
- exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
40
+ extensions = ["sphinx.ext.extlinks", "sphinx.ext.autodoc"]
41
+ autodoc_member_order = "bysource"
42
+ # git_project.test_support imports the test libraries, which the docs env
43
+ # does not install.
44
+ autodoc_mock_imports = ["pytest"]
41
45
 
46
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
42
47
 
43
48
 
44
49
  # -- Options for HTML output -------------------------------------------------
45
50
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
46
51
 
47
- html_theme = 'alabaster'
48
- html_static_path = ['_static']
52
+ html_theme = "alabaster"
49
53
 
50
54
 
51
55
  # -- Options for extlinks -------------------------------------------------
52
56
  # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
53
57
 
54
- extlinks = {'issue': ('https://github.com/greened/git-project/issues/%s',
55
- '#%s'),
56
- 'projecturl': ('https://github.com/greened/%s', None),
57
- 'contributors': ('https://github.com/greened/%s/graphs/contributors', 'overview for %s')}
58
+ extlinks = {
59
+ "issue": ("https://github.com/greened/git-project/issues/%s", "#%s"),
60
+ "projecturl": ("https://github.com/greened/%s", None),
61
+ "contributors": (
62
+ "https://github.com/greened/%s/graphs/contributors",
63
+ "overview for %s",
64
+ ),
65
+ }