giterator 0.3.0__tar.gz → 1.0.0__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.
- giterator-1.0.0/.github/workflows/ci.yml +15 -0
- giterator-1.0.0/.github/workflows/release.yml +46 -0
- giterator-1.0.0/.gitignore +10 -0
- giterator-1.0.0/.python-version +1 -0
- giterator-1.0.0/.readthedocs.yml +10 -0
- giterator-1.0.0/AGENTS.md +68 -0
- giterator-1.0.0/CLAUDE.md +1 -0
- giterator-1.0.0/PKG-INFO +42 -0
- giterator-1.0.0/README.rst +25 -0
- giterator-1.0.0/conftest.py +34 -0
- giterator-1.0.0/docs/Makefile +20 -0
- giterator-1.0.0/docs/api.rst +28 -0
- giterator-1.0.0/docs/changes.rst +77 -0
- giterator-1.0.0/docs/conf.py +25 -0
- giterator-1.0.0/docs/development.rst +58 -0
- giterator-1.0.0/docs/use.rst +341 -0
- giterator-1.0.0/happy.sh +19 -0
- giterator-1.0.0/pyproject.toml +69 -0
- giterator-1.0.0/src/giterator/__init__.py +15 -0
- {giterator-0.3.0 → giterator-1.0.0/src}/giterator/__main__.py +1 -0
- giterator-1.0.0/src/giterator/cli.py +88 -0
- {giterator-0.3.0 → giterator-1.0.0/src}/giterator/clock.py +2 -1
- giterator-1.0.0/src/giterator/git.py +263 -0
- giterator-1.0.0/src/giterator/iterate.py +194 -0
- giterator-1.0.0/src/giterator/testing.py +97 -0
- giterator-1.0.0/src/giterator/typing.py +3 -0
- giterator-1.0.0/tests/__init__.py +0 -0
- {giterator-0.3.0 → giterator-1.0.0}/tests/conftest.py +7 -4
- giterator-1.0.0/tests/test_cli.py +131 -0
- giterator-1.0.0/tests/test_clock.py +17 -0
- giterator-1.0.0/tests/test_git.py +312 -0
- giterator-1.0.0/tests/test_iterate.py +300 -0
- giterator-1.0.0/tests/test_testing.py +122 -0
- giterator-0.3.0/.carthorse.yml +0 -9
- giterator-0.3.0/.circleci/config.yml +0 -40
- giterator-0.3.0/.coveragerc +0 -3
- giterator-0.3.0/.gitignore +0 -8
- giterator-0.3.0/.readthedocs.yml +0 -16
- giterator-0.3.0/PKG-INFO +0 -48
- giterator-0.3.0/README.rst +0 -13
- giterator-0.3.0/docs/Makefile +0 -78
- giterator-0.3.0/docs/api.rst +0 -12
- giterator-0.3.0/docs/changes.rst +0 -22
- giterator-0.3.0/docs/conf.py +0 -38
- giterator-0.3.0/docs/development.rst +0 -66
- giterator-0.3.0/docs/use.rst +0 -13
- giterator-0.3.0/giterator/__init__.py +0 -7
- giterator-0.3.0/giterator/cli.py +0 -35
- giterator-0.3.0/giterator/git.py +0 -161
- giterator-0.3.0/giterator/testing.py +0 -58
- giterator-0.3.0/giterator/typing.py +0 -4
- giterator-0.3.0/giterator.egg-info/PKG-INFO +0 -48
- giterator-0.3.0/giterator.egg-info/SOURCES.txt +0 -35
- giterator-0.3.0/giterator.egg-info/dependency_links.txt +0 -1
- giterator-0.3.0/giterator.egg-info/entry_points.txt +0 -2
- giterator-0.3.0/giterator.egg-info/not-zip-safe +0 -1
- giterator-0.3.0/giterator.egg-info/requires.txt +0 -14
- giterator-0.3.0/giterator.egg-info/top_level.txt +0 -1
- giterator-0.3.0/setup.cfg +0 -4
- giterator-0.3.0/setup.py +0 -42
- giterator-0.3.0/tests/test_cli.py +0 -37
- giterator-0.3.0/tests/test_git.py +0 -193
- giterator-0.3.0/tests/test_testing.py +0 -65
- {giterator-0.3.0 → giterator-1.0.0}/LICENSE.rst +0 -0
- {giterator-0.3.0 → giterator-1.0.0}/docs/index.rst +0 -0
- {giterator-0.3.0 → giterator-1.0.0}/docs/license.rst +0 -0
- /giterator-0.3.0/tests/__init__.py → /giterator-1.0.0/src/giterator/py.typed +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: "Continuous Integration"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 1 * * *"
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
ci:
|
|
12
|
+
uses: cjw296/python-workflow/.github/workflows/uv-ci.yml@v2
|
|
13
|
+
with:
|
|
14
|
+
package: giterator
|
|
15
|
+
python-versions: '[ "3.11", "3.14" ]'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: "Release"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Continuous Integration]
|
|
6
|
+
types: [completed]
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
check:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
if: ${{ github.repository == 'simplistix/giterator' && github.event.workflow_run.conclusion == 'success' }}
|
|
13
|
+
outputs:
|
|
14
|
+
tag: ${{ steps.carthorse.outputs.tag }}
|
|
15
|
+
steps:
|
|
16
|
+
- uses: cjw296/python-action/carthorse@v1
|
|
17
|
+
id: carthorse
|
|
18
|
+
with:
|
|
19
|
+
tag-format: 'v{version}'
|
|
20
|
+
check: "true"
|
|
21
|
+
|
|
22
|
+
release:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
needs: check
|
|
25
|
+
if: ${{ needs.check.outputs.tag != '' }}
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write
|
|
28
|
+
id-token: write
|
|
29
|
+
steps:
|
|
30
|
+
- name: Show tag
|
|
31
|
+
run: echo "${{ toJson(needs.check.outputs) }}"
|
|
32
|
+
shell: bash
|
|
33
|
+
|
|
34
|
+
- name: Download packages from CI run
|
|
35
|
+
uses: dawidd6/action-download-artifact@v9
|
|
36
|
+
with:
|
|
37
|
+
run_id: ${{ github.event.workflow_run.id }}
|
|
38
|
+
name: Packages
|
|
39
|
+
path: dist
|
|
40
|
+
|
|
41
|
+
- name: Publish package distributions to PyPI
|
|
42
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
43
|
+
|
|
44
|
+
- uses: cjw296/python-action/carthorse@v1
|
|
45
|
+
with:
|
|
46
|
+
tag-format: 'v{version}'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Principles
|
|
4
|
+
|
|
5
|
+
- **Done means green**: a change is only complete when `./happy.sh` exits 0; do not commit until it does.
|
|
6
|
+
- **No unrelated failures**: if `./happy.sh` fails on something unrelated to your changes, do NOT assume it is a pre-existing problem and proceed anyway. Stop immediately and ask the user how to proceed.
|
|
7
|
+
- **Docs for everything public**: new functionality or public API changes must have accompanying docs in `docs/*.rst`
|
|
8
|
+
- **Docs examples must run**: every Python code block and doctest in `docs/*.rst` is executed by pytest via sybil, top to bottom per document in one shared namespace. The root `conftest.py` sandboxes each document (fresh temp cwd, git config isolated), so examples must only touch disk via relative paths or `tmp_path`. Use `.. invisible-code-block: python` for setup that shouldn't render, doctests (`>>>`) to show output or tracebacks, and `run_pytest` from `sybil.testing` to actually execute fixture-style test examples.
|
|
9
|
+
- **No em-dashes or parenthetical asides in prose**: in `docs/*.rst` prose and Python docstrings, never use em-dashes, and never tuck a clause inside parentheses; rephrase with commas or separate sentences. This does not apply to code comments or agent-facing notes such as this file, where both are fine.
|
|
10
|
+
- **No stacked headings in docs**: a heading in `docs/*.rst` must be followed by prose, never immediately by a sub-heading. Add a short lead-in or merge the levels.
|
|
11
|
+
- **Type-annotate public APIs**: all public functions and classes need type annotations; mypy is the gate
|
|
12
|
+
- **Use `compare()` in tests**: assert with `compare(actual, expected=...)`, using `StringComparison` for pattern matches. Bare `assert` only for booleans and `isinstance` (which type-narrows for mypy).
|
|
13
|
+
- **No `pytest.MonkeyPatch`**: use testfixtures instead. `TempDirectory(cwd=True)` replaces `monkeypatch.chdir`; for mocking, prefer `Replacer` methods (`replace.in_environ`, `replace.on_class`, `replace.in_module`), or the `replace_in_environ`/`replace_on_class`/`replace_in_module` context managers for one-offs.
|
|
14
|
+
- **No `noqa`, ever**: this project has zero linter suppressions; don't add them. Fix the underlying issue instead.
|
|
15
|
+
- **No `docs/changes.rst` edits during development**: that file is updated at release time, not as part of feature work.
|
|
16
|
+
|
|
17
|
+
## Project Overview
|
|
18
|
+
|
|
19
|
+
Giterator is a Python library and command line tool for doing git things: it wraps
|
|
20
|
+
command-line git to script repository operations and provides helpers for making
|
|
21
|
+
sample repositories in tests.
|
|
22
|
+
|
|
23
|
+
## Environment
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uv sync --all-extras --all-groups # setup or after pulling
|
|
27
|
+
rm -rf .venv && uv sync --all-extras --all-groups # full reset
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
./happy.sh # all checks: required before commit
|
|
34
|
+
uv run pytest # all tests
|
|
35
|
+
uv run pytest tests/test_git.py # single file
|
|
36
|
+
uv run pytest --cov --cov-report=term-missing # with coverage
|
|
37
|
+
uv run mypy src tests # type checking
|
|
38
|
+
uv run make -C docs html # build docs
|
|
39
|
+
uv build # build sdist + wheel
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Architecture
|
|
43
|
+
|
|
44
|
+
`src/giterator/`: all source. Key modules:
|
|
45
|
+
|
|
46
|
+
- `git.py`: `Git`, the main class wrapping command-line git; also `User` and `GitError`
|
|
47
|
+
- `testing.py`: `Repo`, for making sample repositories in tests
|
|
48
|
+
- `clock.py`: controllable time source used for commit timestamps
|
|
49
|
+
- `cli.py`: the `giterator` command line entry point
|
|
50
|
+
- `__main__.py`: `python -m giterator` support
|
|
51
|
+
- `typing.py`: type definitions
|
|
52
|
+
|
|
53
|
+
Config: `pyproject.toml`.
|
|
54
|
+
|
|
55
|
+
Testing specifics:
|
|
56
|
+
|
|
57
|
+
- Coverage must be 100% and tracks both `giterator` and `tests`.
|
|
58
|
+
- CLI tests run `python -m giterator` in subprocesses: `tests/conftest.py` sets
|
|
59
|
+
`COVERAGE_PROCESS_START` and the `coverage-enable-subprocess` dev dependency measures
|
|
60
|
+
them, so coverage runs in parallel mode.
|
|
61
|
+
- Tests exercise real git via temporary repositories, so a `git` binary is required.
|
|
62
|
+
- Docs examples are collected via the root `conftest.py` (sybil); `testpaths` includes
|
|
63
|
+
`docs`. Sandboxing is done with pytest fixtures requested via `Sybil(fixtures=...)`:
|
|
64
|
+
a module-scoped fixture spans exactly one document, and the `sandbox` fixture uses
|
|
65
|
+
that to chdir into a `TempDirectory(cwd=True)` and point
|
|
66
|
+
`GIT_CONFIG_GLOBAL`/`GIT_CONFIG_SYSTEM` at controlled files, so examples can never
|
|
67
|
+
read or write the machine's git config or real filesystem paths. The builtin
|
|
68
|
+
`tmp_path` is also requested, fresh per example.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
AGENTS.md
|
giterator-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: giterator
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python tools for doing git things.
|
|
5
|
+
Project-URL: Homepage, https://github.com/simplistix/giterator
|
|
6
|
+
Project-URL: Documentation, https://giterator.readthedocs.org/en/latest/
|
|
7
|
+
Project-URL: Repository, https://github.com/simplistix/giterator
|
|
8
|
+
Project-URL: Changelog, https://giterator.readthedocs.io/en/latest/changes.html
|
|
9
|
+
Author-email: Chris Withers <chris@withers.org>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE.rst
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/x-rst
|
|
17
|
+
|
|
18
|
+
giterator
|
|
19
|
+
=========
|
|
20
|
+
|
|
21
|
+
|CI|_ |Docs|_
|
|
22
|
+
|
|
23
|
+
.. |CI| image:: https://github.com/simplistix/giterator/actions/workflows/ci.yml/badge.svg
|
|
24
|
+
.. _CI: https://github.com/simplistix/giterator/actions/workflows/ci.yml
|
|
25
|
+
|
|
26
|
+
.. |Docs| image:: https://readthedocs.org/projects/giterator/badge/?version=latest
|
|
27
|
+
.. _Docs: http://giterator.readthedocs.org/en/latest/
|
|
28
|
+
|
|
29
|
+
Python tools for doing git things:
|
|
30
|
+
|
|
31
|
+
- ``Git`` wraps command-line git for scripting everyday repository operations,
|
|
32
|
+
with structured access to the log.
|
|
33
|
+
|
|
34
|
+
- ``read`` and ``write`` replay a repository's history as a series of dated
|
|
35
|
+
snapshots and turn dated snapshots, such as backups, back into history.
|
|
36
|
+
The ``giterator`` command line tool packs and unpacks dated files in the
|
|
37
|
+
same way.
|
|
38
|
+
|
|
39
|
+
- ``giterator.testing.Repo`` makes sample repositories for automated tests,
|
|
40
|
+
with machine-independent configuration and single-call commits.
|
|
41
|
+
|
|
42
|
+
Full documentation is available at http://giterator.readthedocs.org/en/latest/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
giterator
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
|CI|_ |Docs|_
|
|
5
|
+
|
|
6
|
+
.. |CI| image:: https://github.com/simplistix/giterator/actions/workflows/ci.yml/badge.svg
|
|
7
|
+
.. _CI: https://github.com/simplistix/giterator/actions/workflows/ci.yml
|
|
8
|
+
|
|
9
|
+
.. |Docs| image:: https://readthedocs.org/projects/giterator/badge/?version=latest
|
|
10
|
+
.. _Docs: http://giterator.readthedocs.org/en/latest/
|
|
11
|
+
|
|
12
|
+
Python tools for doing git things:
|
|
13
|
+
|
|
14
|
+
- ``Git`` wraps command-line git for scripting everyday repository operations,
|
|
15
|
+
with structured access to the log.
|
|
16
|
+
|
|
17
|
+
- ``read`` and ``write`` replay a repository's history as a series of dated
|
|
18
|
+
snapshots and turn dated snapshots, such as backups, back into history.
|
|
19
|
+
The ``giterator`` command line tool packs and unpacks dated files in the
|
|
20
|
+
same way.
|
|
21
|
+
|
|
22
|
+
- ``giterator.testing.Repo`` makes sample repositories for automated tests,
|
|
23
|
+
with machine-independent configuration and single-call commits.
|
|
24
|
+
|
|
25
|
+
Full documentation is available at http://giterator.readthedocs.org/en/latest/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from collections.abc import Iterator
|
|
3
|
+
from doctest import ELLIPSIS, REPORT_NDIFF
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from sybil import Sybil
|
|
7
|
+
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser, SkipParser
|
|
8
|
+
from testfixtures import Replacer, TempDirectory
|
|
9
|
+
|
|
10
|
+
GIT_CONFIG = (
|
|
11
|
+
b'[user]\n\tname = Giterator\n\temail = giterator@example.com\n[init]\n\tdefaultBranch = main\n'
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@pytest.fixture(scope='module')
|
|
16
|
+
def sandbox() -> Iterator[None]:
|
|
17
|
+
# Module scope makes this one sandbox per document: examples create real
|
|
18
|
+
# repos with relative paths, so each document runs in its own temporary
|
|
19
|
+
# directory, with git pointed away from the machine's own configuration.
|
|
20
|
+
with TempDirectory(cwd=True) as tempdir, Replacer() as replace:
|
|
21
|
+
replace.in_environ('GIT_CONFIG_GLOBAL', tempdir.write('gitconfig', GIT_CONFIG))
|
|
22
|
+
replace.in_environ('GIT_CONFIG_SYSTEM', os.devnull)
|
|
23
|
+
yield
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
pytest_collect_file = Sybil(
|
|
27
|
+
parsers=[
|
|
28
|
+
DocTestParser(optionflags=REPORT_NDIFF | ELLIPSIS),
|
|
29
|
+
PythonCodeBlockParser(),
|
|
30
|
+
SkipParser(),
|
|
31
|
+
],
|
|
32
|
+
pattern='*.rst',
|
|
33
|
+
fixtures=['sandbox', 'tmp_path'],
|
|
34
|
+
).pytest()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= uv run sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
API Reference
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Everything documented here is importable directly from ``giterator``, except
|
|
5
|
+
for :class:`~giterator.testing.Repo`, which lives in ``giterator.testing`` so
|
|
6
|
+
that test-only code is never pulled in by normal use.
|
|
7
|
+
|
|
8
|
+
giterator
|
|
9
|
+
~~~~~~~~~
|
|
10
|
+
|
|
11
|
+
.. automodule:: giterator
|
|
12
|
+
:members:
|
|
13
|
+
:special-members: __call__
|
|
14
|
+
:member-order: bysource
|
|
15
|
+
|
|
16
|
+
.. data:: daily
|
|
17
|
+
:type: Every
|
|
18
|
+
|
|
19
|
+
A daily schedule, for use with :func:`read`.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
giterator.testing
|
|
23
|
+
~~~~~~~~~~~~~~~~~~
|
|
24
|
+
|
|
25
|
+
.. automodule:: giterator.testing
|
|
26
|
+
:members:
|
|
27
|
+
:member-order: bysource
|
|
28
|
+
:show-inheritance:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.. py:currentmodule:: giterator
|
|
2
|
+
|
|
3
|
+
Changes
|
|
4
|
+
=======
|
|
5
|
+
|
|
6
|
+
1.0.0 (6 Jul 2026)
|
|
7
|
+
------------------
|
|
8
|
+
|
|
9
|
+
.. warning:: Breaking changes:
|
|
10
|
+
|
|
11
|
+
- The ``prefix`` parameter of
|
|
12
|
+
:meth:`Repo.commit_content <giterator.testing.Repo.commit_content>` has been renamed
|
|
13
|
+
to ``name`` and is now optional.
|
|
14
|
+
|
|
15
|
+
- Added :func:`read`, which replays the history of a repository as a series of
|
|
16
|
+
:class:`Giteration` snapshots, either one per commit or taken on a schedule such as
|
|
17
|
+
:data:`daily`.
|
|
18
|
+
|
|
19
|
+
- Added :func:`write`, which turns a series of :class:`Giteration` snapshots into commits,
|
|
20
|
+
useful for turning dated copies of a project, such as backups, into version history.
|
|
21
|
+
Combining it with :func:`read` allows a repository's history to be resampled.
|
|
22
|
+
|
|
23
|
+
- The ``giterator`` command line tool has grown ``pack`` and ``unpack`` commands for
|
|
24
|
+
moving between files with dates in their names and commits in a repository.
|
|
25
|
+
|
|
26
|
+
- Added :meth:`Git.log`, which returns the commits in a repository as :class:`Commit`
|
|
27
|
+
instances, giving structured access to the hash, author, committer, dates and full
|
|
28
|
+
message of each commit.
|
|
29
|
+
|
|
30
|
+
- :meth:`Repo.commit_content <giterator.testing.Repo.commit_content>` no longer needs a
|
|
31
|
+
file name, and the content and commit message can now be given when a test cares
|
|
32
|
+
about them.
|
|
33
|
+
|
|
34
|
+
- The documentation has been substantially expanded, and every example in it is now
|
|
35
|
+
executed as part of the test suite.
|
|
36
|
+
|
|
37
|
+
- Fixed a bug where :meth:`Git.clone` failed when the source repository was given as a
|
|
38
|
+
relative path.
|
|
39
|
+
|
|
40
|
+
- Fixed a bug where calling a :class:`Git` instance with environment variable overrides,
|
|
41
|
+
as :meth:`Git.commit` does when given explicit dates, ran ``git`` with only those
|
|
42
|
+
variables rather than the full process environment.
|
|
43
|
+
|
|
44
|
+
0.4.0 (4 Jul 2026)
|
|
45
|
+
------------------
|
|
46
|
+
|
|
47
|
+
- Moved to a `uv`__-based, ``pyproject.toml``-driven project layout, with ``main`` replacing
|
|
48
|
+
``master`` as the default git branch.
|
|
49
|
+
|
|
50
|
+
__ https://docs.astral.sh/uv/
|
|
51
|
+
|
|
52
|
+
- :meth:`Repo.clone <giterator.testing.Repo.clone>` now always ensures a user is configured in
|
|
53
|
+
the clone, whether specified explicitly, inherited from the source repo, or falling back to
|
|
54
|
+
the same default as :meth:`Repo.make <giterator.testing.Repo.make>`, so commits made in
|
|
55
|
+
clones no longer depend on the git config of the machine the tests are running on.
|
|
56
|
+
|
|
57
|
+
- :meth:`Git.init` can now pin the name of the initial branch, and
|
|
58
|
+
:meth:`Repo.make <giterator.testing.Repo.make>` does so by default, using ``main``, so branch
|
|
59
|
+
names in test repos no longer depend on the git config of the machine the tests are running on.
|
|
60
|
+
|
|
61
|
+
0.3.0 (4 Feb 2026)
|
|
62
|
+
------------------
|
|
63
|
+
|
|
64
|
+
- General refresh.
|
|
65
|
+
|
|
66
|
+
- Add ``short`` parameter to methods that return commit hashes,
|
|
67
|
+
allowing the full commit hash to be returned.
|
|
68
|
+
|
|
69
|
+
0.2.0 (1 Oct 2021)
|
|
70
|
+
------------------
|
|
71
|
+
|
|
72
|
+
- Methods that create commits now return the newly-create commit hash.
|
|
73
|
+
|
|
74
|
+
0.1.0 (28 Sep 2021)
|
|
75
|
+
-------------------
|
|
76
|
+
|
|
77
|
+
- Initial release
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from importlib import metadata
|
|
2
|
+
|
|
3
|
+
extensions = [
|
|
4
|
+
'sphinx.ext.autodoc',
|
|
5
|
+
'sphinx.ext.intersphinx',
|
|
6
|
+
]
|
|
7
|
+
|
|
8
|
+
intersphinx_mapping = {
|
|
9
|
+
'python': ('https://docs.python.org/3/', None),
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
# General
|
|
13
|
+
source_suffix = '.rst'
|
|
14
|
+
master_doc = 'index'
|
|
15
|
+
project = 'giterator'
|
|
16
|
+
copyright = '2020 onwards Chris Withers'
|
|
17
|
+
version = release = metadata.version(project)
|
|
18
|
+
exclude_patterns = ['_build']
|
|
19
|
+
pygments_style = 'sphinx'
|
|
20
|
+
autodoc_member_order = 'bysource'
|
|
21
|
+
|
|
22
|
+
# Options for HTML output
|
|
23
|
+
html_theme = 'furo'
|
|
24
|
+
html_title = 'giterator'
|
|
25
|
+
htmlhelp_basename = project + 'doc'
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Development
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
.. highlight:: bash
|
|
5
|
+
|
|
6
|
+
The latest development version of the documentation can be found here:
|
|
7
|
+
|
|
8
|
+
http://giterator.readthedocs.org/en/latest/
|
|
9
|
+
|
|
10
|
+
If you wish to contribute to this project, then you should fork the
|
|
11
|
+
repository found here:
|
|
12
|
+
|
|
13
|
+
https://github.com/simplistix/giterator/
|
|
14
|
+
|
|
15
|
+
Once that has been done and you have a checkout,
|
|
16
|
+
you can follow the instructions below to perform various development tasks.
|
|
17
|
+
|
|
18
|
+
For detailed development guidelines, code style requirements, and additional commands,
|
|
19
|
+
see ``AGENTS.md`` in the repository root.
|
|
20
|
+
|
|
21
|
+
Setting up a development environment
|
|
22
|
+
------------------------------------
|
|
23
|
+
|
|
24
|
+
The recommended way to set up a development environment is to use `uv`__
|
|
25
|
+
to install all groups and extras:
|
|
26
|
+
|
|
27
|
+
__ https://docs.astral.sh/uv/
|
|
28
|
+
|
|
29
|
+
.. code-block:: bash
|
|
30
|
+
|
|
31
|
+
uv sync --all-extras --all-groups
|
|
32
|
+
|
|
33
|
+
Running the tests
|
|
34
|
+
-----------------
|
|
35
|
+
|
|
36
|
+
Once you've set up the environment, the tests can be run from the root of a
|
|
37
|
+
source checkout as follows:
|
|
38
|
+
|
|
39
|
+
.. code-block:: bash
|
|
40
|
+
|
|
41
|
+
uv run pytest
|
|
42
|
+
|
|
43
|
+
Building the documentation
|
|
44
|
+
--------------------------
|
|
45
|
+
|
|
46
|
+
The Sphinx documentation is built by doing the following from the
|
|
47
|
+
repository root:
|
|
48
|
+
|
|
49
|
+
.. code-block:: bash
|
|
50
|
+
|
|
51
|
+
uv run make -C docs html
|
|
52
|
+
|
|
53
|
+
Making a release
|
|
54
|
+
----------------
|
|
55
|
+
|
|
56
|
+
To make a release, just update the version in ``pyproject.toml``,
|
|
57
|
+
update the change log, and push to https://github.com/simplistix/giterator
|
|
58
|
+
and the GitHub Actions release workflow should take care of the rest.
|