update project
Some checks failed
pre-commit / main (push) Has been cancelled
Tests / typing (push) Has been cancelled

start 0.3
use uv_build
update dev dependencies
This commit is contained in:
David Lord 2025-10-07 09:44:33 -07:00
parent 1c25aeaa19
commit 721b60615e
No known key found for this signature in database
GPG key ID: 43368A7AA8CC5926
9 changed files with 496 additions and 393 deletions

View file

@ -1,5 +1,5 @@
name: lock inactive closed issues
# Lock closed issues that have not received any further activity for one month.
name: Lock inactive closed issues
# Lock closed issues that have not received any further activity for two weeks.
# This does not close open issues, only humans may do that. It is easier to
# respond to new issues with fresh examples rather than continuing discussions
# on old issues.

View file

@ -7,16 +7,16 @@ jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
prune-cache: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
id: setup-python
with:
python-version-file: pyproject.toml
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ hashFiles('pyproject.toml', '.pre-commit-config.yaml') }}

View file

@ -1,4 +1,4 @@
name: publish
name: Publish
on:
push:
tags: ['*']
@ -6,17 +6,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
prune-cache: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: pyproject.toml
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- run: uv build
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
path: ./dist
create-release:
@ -25,7 +25,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
- name: create release
run: >
gh release create --draft --repo ${{ github.repository }}
@ -41,7 +41,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
- uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
packages-dir: artifact/

View file

@ -1,24 +1,24 @@
name: tests
name: Tests
on:
pull_request:
paths: ['src/**', 'pyproject.toml']
paths-ignore: ['docs/**', 'README.md']
push:
branches: [main, stable]
paths: ['src/**', 'pyproject.toml']
paths-ignore: ['docs/**', 'README.md']
jobs:
typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a # v5.1.0
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
prune-cache: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version-file: pyproject.toml
- name: cache mypy
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ./.mypy_cache
key: mypy|${{ hashFiles('pyproject.toml') }}

1
.gitignore vendored
View file

@ -1,6 +1,5 @@
.idea/
.vscode/
.venv*/
__pycache__/
dist/
.coverage*

View file

@ -1,11 +1,15 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 8d1fdcef5530fb53b66bf6b717bfd2b1ffb0160d # frozen: v0.9.0
rev: 9c89adb347f6b973f4905a4be0051eb2ecf85dea # frozen: v0.13.3
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 2e98dd6776e2c46af176b58966b7e22ea22bf47e # frozen: 0.8.24
hooks:
- id: uv-lock
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements

View file

@ -16,6 +16,10 @@ Create a Python file, subclass {class}`.GitHubScript`, define a few attributes
and its {meth}`~.GitHubScript.modify` method, then call its
{meth}`~.GitHubScript.run` method. See {doc}`script` for a full example.
## Source
The project is hosted on GitHub: <https://github.com/davidism/modify-repos/>.
```{toctree}
:hidden:

View file

@ -1,51 +1,55 @@
[project]
name = "modify-repos"
version = "0.2.0"
version = "0.3.0.dev"
description = "Apply changes across multiple repos at once."
readme = "README.md"
authors = [{ name = "David Lord" }]
license = "MIT"
license-files = ["LICENSE.txt"]
requires-python = "~=3.13.0"
requires-python = ">=3.13.0"
dependencies = [
"click>=8.1.8",
"jinja2>=3.1.5",
"platformdirs>=4.3.6",
]
[project.urls]
Documentation = "https://modify-repos.readthedocs.io"
Changes = "https://modify-repos.readthedocs.io/page/changes/"
Source = "https://github.com/davidism/modify-repos/"
[build-system]
requires = ["pdm-backend>=2.4.3"]
build-backend = "pdm.backend"
requires = ["uv_build>=0.8.24,<0.9.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"mypy>=1.14.1",
"pre-commit>=4.0.1",
"pyright>=1.1.391",
"pytest>=8.3.4",
"ruff>=0.8.6",
"tox>=4.23.2",
"tox-uv>=1.17.0",
]
pre-commit = [
"pre-commit>=4.0.1",
]
typing = [
"mypy>=1.14.1",
"pyright>=1.1.391",
"ruff",
"tox",
"tox-uv",
]
docs = [
"furo>=2024.8.6",
"myst-parser>=4.0.0",
"sphinx>=8.1.3",
"sphinx-autodoc2>=0.5.0",
"furo",
"myst-parser",
"sphinx",
]
docs-auto = [
"sphinx-autobuild>=2024.10.3",
"sphinx-autobuild",
]
gha-update = [
"gha-update>=0.1.0",
"gha-update",
]
pre-commit = [
"pre-commit",
"pre-commit-uv",
]
typing = [
"mypy",
"pyright",
]
[tool.uv]
default-groups = ["dev", "pre-commit", "typing"]
[tool.pytest.ini_options]
testpaths = ["tests"]
@ -92,11 +96,6 @@ select = [
force-single-line = true
order-by-type = false
[tool.gha-update]
tag-only = [
"slsa-framework/slsa-github-generator",
]
[tool.tox]
env_list = ["style", "typing", "docs"]
@ -108,11 +107,13 @@ constrain_package_deps = true
use_frozen_constraints = true
[tool.tox.env.style]
dependency_groups = ["pre-commmit"]
description = "run all pre-commit hooks on all files"
dependency_groups = ["pre-commit"]
skip_install = true
commands = [["pre-commit", "run", "--all-files"]]
[tool.tox.env.typing]
description = "run static type checkers"
dependency_groups = ["typing"]
commands = [
["mypy"],
@ -121,26 +122,33 @@ commands = [
]
[tool.tox.env.docs]
description = "build docs"
dependency_groups = ["docs"]
commands = [["sphinx-build", "-E", "-W", "-b", "dirhtml", "docs", "docs/_build/dirhtml"]]
[tool.tox.env.docs-auto]
description = "continuously rebuild docs and start a local server"
dependency_groups = ["docs", "docs-auto"]
commands = [["sphinx-autobuild", "-W", "-b", "dirhtml", "--watch", "src", "docs", "docs/_build/dirhtml"]]
[tool.tox.env.update-actions]
description = "update GitHub Actions pins"
labels = ["update"]
dependency_groups = ["gha-update"]
skip_install = true
commands = [["gha-update"]]
[tool.tox.env.update-pre_commit]
description = "update pre-commit pins"
labels = ["update"]
dependency_groups = ["pre-commit"]
skip_install = true
commands = [["pre-commit", "autoupdate", "--freeze", "-j4"]]
[tool.tox.env.update-requirements]
description = "update uv lock"
labels = ["update"]
dependency_groups = []
no_default_groups = true
skip_install = true
commands = [["uv", "sync", { replace = "posargs", default = ["-U"], extend = true }]]
commands = [["uv", "lock", {replace = "posargs", default = ["-U"], extend = true}]]

764
uv.lock generated

File diff suppressed because it is too large Load diff