From 8f979719a0aac4e3ed3f20a404349a50cbcd2a7f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 22 Mar 2026 07:50:32 -0400 Subject: [PATCH] Remove poethepoet, use direct commands in CI Replace all poe task runner usage with direct pytest/sphinx/ruff commands. Remove poethepoet dependency and [tool.poe.tasks] config. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/docs.yaml | 21 +++++------------ .github/workflows/test.yaml | 9 +++---- docs/source/sandbox.md | 11 +++++---- pyproject.toml | 47 ------------------------------------- 4 files changed, 17 insertions(+), 71 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index b69dc17..fa1f71b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,13 +14,8 @@ concurrency: jobs: documentation: - name: "Documentation: Python ${{ matrix.python-version }} on ${{ matrix.os }}" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest"] - python-version: ["3.13"] + name: "Documentation" + runs-on: ubuntu-latest env: UV_SYSTEM_PYTHON: true @@ -30,25 +25,21 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: "3.13" - name: Set up uv uses: astral-sh/setup-uv@v5 with: version: "latest" enable-cache: true - cache-suffix: ${{ matrix.python-version }} cache-dependency-glob: | pyproject.toml - name: Install package and documentation dependencies - run: | - uv pip install '.[develop,docs]' + run: uv pip install '.[docs]' - name: Run link checker - run: | - poe docs-linkcheck + run: sphinx-build -W --keep-going -b linkcheck docs/source docs/build - name: Build static HTML documentation - run: | - poe docs-html + run: sphinx-build -W --keep-going docs/source docs/build diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bef9624..5a9c07c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -49,7 +49,8 @@ jobs: cache-dependency-glob: | pyproject.toml - - name: Install and validate package - run: | - uv pip install '.[develop,test]' - poe check + - name: Install package + run: uv pip install '.[develop,test]' + + - name: Run tests + run: pytest diff --git a/docs/source/sandbox.md b/docs/source/sandbox.md index 7981cd4..4f91590 100644 --- a/docs/source/sandbox.md +++ b/docs/source/sandbox.md @@ -12,24 +12,25 @@ uv venv ``` Install project in editable mode, including -all runtime extensions and development tools. +all development tools. ```shell uv pip install --upgrade --editable '.[develop,docs,release,test]' ``` ## Operations -Invoke linter and software tests. +Run tests. ```shell source .venv/bin/activate -poe check +pytest ``` Format code. ```shell -poe format +ruff format . +ruff check --fix . ``` Documentation authoring. ```shell -poe docs-autobuild +sphinx-autobuild --open-browser --watch docs/source docs/source docs/build ``` diff --git a/pyproject.toml b/pyproject.toml index 1304b2b..edba9e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,6 @@ dependencies = [ [project.optional-dependencies] develop = [ - "poethepoet", "pyproject-fmt", "ruff", "validate-pyproject", @@ -182,49 +181,3 @@ implicit_optional = true install_types = true namespace_packages = true non_interactive = true - -[tool.poe.tasks] - -check = [ - "test", -] - -docs-autobuild = [ - { cmd = "sphinx-autobuild --open-browser --watch docs/source docs/source docs/build" }, -] -docs-html = [ - { cmd = "sphinx-build -W --keep-going docs/source docs/build" }, -] -docs-linkcheck = [ - { cmd = "sphinx-build -W --keep-going -b linkcheck docs/source docs/build" }, -] - -format = [ - { cmd = "ruff format ." }, - # Configure Ruff not to auto-fix (remove!): - # unused imports (F401), unused variables (F841), `print` statements (T201), and commented-out code (ERA001). - { cmd = "ruff check --fix --ignore=ERA --ignore=F401 --ignore=F841 --ignore=T20 --ignore=ERA001 ." }, - { cmd = "pyproject-fmt --keep-full-version pyproject.toml" }, -] - -lint = [ - { cmd = "ruff format --check ." }, - { cmd = "ruff check ." }, - { cmd = "validate-pyproject pyproject.toml" }, - { cmd = "mypy" }, -] - -release = [ - { cmd = "python -m build" }, - { cmd = "twine upload --skip-existing dist/*" }, -] - -[tool.poe.tasks.test] -cmd = "pytest" -help = "Invoke software tests" - -[tool.poe.tasks.test.args.expression] -options = [ "-k" ] - -[tool.poe.tasks.test.args.marker] -options = [ "-m" ]