From fc875209a4961f12e93bbf10e248bbfa1e1ee525 Mon Sep 17 00:00:00 2001 From: Peter Hodge Date: Sun, 3 May 2026 08:51:03 +1000 Subject: [PATCH 1/3] Also need to fetch all branches --- .github/workflows/automated-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/automated-release.yaml b/.github/workflows/automated-release.yaml index 60b1869..90418b5 100644 --- a/.github/workflows/automated-release.yaml +++ b/.github/workflows/automated-release.yaml @@ -33,6 +33,7 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 # update 'doc' branch also + - run: git fetch --all - run: git checkout doc - run: git merge origin/master --ff-only - run: git push origin doc From 8fe87f5ad0d716ec8cda12fba3ab16c1aba457f3 Mon Sep 17 00:00:00 2001 From: Peter Hodge Date: Sat, 2 May 2026 14:32:19 +1000 Subject: [PATCH 2/3] Add a .clonetopath(... submodules) kwarg --- homely/_ui.py | 2 +- homely/_vcs/__init__.py | 2 +- homely/_vcs/git.py | 7 +++++-- homely/_vcs/testhandler.py | 2 +- test/system/test_homely_add_repolist.py | 4 ++-- test/unit/homely/_vcs/test_git.py | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/homely/_ui.py b/homely/_ui.py index 5bad126..48ba41e 100644 --- a/homely/_ui.py +++ b/homely/_ui.py @@ -273,7 +273,7 @@ def addfromremote(repo, dest_path): note("HOME: %s" % os.environ["HOME"]) note("tmp: %s" % tmp) note("Cloning %s to tmp:%s" % (repo.repo_path, tmp)) - repo.clonetopath(tmp) + repo.clonetopath(tmp, submodules=True) # find out the first commit id localrepo = repo.frompath(tmp) diff --git a/homely/_vcs/__init__.py b/homely/_vcs/__init__.py index 8634d78..34600a0 100644 --- a/homely/_vcs/__init__.py +++ b/homely/_vcs/__init__.py @@ -81,7 +81,7 @@ def getrepoid(self) -> str: "%s.%s needs to implement .getrepoid()" % ( self.__class__.__module__, self.__class__.__name__)) - def clonetopath(self, dest: str) -> None: + def clonetopath(self, dest: str, submodules: bool) -> None: """ Clone the repo at into Note that if self.pushablepath is None, then self.path will be used diff --git a/homely/_vcs/git.py b/homely/_vcs/git.py index 4579ded..8525fc4 100644 --- a/homely/_vcs/git.py +++ b/homely/_vcs/git.py @@ -81,9 +81,12 @@ def pullchanges(self) -> None: raise SystemError(f"Unexpected output from 'git pull': {err!r}") - def clonetopath(self, dest: str) -> None: + def clonetopath(self, dest: str, submodules: bool) -> None: origin = self.repo_path - execute(['git', 'clone', '--recurse-submodules', origin, dest]) + cmd = ['git', 'clone'] + if submodules: + cmd.append('--recurse-submodules') + execute(cmd + [origin, dest]) def getrepoid(self) -> str: assert not self.isremote diff --git a/homely/_vcs/testhandler.py b/homely/_vcs/testhandler.py index c327d77..bb41851 100644 --- a/homely/_vcs/testhandler.py +++ b/homely/_vcs/testhandler.py @@ -37,7 +37,7 @@ def frompath(class_, repo_path: str) -> "Optional[homely._vcs.Repo]": iscanonical=False, suggestedlocal=None) - def clonetopath(self, dest_path: str) -> None: + def clonetopath(self, dest_path: str, submodules: bool) -> None: assert not os.path.exists(dest_path) os.mkdir(dest_path) with open(os.path.join(dest_path, ORIGINFILE), 'w') as f: diff --git a/test/system/test_homely_add_repolist.py b/test/system/test_homely_add_repolist.py index 04b4cf1..b304e93 100644 --- a/test/system/test_homely_add_repolist.py +++ b/test/system/test_homely_add_repolist.py @@ -110,7 +110,7 @@ def test_homely_add_repolist(tmpdir, HOME): localrepo3 = os.path.join(HOME, 'repo3') # use a Repo instance to clone it into our home dir manually from homely._vcs.testhandler import Repo - Repo.frompath(repo3.url).clonetopath(localrepo3) + Repo.frompath(repo3.url).clonetopath(localrepo3, submodules=False) # test adding a repo from the local dir assert not os.path.exists(HOME + '/r3.txt') @@ -133,6 +133,6 @@ def test_homely_add_repolist(tmpdir, HOME): localrepo4 = os.path.join(HOME, 'repo4') # use a Repo instance to clone it into our home dir manually from homely._vcs.testhandler import Repo - Repo.frompath(repo4.url).clonetopath(localrepo4) + Repo.frompath(repo4.url).clonetopath(localrepo4, submodules=False) system(HOMELY('add') + ['.'], cwd=localrepo4) checkrepolist(HOME, system, [repo1, repo2, repo3, repo4]) diff --git a/test/unit/homely/_vcs/test_git.py b/test/unit/homely/_vcs/test_git.py index c86a22c..202eb34 100644 --- a/test/unit/homely/_vcs/test_git.py +++ b/test/unit/homely/_vcs/test_git.py @@ -55,7 +55,7 @@ def test_git(tmpdir): assert fake1repo.isdirty() clone1path = os.path.join(tmpdir, 'clone1') - fake1repo.clonetopath(clone1path) + fake1repo.clonetopath(clone1path, submodules=False) clone1repo = Repo.frompath(clone1path) assert clone1repo.getrepoid() == fake1repo.getrepoid() @@ -92,7 +92,7 @@ def test_clonetopath_recurses_submodules(tmpdir, monkeypatch): # clone via Repo.clonetopath() parentrepo = Repo.frompath(parentpath) clonepath = os.path.join(tmpdir, 'clone') - parentrepo.clonetopath(clonepath) + parentrepo.clonetopath(clonepath, submodules=True) # the submodule should already be initialised and checked out sub_readme = Path(clonepath) / 'libs/the_submodule' / 'README.md' From 151bd079beee21c2834cbdf7e1e0017a8faf179c Mon Sep 17 00:00:00 2001 From: Peter Hodge Date: Tue, 5 May 2026 20:34:22 +1000 Subject: [PATCH 3/3] Bump version to 0.23.3; update CHANGELOG --- CHANGELOG.rst | 6 ++++++ homely/__init__.py | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bad14df..29c5d67 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,12 @@ =========== +Version 0.23.3 - 3 May 2026 +--------------------------- + +* Internal refactorings; no user-facing changes. + + Version 0.23.2 - 3 May 2026 --------------------------- diff --git a/homely/__init__.py b/homely/__init__.py index d9558b5..dfaa652 100644 --- a/homely/__init__.py +++ b/homely/__init__.py @@ -1 +1 @@ -version = "0.23.2" +version = "0.23.3" diff --git a/pyproject.toml b/pyproject.toml index 8e5a19d..5da48f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ classifiers=[ requires-python = ">=3.10" # this also needs to be updated in homely/__init__.py # and uv.lock by running "uv lock" -version = "0.23.2" +version = "0.23.3" dependencies = [ "python-daemon>=2.3.0", diff --git a/uv.lock b/uv.lock index a1a6e7c..4f1558c 100644 --- a/uv.lock +++ b/uv.lock @@ -311,7 +311,7 @@ wheels = [ [[package]] name = "homely" -version = "0.23.2" +version = "0.23.3" source = { editable = "." } dependencies = [ { name = "click" },