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
2 changes: 1 addition & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
search = "version = \"{current_version}\""

[[tool.bumpversion.files]]
filename = "src/template_python/__init__.py"
filename = "src/dycw_template_python/__init__.py"
replace = "__version__ = \"{new_version}\""
search = "__version__ = \"{current_version}\""
75 changes: 41 additions & 34 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,56 @@
name: pull-request
on:
pull_request:
branches:
- master
schedule:
- cron: 0 0 * * *
jobs:
pyright:
name: pyright
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Run 'pre-commit'
uses: dycw/action-pre-commit@latest
with:
enable-cache: true
version: latest
- uses: actions/setup-python@v6
with:
python-version-file: .python-version
- run: uv sync
- run: uv run pyright
ruff:
name: ruff
token: ${{ secrets.GITHUB_TOKEN }}
repos: |-
dycw/pre-commit-hook-nitpick
pre-commit/pre-commit-hooks
pyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
- run: ruff format
test:
name: test / ${{ matrix.os }}
- name: Run 'pyright'
uses: dycw/action-pyright@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
python-version: "3.14"
pytest:
env:
CI: "1"
name: pytest (${{ matrix.os }}, ${{ matrix.python-version }}, ${{
matrix.resolution }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Run 'pytest'
uses: dycw/action-pytest@latest
with:
enable-cache: true
version: latest
- uses: actions/setup-python@v6
with:
python-version-file: .python-version
- run: uv sync
- run: uv run pytest -n=auto
token: ${{ secrets.GITHUB_TOKEN }}
python-version: ${{ matrix.python-version }}
resolution: ${{ matrix.resolution }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
timeout-minutes: 60
name: pull-request
"on":
pull_request:
branches:
- master
python-version:
- "3.14"
resolution:
- highest
ruff:
runs-on: ubuntu-latest
steps:
- name: Run 'ruff'
uses: dycw/action-ruff@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
name: push
on:
push:
branches:
- master
jobs:
tag:
runs-on: ubuntu-latest
Expand All @@ -6,8 +11,3 @@ jobs:
uses: dycw/action-tag@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: push
"on":
push:
branches:
- master
95 changes: 47 additions & 48 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,77 +1,76 @@
repos:
- hooks:
- args:
- --fix
id: ruff-check
- id: ruff-format
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
- hooks:
- args:
- --upgrade
id: uv-lock
repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.18
- hooks:
- args:
- --option
- indent_tables=true
- --option
- indent_entries=true
- --option
- reorder_keys=true
id: taplo-format
repo: https://github.com/compwa/taplo-pre-commit
rev: v0.9.3
- hooks:
- repo: https://github.com/dycw/pre-commit-hook-nitpick
rev: 0.7.3
hooks:
- args:
- --description=Template for Python packages
- --github--pull-request--pre-commit
- --github--pull-request--pyright
- --github--pull-request--pytest--os--macos
- --github--pull-request--pytest--os--ubuntu
- --github--pull-request--pytest--python-version--default
- --github--pull-request--pytest--resolution--highest
- --github--pull-request--ruff
- --github--push--tag
- --package-name=dycw-template
- --package-name=dycw-template-python
- --pre-commit--prettier
- --pre-commit--ruff
- --pre-commit--taplo
- --pre-commit--uv
- --pyproject
- --pyright
- --pyright--include=src
- --pytest
- --pytest--test-paths=src/tests
- --python-package-name=template_python
- --readme
- --repo-name=template-python
- --ruff
id: nitpick
repo: https://github.com/dycw/pre-commit-hook-nitpick
rev: 0.5.0
- hooks:
- id: format-requirements
- id: replace-sequence-str
repo: https://github.com/dycw/pre-commit-hooks
rev: 0.13.26
- hooks:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- args:
- id: mixed-line-ending
args:
- --fix=lf
id: mixed-line-ending
- id: no-commit-to-branch
- args:
- id: pretty-format-json
args:
- --autofix
id: pretty-format-json
- id: trailing-whitespace
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
- hooks:
- entry: npx prettier --write
id: prettier
language: system
- repo: local
hooks:
- id: prettier
name: prettier
entry: npx prettier --write
language: system
types_or:
- markdown
- yaml
repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-check
args:
- --fix
- id: ruff-format
- repo: https://github.com/compwa/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
args:
- --option
- indent_tables=true
- --option
- indent_entries=true
- --option
- reorder_keys=true
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.18
hooks:
- id: uv-lock
args:
- --upgrade
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
authors = [{ email = "d.wan@icloud.com", name = "Derek Wan" }]
dependencies = []
description = "Template for Python packages"
name = "dycw-template"
name = "dycw-template-python"
readme = "README.md"
requires-python = ">= 3.14"
version = "0.1.0"

[tool.uv.build-backend]
module-name = "template_python"
module-root = "src"
1 change: 0 additions & 1 deletion pyrightconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"deprecateTypingAliases": true,
"enableReachabilityAnalysis": false,
"include": [
"script.py",
"src"
],
"pythonVersion": "3.14",
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from template_python import __version__
from dycw_template_python import __version__


class TestMain:
Expand Down
14 changes: 7 additions & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading