🔧 upgrade tooling, use pyproject.toml
This commit is contained in:
parent
250888879f
commit
ff9c0b42ec
4 changed files with 44 additions and 92 deletions
|
|
@ -1,22 +1,24 @@
|
|||
repos:
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.12.0
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.6.3
|
||||
hooks:
|
||||
- id: isort
|
||||
args: ['--profile', 'black', '--filter-files']
|
||||
- repo: https://github.com/psf/black
|
||||
rev: '23.9.1' # Replace by any tag/version: https://github.com/psf/black/tags
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3 # Should be a command that runs python3.6+
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: '6.1.0' # pick a git hash / tag to point to
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-bugbear==21.4.3]
|
||||
exclude: ^.*/migrations/.*$
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/Riverside-Healthcare/djLint
|
||||
rev: v1.33.0
|
||||
rev: v1.35.2
|
||||
hooks:
|
||||
- id: djlint-reformat-django
|
||||
- id: djlint-django
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: v9.9.1
|
||||
hooks:
|
||||
- id: eslint
|
||||
files: \.(js|ts|vue)?$
|
||||
types: [file]
|
||||
args: [--no-warn-ignored]
|
||||
entry: npx eslint
|
||||
additional_dependencies:
|
||||
- okfde/eslint-config-froide
|
||||
26
pyproject.toml
Normal file
26
pyproject.toml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[project]
|
||||
name = "froide_govplan"
|
||||
readme = "README.md"
|
||||
description = ""
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Framework :: Django",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Utilities",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
dependencies = ["froide"]
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["froide_govplan"]
|
||||
17
setup.cfg
17
setup.cfg
|
|
@ -1,17 +0,0 @@
|
|||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[flake8]
|
||||
extend-ignore = E203,E501,C901,W503,B950
|
||||
max-line-length = 88
|
||||
select = C,E,F,W,B
|
||||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
||||
max-complexity = 10
|
||||
|
||||
[isort]
|
||||
profile = black
|
||||
src_paths = froide
|
||||
default_section = THIRDPARTY
|
||||
known_first_party = froide
|
||||
known_django = django
|
||||
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||
59
setup.py
59
setup.py
|
|
@ -1,59 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import codecs
|
||||
import os
|
||||
import re
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
|
||||
def read(*parts):
|
||||
filename = os.path.join(os.path.dirname(__file__), *parts)
|
||||
with codecs.open(filename, encoding="utf-8") as fp:
|
||||
return fp.read()
|
||||
|
||||
|
||||
def find_version(*file_paths):
|
||||
version_file = read(*file_paths)
|
||||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
|
||||
if version_match:
|
||||
return version_match.group(1)
|
||||
raise RuntimeError("Unable to find version string.")
|
||||
|
||||
|
||||
setup(
|
||||
name="froide_govplan",
|
||||
version=find_version("froide_govplan", "__init__.py"),
|
||||
url="https://github.com/okfde/froide-govplan",
|
||||
license="MIT",
|
||||
description="Froide govplan app",
|
||||
long_description=read("README.md"),
|
||||
author="Stefan Wehrmeyer",
|
||||
author_email="mail@stefanwehrmeyer.com",
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
"froide",
|
||||
"django-cms",
|
||||
"django-filer",
|
||||
"psycopg[binary]",
|
||||
"django-admin-sortable2",
|
||||
"bleach",
|
||||
"django-tinymce",
|
||||
"django-oauth-toolkit",
|
||||
"django-mfa3",
|
||||
],
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Framework :: Django",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Topic :: Utilities",
|
||||
],
|
||||
zip_safe=False,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue