Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/labeler.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/auto-label.yaml

This file was deleted.

38 changes: 22 additions & 16 deletions .github/workflows/bot.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
name: bot
name: autofix.ci
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
pull_request

permissions:
contents: write
pull-requests: write
pull_request:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

jobs:
uv-lock:
permissions:
contents: write
runs-on: ubuntu-latest
if: github.repository == 'mscheltienne/template-python' # prevent running on forks
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: astral-sh/setup-uv@v6
- run: uv lock --upgrade
- name: Commit changes
- uses: autofix-ci/action@v1.3.2
if: ${{ github.event_name == 'pull_request' }}
- name: Push lock file changes
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add uv.lock
git diff --staged --quiet || git commit -m "Update uv.lock"
git push
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
if [ -n "$(git status --porcelain)" ]; then
git add uv.lock
git commit -m "Upgrade uv.lock"
git push origin main
fi

auto-merge:
needs: uv-lock
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') && github.repository == 'mscheltienne/template-python'
if: ${{ github.event_name == 'pull_request' && (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') }}
steps:
- name: Enable auto-merge for bot PRs
run: gh pr merge --auto --squash "$PR_URL"
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/stubs.yaml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ following steps are required:
- [ ] Enable `pre-commit.ci` on https://pre-commit.ci/
- [ ] Edit `README.md`
- [ ] Edit `MANIFEST.in`
- [ ] Edit the package import in `tools/stubgen.py`
- [ ] Remove the conda-forge recipe from the ignored files in ``.yamllint.yaml``
- [ ] Edit the triggers in the release workflow, setup PyPI trusted publishing, and
remove the publishing URL to test PyPI
Expand Down
5 changes: 0 additions & 5 deletions template/__init__.pyi

This file was deleted.

4 changes: 3 additions & 1 deletion template/_commands/tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from __future__ import annotations

from click.testing import CliRunner

from ..main import run


def test_main():
def test_main() -> None:
"""Test the main package entry-point."""
runner = CliRunner()
result = runner.invoke(run, ["--help"])
Expand Down
2 changes: 2 additions & 0 deletions template/_commands/tests/test_sys_info.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pytest
from click.testing import CliRunner

Expand Down
2 changes: 0 additions & 2 deletions template/utils/__init__.pyi

This file was deleted.

10 changes: 6 additions & 4 deletions template/utils/_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

import numpy as np

from ._docs import fill_doc

if TYPE_CHECKING:
from typing import Any

Expand Down Expand Up @@ -179,13 +177,17 @@ def check_value(
)


@fill_doc
def ensure_verbose(verbose: Any) -> int:
"""Ensure that the value of verbose is valid.

Parameters
----------
%(verbose)s
verbose : int | str | bool | None
Sets the verbosity level. The verbosity increases gradually between
``"CRITICAL"``, ``"ERROR"``, ``"WARNING"``, ``"INFO"`` and ``"DEBUG"``. If
``None`` is provided, the verbosity is set to ``"WARNING"``. If a bool is
provided, the verbosity is set to ``"WARNING"`` for ``False`` and to ``"INFO"``
for ``True``.

Returns
-------
Expand Down
115 changes: 0 additions & 115 deletions template/utils/_checks.pyi

This file was deleted.

Loading