From 6294c075bcd66114c33b958b9fab8b40d44dece4 Mon Sep 17 00:00:00 2001 From: Brian Krabach Date: Sat, 4 Apr 2026 14:53:40 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20address=20code=20review=20=E2=80=94=20pu?= =?UTF-8?q?blish.yml=20permissions,=20test=20docstrings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add contents: read permission to publish.yml (required for actions/checkout) when any permission is explicitly set, unlisted permissions default to none - Add timeout-minutes: 15 to publish.yml for consistency with ci.yml - Add docstrings to 3 pyproject metadata test functions for consistency with the rest of the 2000+ line test file --- .github/workflows/publish.yml | 2 ++ muxplex/tests/test_cli.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 44251ad..f862e50 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,11 +6,13 @@ on: - "v*" permissions: + contents: read # Required for actions/checkout id-token: write # Required for OIDC Trusted Publisher jobs: publish: runs-on: ubuntu-latest + timeout-minutes: 15 environment: pypi steps: - uses: actions/checkout@v4 diff --git a/muxplex/tests/test_cli.py b/muxplex/tests/test_cli.py index 37e5122..185f437 100644 --- a/muxplex/tests/test_cli.py +++ b/muxplex/tests/test_cli.py @@ -2061,6 +2061,7 @@ def test_doctor_tls_nudge_hidden_on_localhost(capsys, tmp_path, monkeypatch): def test_pyproject_has_authors(): + """pyproject.toml must declare at least one author with name and email.""" import tomllib pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml" data = tomllib.loads(pyproject.read_text()) @@ -2071,6 +2072,7 @@ def test_pyproject_has_authors(): def test_pyproject_has_classifiers(): + """pyproject.toml must declare at least 3 classifiers including License and Python version.""" import tomllib pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml" data = tomllib.loads(pyproject.read_text()) @@ -2082,6 +2084,7 @@ def test_pyproject_has_classifiers(): def test_pyproject_has_keywords(): + """pyproject.toml must declare at least 3 keywords for PyPI discoverability.""" import tomllib pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml" data = tomllib.loads(pyproject.read_text())