Skip to content

Commit

Permalink
feat: py312
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Jul 31, 2024
1 parent 3ae6345 commit 30a7537
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 44 deletions.
36 changes: 36 additions & 0 deletions .git-commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

convention:
commitTypes:
- feat
- fix
- perf
- refactor
- style
- test
- build
- ops
- docs
- merge
commitScopes: []
releaseTagGlobPattern: v[0-9]*.[0-9]*.[0-9]*

changelog:
commitTypes:
- feat
- fix
- perf
- merge
includeInvalidCommits: true
commitScopes: []
commitIgnoreRegexPattern: "^WIP "
headlines:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
merge: Merges
breakingChange: BREAKING CHANGES
commitUrl: https://github.com/klen/muffin-session/commit/%commit%
commitRangeUrl: https://github.com/klen/muffin-session/compare/%from%...%to%?diff=split
issueRegexPattern: "#[0-9]+"
issueUrl: https://github.com/klen/muffin-session/issues/%issue%
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@main
Expand All @@ -34,7 +34,7 @@ jobs:
run: poetry install --with dev

- name: Check code
run: poetry run ruff muffin_session
run: poetry run ruff check muffin_session

- name: Check typing
run: poetry run mypy
Expand Down
95 changes: 60 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,73 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

fail_fast: true
default_install_hook_types: [commit-msg, pre-commit, pre-push]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-case-conflict
- id: check-toml
- id: check-ast
- id: debug-statements

- repo: https://github.com/psf/black
rev: 23.1.0
- repo: https://github.com/qoomon/git-conventional-commits
rev: 'v2.6.7'
hooks:
- id: black
- id: conventional-commits
args: ["-c", ".git-commits.yaml"]
stages: ["commit-msg"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
stages: ["pre-commit"]
- id: check-merge-conflict
stages: ["pre-commit"]
- id: check-added-large-files
stages: ["pre-commit"]
args: ['--maxkb=5000']
- id: check-ast
stages: ["pre-commit"]
- id: check-executables-have-shebangs
stages: ["pre-commit"]
- id: check-symlinks
stages: ["pre-commit"]
- id: check-toml
stages: ["pre-commit"]
- id: check-yaml
stages: ["pre-commit"]
- id: debug-statements
stages: ["pre-commit"]
- id: end-of-file-fixer
stages: ["pre-commit"]
- id: trailing-whitespace
stages: ["pre-commit"]

- repo: https://github.com/python-poetry/poetry
rev: '1.5.1'
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: poetry-check
- id: poetry-lock
args: ["--no-update"]
- id: black
stages: ["pre-commit"]

- repo: local
hooks:
- id: ruff
name: ruff
entry: ruff check muffin_session
language: system
pass_filenames: false
files: \.py$
stages: ["pre-commit"]

- id: mypy
name: mypy
entry: mypy
language: system
pass_filenames: false
files: \.py$
stages: ["pre-push"]

- id: mypy
name: mypy
entry: poetry run mypy
language: system
pass_filenames: false

- id: ruff
name: ruff
entry: poetry run ruff muffin_session
language: system
pass_filenames: false

- id: pytest
name: pytest
entry: poetry run pytest
language: system
pass_filenames: false
- id: pytest
name: pytest
entry: pytest
language: system
pass_filenames: false
files: \.py$
stages: ["pre-push"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ VIRTUAL_ENV ?= .venv
# Development
# =============

$(VIRTUAL_ENV): poetry.lock
$(VIRTUAL_ENV): poetry.lock .pre-commit-config.yaml
@poetry install --with dev
@poetry run pre-commit install --hook-type pre-push
@poetry run pre-commit install
@touch $(VIRTUAL_ENV)

.PHONY: test
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Features
Requirements
=============

- python >= 3.8
- python >= 3.9

.. _installation:

Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -24,7 +23,7 @@ classifiers = [
]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
muffin = "^0"
asgi-sessions = { version = "^1", extras = ["jwt"] }

Expand Down Expand Up @@ -60,7 +59,7 @@ ignore_missing_imports = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38,py39,py310,py311,pypy39
envlist = py39,py310,py311,py312,pypy39
[testenv]
deps = -e .[tests]
Expand All @@ -75,7 +74,9 @@ commands =

[tool.ruff]
line-length = 100
target-version = "py38"
target-version = "py39"

[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ARG",
Expand Down

0 comments on commit 30a7537

Please sign in to comment.