Skip to content

Commit

Permalink
Update project's settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rexzhang committed Aug 10, 2023
1 parent e45a232 commit 8833980
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 33 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/check-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ name: pytest
on:
push:
paths-ignore:
- '*.md'
- 'docs/**'
- '.github/**'
- "*.md"
- "docs/**"
- ".github/**"

pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.10.1
hooks:
- id: pyupgrade
args: [ --py37-plus ]
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
args: [ "--target-version", "py37" ]

args: ["--target-version", "py37"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
1 change: 1 addition & 0 deletions example/example_django/example_django/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from django.conf import settings
from django.core.asgi import get_asgi_application

from asgi_middleware_static_file import ASGIMiddlewareStaticFile

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_django.settings")
Expand Down
1 change: 1 addition & 0 deletions example/example_quart.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

from quart import Quart

from asgi_middleware_static_file import ASGIMiddlewareStaticFile

BASE_DIR = os.path.dirname(__name__)
Expand Down
24 changes: 19 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
# https://peps.python.org/pep-0621
# https://setuptools.pypa.io/en/latest/userguide/quickstart.html
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
requires = ["setuptools>=61.0", "wheel"]
requires = [
"setuptools>=61.0",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -13,20 +16,29 @@ requires-python = ">=3.7"
license = { text = "MIT" }
authors = [
{ name = "Rex Zhang" },
{ email = "rex.zhang@gmail.com" }
{ email = "rex.zhang@gmail.com" },
]
keywords = [
"staticfile",
"middleware",
"asgi",
"asyncio",
]
keywords = ["staticfile", "middleware", "asgi", "asyncio"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]

dynamic = ["version", "dependencies"]
dynamic = [
"version",
"dependencies",
]

[project.urls]
homepage = "https://github.com/rexzhang/asgi-middleware-static-file"
Expand All @@ -35,7 +47,9 @@ repository = "https://github.com/rexzhang/asgi-middleware-static-file"
changelog = "https://github.com/rexzhang/asgi-middleware-static-file/blob/main/README.md#history"

[tool.setuptools]
packages = ["asgi_middleware_static_file"]
packages = [
"asgi_middleware_static_file",
]

[tool.setuptools.dynamic]
version = { attr = "asgi_middleware_static_file.VERSION" }
Expand Down
21 changes: 3 additions & 18 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
[metadata]
# This includes the license file(s) in the wheel.
# https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file
license_files = LICENSE

[bdist_wheel]
# This flag says to generate wheels that support both Python 2 and Python
# 3. If your code will not run unchanged on both Python 2 and 3, you will
# need to generate separate wheels for each Python version that you
# support. Removing this line (or setting universal to 0) will prevent
# bdist_wheel from trying to make a universal wheel. For more see:
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#wheels
universal = 1

[flake8]
# https://black.readthedocs.io/en/stable/the_black_code_style.html
# W293 blank line contains whitespace
# https://www.flake8rules.com/
# E203 Whitespace before ':'
max-line-length = 88
extend-ignore = E203, W293
# E501 Line too long (82 > 79 characters)
extend-ignore = E203, E501

0 comments on commit 8833980

Please sign in to comment.