git-project 0.0.39__tar.gz → 0.0.41__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 (57) hide show
  1. {git_project-0.0.39 → git_project-0.0.41}/.gitignore +2 -1
  2. {git_project-0.0.39 → git_project-0.0.41}/MANIFEST.in +2 -1
  3. {git_project-0.0.39 → git_project-0.0.41}/PKG-INFO +33 -49
  4. {git_project-0.0.39 → git_project-0.0.41}/_version.py +2 -2
  5. {git_project-0.0.39 → git_project-0.0.41}/docs/Makefile +2 -1
  6. {git_project-0.0.39 → git_project-0.0.41}/docs/api.rst +3 -3
  7. {git_project-0.0.39 → git_project-0.0.41}/docs/authors.rst +2 -2
  8. {git_project-0.0.39 → git_project-0.0.41}/docs/changelog.rst +59 -3
  9. {git_project-0.0.39 → git_project-0.0.41}/docs/conf.py +23 -16
  10. git_project-0.0.39/src/git_project/_contributing.py → git_project-0.0.41/docs/contributing.rst +40 -48
  11. {git_project-0.0.39 → git_project-0.0.41}/docs/index.rst +2 -2
  12. {git_project-0.0.39 → git_project-0.0.41}/docs/intro.rst +2 -2
  13. {git_project-0.0.39 → git_project-0.0.41}/docs/license.rst +2 -2
  14. {git_project-0.0.39 → git_project-0.0.41}/docs/make.bat +2 -2
  15. {git_project-0.0.39 → git_project-0.0.41}/docs/plugins.rst +2 -2
  16. {git_project-0.0.39 → git_project-0.0.41}/pyproject.toml +17 -38
  17. {git_project-0.0.39 → git_project-0.0.41}/requirements.txt +2 -1
  18. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/__init__.py +39 -12
  19. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/commandline.py +31 -51
  20. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/configobj.py +42 -47
  21. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/exception.py +7 -4
  22. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/git.py +159 -126
  23. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/gitproject.py +8 -10
  24. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/main.py +15 -11
  25. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/parsermanager.py +73 -52
  26. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/plugin.py +11 -14
  27. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/pluginmanager.py +9 -6
  28. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/project.py +26 -27
  29. git_project-0.0.41/src/git_project/py.typed +0 -0
  30. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/runnable.py +7 -6
  31. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/scopedobj.py +31 -32
  32. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/shell.py +32 -19
  33. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/substitutable.py +59 -64
  34. git_project-0.0.41/src/git_project/test_support/__init__.py +74 -0
  35. {git_project-0.0.39 → git_project-0.0.41}/src/git_project/test_support/common.py +192 -148
  36. git_project-0.0.39/src/git_project/test_support/__init__.py → git_project-0.0.41/tests/conftest.py +30 -15
  37. git_project-0.0.41/tests/test_confobj.py +294 -0
  38. git_project-0.0.41/tests/test_git.py +1223 -0
  39. {git_project-0.0.39 → git_project-0.0.41}/tests/test_gitproject.py +9 -8
  40. {git_project-0.0.39 → git_project-0.0.41}/tests/test_main.py +17 -20
  41. {git_project-0.0.39 → git_project-0.0.41}/tests/test_parsermanager.py +25 -7
  42. git_project-0.0.41/tests/test_project.py +210 -0
  43. git_project-0.0.41/tests/test_runnable.py +293 -0
  44. git_project-0.0.41/tests/test_scopedobj.py +228 -0
  45. git_project-0.0.41/tests/test_shell.py +55 -0
  46. git_project-0.0.41/tests/test_substitutable.py +813 -0
  47. git_project-0.0.39/docs/contributing.rst +0 -29
  48. git_project-0.0.39/tests/conftest.py +0 -40
  49. git_project-0.0.39/tests/test_confobj.py +0 -283
  50. git_project-0.0.39/tests/test_git.py +0 -1066
  51. git_project-0.0.39/tests/test_project.py +0 -195
  52. git_project-0.0.39/tests/test_runnable.py +0 -267
  53. git_project-0.0.39/tests/test_scopedobj.py +0 -216
  54. git_project-0.0.39/tests/test_shell.py +0 -37
  55. git_project-0.0.39/tests/test_substitutable.py +0 -589
  56. {git_project-0.0.39 → git_project-0.0.41}/CONTRIBUTORS +0 -0
  57. {git_project-0.0.39 → git_project-0.0.41}/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/>.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: git-project
3
- Version: 0.0.39
3
+ Version: 0.0.41
4
4
  Summary: The extensible stupid project manager
5
5
  Author-email: "David A. Greene" <dag@obbligato.org>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -148,14 +148,16 @@ the value of ``name``. A name can be:
148
148
  The root of the current worktree
149
149
 
150
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 ``}``.
151
+ another value that itself contains ``{name}``. A value may not name itself. To
152
+ write a literal brace, write ``{{}`` for ``{`` and ``{}}`` for ``}``. A name is
153
+ ASCII letters, digits and underscores, and does not start with a digit. Other
154
+ text in single braces, such as ``{x.upper()}`` or ``{}``, stays as written, but
155
+ a doubled ``{{`` or ``}}`` becomes one brace. A name that is not defined is an
156
+ error.
153
157
 
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.
158
+ Substitution inserts each value as written, and the ``run`` plugin runs
159
+ its commands through a shell. Treat the git config as code, and do not
160
+ include config from a source you do not trust.
159
161
 
160
162
  Getting help
161
163
  ============
@@ -197,8 +199,8 @@ License
197
199
  ..
198
200
  This program is distributed in the hope that it will be useful, but WITHOUT
199
201
  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
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
203
+ for more details.
202
204
 
203
205
  ..
204
206
  You should have received a copy of the GNU Affero General Public License
@@ -212,50 +214,32 @@ Authors
212
214
  .. _David Greene: https://github.com/greened
213
215
 
214
216
 
215
- `0.0.39`_ - 2026-09-30
217
+ `0.0.41`_ - 2026-10-06
216
218
  ----------------------
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
219
+ Removed
225
220
  .......
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.
221
+ - The ``GitProjectException`` alias is gone. Use ``GitProjectError``.
222
+ core-plugins 0.0.28 is the first release that uses the new name, so an
223
+ older core-plugins fails to import with this git-project.
236
224
 
237
225
  Fixed
238
226
  .....
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
227
+ - ``prune_worktree`` refused to prune a worktree with the message
228
+ ``Will not prune existing worktree {name}``. It now names the worktree.
229
+ - ``ParserManagerMock.ParserMock`` compared unequal to an equal mock:
230
+ ``==`` returned None, and ``!=`` returned True.
231
+
232
+ Security
233
+ ........
234
+ - Substitution no longer evaluates a config value as a Python f-string.
235
+ Before, any expression in braces ran, so a value from an included config
236
+ file could run code. Now only ``{name}`` is replaced, and an expression
237
+ such as ``{x.replace(...)}`` stays as written. A value may now contain
238
+ ``'``, and a backslash in a value stays as written.
239
+
240
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.41...HEAD
241
+ .. _0.0.41: https://github.com/greened/git-project/compare/v0.0.40...v0.0.41
242
+ .. _0.0.40: https://github.com/greened/git-project/compare/v0.0.39...v0.0.40
259
243
  .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
260
244
  .. _0.0.38: https://github.com/greened/git-project/compare/v0.0.37...v0.0.38
261
245
 
@@ -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.39'
22
- __version_tuple__ = version_tuple = (0, 0, 39)
21
+ __version__ = version = '0.0.41'
22
+ __version_tuple__ = version_tuple = (0, 0, 41)
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/>.
@@ -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
@@ -107,4 +107,4 @@ Shell commands
107
107
  Errors
108
108
  ------
109
109
 
110
- .. autoclass:: GitProjectException
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
@@ -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
@@ -31,6 +31,60 @@ ChangeLog
31
31
  `Unreleased`_
32
32
  -------------
33
33
 
34
+ `0.0.41`_ - 2026-10-06
35
+ ----------------------
36
+ Removed
37
+ .......
38
+ - The ``GitProjectException`` alias is gone. Use ``GitProjectError``.
39
+ core-plugins 0.0.28 is the first release that uses the new name, so an
40
+ older core-plugins fails to import with this git-project.
41
+
42
+ Fixed
43
+ .....
44
+ - ``prune_worktree`` refused to prune a worktree with the message
45
+ ``Will not prune existing worktree {name}``. It now names the worktree.
46
+ - ``ParserManagerMock.ParserMock`` compared unequal to an equal mock:
47
+ ``==`` returned None, and ``!=`` returned True.
48
+
49
+ Security
50
+ ........
51
+ - Substitution no longer evaluates a config value as a Python f-string.
52
+ Before, any expression in braces ran, so a value from an included config
53
+ file could run code. Now only ``{name}`` is replaced, and an expression
54
+ such as ``{x.replace(...)}`` stays as written. A value may now contain
55
+ ``'``, and a backslash in a value stays as written.
56
+
57
+ `0.0.40`_ - 2026-10-05
58
+ ----------------------
59
+ Added
60
+ .....
61
+ - ``capture_command`` takes a list of arguments as well as a string.
62
+ - The package ships a ``py.typed`` marker, so mypy checks code that
63
+ uses git-project against its annotations.
64
+
65
+ Changed
66
+ .......
67
+ - ``GitProjectException`` is now ``GitProjectError``. The old name still
68
+ works as an alias, and a later release removes it.
69
+ - The ``git_project._contributing`` module is gone. The guide to working
70
+ on git-project is in the docs only, and its Tests section is now the
71
+ ``git_project.test_support`` package documentation.
72
+
73
+ Fixed
74
+ .....
75
+ - ``substitute_value``, ``substitute_command`` and ``run`` shared one
76
+ default ``formats`` dict across calls, and ``substitute_value`` added its
77
+ names to it. So within one process, an object could resolve a name it does
78
+ not define to another object's value. Each call now works on its own copy,
79
+ and a ``formats`` dict passed in is no longer changed.
80
+ - Removing one value of a config key failed when the value held a space.
81
+ It was split into several arguments to ``git config --unset``. The pattern
82
+ now reaches git as given, so a pattern escaped twice to get through that
83
+ split must be escaped once.
84
+ - ``Git.get_git_common_dir`` returns an absolute path in a worktree that plain
85
+ ``git worktree add`` made. It returned the relative path that git writes, so
86
+ ``{git_common_dir}`` substituted ``../..`` there.
87
+
34
88
  `0.0.39`_ - 2026-09-30
35
89
  ----------------------
36
90
  Added
@@ -123,6 +177,8 @@ Fixed
123
177
  ``git_project``. No declared environment supplied Sphinx either, so a
124
178
  ``docs`` environment with Sphinx is now declared.
125
179
 
126
- .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.39...HEAD
180
+ .. _Unreleased: https://github.com/greened/git-project/compare/v0.0.41...HEAD
181
+ .. _0.0.41: https://github.com/greened/git-project/compare/v0.0.40...v0.0.41
182
+ .. _0.0.40: https://github.com/greened/git-project/compare/v0.0.39...v0.0.40
127
183
  .. _0.0.39: https://github.com/greened/git-project/compare/v0.0.38...v0.0.39
128
184
  .. _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,33 +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
- import importlib.metadata
33
-
34
- release = importlib.metadata.version('git-project')
32
+ project = "git-project"
33
+ project_copyright = "2024, David A. Greene"
34
+ author = "David A. Greene"
35
+ release = importlib.metadata.version("git-project")
35
36
 
36
37
  # -- General configuration ---------------------------------------------------
37
38
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
38
39
 
39
- extensions = ['sphinx.ext.extlinks', 'sphinx.ext.autodoc']
40
- autodoc_member_order = 'bysource'
41
-
42
- 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"]
43
45
 
46
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
44
47
 
45
48
 
46
49
  # -- Options for HTML output -------------------------------------------------
47
50
  # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
48
51
 
49
- html_theme = 'alabaster'
52
+ html_theme = "alabaster"
50
53
 
51
54
 
52
55
  # -- Options for extlinks -------------------------------------------------
53
56
  # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
54
57
 
55
- extlinks = {'issue': ('https://github.com/greened/git-project/issues/%s',
56
- '#%s'),
57
- 'projecturl': ('https://github.com/greened/%s', None),
58
- '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
+ }
@@ -1,32 +1,40 @@
1
- #!/usr/bin/env python3
2
- #
3
- # SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
1
+ ..
2
+ SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
4
3
 
5
- # SPDX-License-Identifier: AGPL-3.0-or-later
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
6
 
7
- # Copyright 2026 David A. Greene
7
+ ..
8
+ Copyright 2026 David A. Greene
8
9
 
9
- # This file is part of git-project
10
+ ..
11
+ This file is part of git-project
10
12
 
11
- # git-project is free software: you can redistribute it and/or modify it under
12
- # the terms of the GNU Affero General Public License as published by the Free
13
- # Software Foundation, either version 3 of the License, or (at your option) any
14
- # later version.
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.
15
18
 
16
- # This program is distributed in the hope that it will be useful, but WITHOUT
17
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
- # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
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.
19
24
 
20
- # You should have received a copy of the GNU Affero General Public License along
21
- # with git-project. If not, see <https://www.gnu.org/licenses/>.
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/>.
22
28
 
23
- """Working on git-project.
29
+ Working on git-project
30
+ ======================
24
31
 
25
32
  This guide is for changing git-project itself. For writing a plugin, see
26
- git_project.plugin. For how a run proceeds, see git_project.main.
33
+ :mod:`git_project.plugin`. For how a run proceeds, see
34
+ :mod:`git_project.main`.
27
35
 
28
36
  Layout
29
- ======
37
+ ------
30
38
 
31
39
  ``src/git_project``
32
40
  The package. ``test_support`` is part of it, not of the tests, because
@@ -38,7 +46,7 @@ Layout
38
46
  The Sphinx sources. The pages mostly pull in docstrings.
39
47
 
40
48
  Environment
41
- ===========
49
+ -----------
42
50
 
43
51
  git-project builds with hatch, and its version comes from git through
44
52
  hatch-vcs. The default hatch environment installs git-project-core-plugins
@@ -50,41 +58,27 @@ core-plugins checkout, make a virtual environment with both installed
50
58
  editable, for example with uv::
51
59
 
52
60
  uv venv /tmp/gp-env
53
- uv pip install --python /tmp/gp-env/bin/python \\
54
- -e <git-project checkout> -e <core-plugins checkout> \\
61
+ uv pip install --python /tmp/gp-env/bin/python \
62
+ -e <git-project checkout> -e <core-plugins checkout> \
55
63
  pytest pytest-console-scripts
56
64
 
57
65
  Put that environment's ``bin`` first on ``PATH`` when running the tests,
58
66
  because the command-line tests run the ``git-project`` script.
59
67
 
60
68
  Tests
61
- =====
69
+ -----
62
70
 
63
- ::
64
-
65
- hatch run test
66
- hatch run cov
67
- hatch run all:test
68
-
69
- ``cov`` adds a coverage report. ``all`` runs the suite under each Python
70
- version in its matrix.
71
-
72
- Run the tests with ``GIT_CONFIG_GLOBAL=/dev/null`` and
73
- ``GIT_CONFIG_NOSYSTEM=1``. The tests make throwaway repositories and
74
- commits, and a hook or setting in your own git config would otherwise act
75
- on them.
76
-
77
- A test for a bug fix should fail before the fix. Check that it does.
71
+ .. automodule:: git_project.test_support
78
72
 
79
73
  Lint
80
- ====
74
+ ----
81
75
 
82
- The ``lint`` environment has ``style``, ``typing`` and ``fmt`` scripts, for
83
- ruff, black and mypy. Whether the tree passes them is not recorded here, so
84
- run them before you assume it does.
76
+ ``hatch run lint:all`` runs ruff, ``black --check`` and mypy.
77
+ ``hatch run lint:fmt`` runs black, then ``ruff check --fix``. The lint
78
+ environment pins each tool to an exact version.
85
79
 
86
80
  Documentation
87
- =============
81
+ -------------
88
82
 
89
83
  Docstrings are the one source for the package, module, class and command
90
84
  documentation, and each one reaches a fixed place:
@@ -100,14 +94,14 @@ documentation, and each one reaches a fixed place:
100
94
  pull them in with ``automodule`` and ``autoclass``.
101
95
 
102
96
  So do not copy docstring text into a ``.rst`` file. Change the docstring.
103
- The changelog and the authors list are written in ``docs`` directly, and the
104
- license page includes ``COPYING``.
97
+ This page, the changelog and the authors list are written in ``docs``
98
+ directly, and the license page includes ``COPYING``.
105
99
 
106
100
  ``hatch run docs:build`` builds the Sphinx docs and fails on any warning.
107
101
  Check the PyPI description with ``twine check`` on a built wheel.
108
102
 
109
103
  Changelog
110
- =========
104
+ ---------
111
105
 
112
106
  Record each change a user can see in ``docs/changelog.rst``, under
113
107
  ``Unreleased``, in an ``Added``, ``Changed`` or ``Fixed`` section. Describe
@@ -116,7 +110,7 @@ tree. A defect that no release ever had needs no entry. The PyPI description
116
110
  shows the newest release's section.
117
111
 
118
112
  Releasing
119
- =========
113
+ ---------
120
114
 
121
115
  A release is a tag on the main branch, named ``vX.Y.Z``. Tags are
122
116
  lightweight. hatch-vcs takes the version from the tag, so there is no
@@ -138,5 +132,3 @@ version number to edit.
138
132
  git-project-core-plugins declares its floor on git-project in its
139
133
  ``requirements.txt``. When core-plugins needs something new in git-project,
140
134
  release git-project first, raise that floor, and then release core-plugins.
141
-
142
- """
@@ -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
@@ -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
@@ -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
@@ -13,8 +13,8 @@ REM any later version.
13
13
 
14
14
  REM This program is distributed in the hope that it will be useful, but WITHOUT
15
15
  REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
- REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17
- REM more details.
16
+ REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
17
+ REM for more details.
18
18
 
19
19
  REM You should have received a copy of the GNU Affero General Public License
20
20
  REM along with git-project. If not, see <https://www.gnu.org/licenses/>.
@@ -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