chore: migrate to poetry

This commit is contained in:
Mike 2021-06-17 16:36:29 -07:00
parent c9a80834ac
commit db1a2d0358
6 changed files with 2430 additions and 30 deletions

View file

@ -1,4 +0,0 @@
[run]
omit =
*/migrations/*
eav/__init__.py

2220
poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

79
pyproject.toml Normal file
View file

@ -0,0 +1,79 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.nitpick]
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/nitpick-style-wemake.toml"
[tool.black]
target-version = ['py36', 'py37', 'py38']
skip-string-normalization = true
include = '\.pyi?$'
[tool.poetry]
name = "eav"
description = "This is a Python package to learn Github actions!"
version = "0.15.0"
license = "GNU Lesser General Public License (LGPL), Version 3"
authors = [
"Mauro Lizaur <mauro@sdf.org>",
]
readme = "README.md"
repository = "https://github.com/Dresdn/py-pkg-playground"
keywords = [
"django",
"django-eav2",
"database",
"eav",
"sql",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Python",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
]
[tool.poetry.dependencies]
python = "^3.6.2"
[tool.poetry.dev-dependencies]
django = "^3.2"
mypy = "^0.902"
wemake-python-styleguide = "^0.15"
flake8-pytest-style = "^1.4"
nitpick = "^0.26"
safety = "^1.10"
pytest = "^6.2"
pytest-cov = "^2.12"
pytest-randomly = "^3.0"
sphinx = "^4.0"
sphinx-autodoc-typehints = "^1.12"
doc8 = "^0.8"
m2r2 = "^0.2"
tomlkit = "^0.7"
pytest-pythonpath = "^0.7.3"
pytest-django = "^4.4.0"
tox-poetry-installer = "^0.8.1"
black = "^21.6b0"

View file

@ -1 +0,0 @@
Django>=3.1

131
setup.cfg Normal file
View file

@ -0,0 +1,131 @@
# All configuration for plugins and other utils is defined here.
# Read more about `setup.cfg`:
# https://docs.python.org/3/distutils/configfile.html
[flake8]
format = wemake
show-source = True
doctests = False
statistics = False
# darglint configuration:
# https://github.com/terrencepreilly/darglint
strictness = long
docstring-style = numpy
# Plugins:
max-complexity = 6
max-line-length = 80
exclude =
# Trash and cache:
.git
__pycache__
.venv
.eggs
*.egg
temp
django_test_app
ignore =
D100,
D104,
D401,
W504,
X100,
RST303,
RST304,
DAR103,
DAR203
per-file-ignores =
django_test_app/main_app/migrations/*.py: N806, WPS102, WPS114
django_test_app/django_test_app/settings.py: S105, WPS226, WPS407
tests/test_*.py: N806, S101, S404, S603, S607, WPS118, WPS226, WPS432, WPS442
[isort]
# isort configuration:
# https://github.com/timothycrosley/isort/wiki/isort-Settings
include_trailing_comma = true
use_parentheses = true
# See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 3
line_length = 80
# Useful for our test app:
known_first_party = main_app
[tool:pytest]
# Django options:
# https://pytest-django.readthedocs.io/en/latest/
DJANGO_SETTINGS_MODULE = django_test_app.settings
# PYTHONPATH configuration:
# https://github.com/bigsassy/pytest-pythonpath
python_paths = ./django_test_app ./eav
# py.test options:
norecursedirs =
*.egg
.eggs
dist
build
docs
.tox
.git
__pycache__
# You will need to measure your tests speed with `-n auto` and without it,
# so you can see whether it gives you any performance gain, or just gives
# you an overhead. See `docs/template/development-process.rst`.
addopts =
--strict-markers
--strict-config
--doctest-modules
--cov=eav
--cov-report=term-missing:skip-covered
--cov-report=html
--cov-report=xml
--cov-branch
--cov-fail-under=100
[coverage:run]
# Why do we exclude this file from coverage?
# Because coverage is not calculated correctly for pytest plugins.
# And we completely test it anyway.
omit = */.tox/*
[coverage:report]
skip_covered = True
show_missing = True
sort = Cover
exclude_lines =
pragma: no cover
# type hinting related code
if TYPE_CHECKING:
[mypy]
# mypy configurations: http://bit.ly/2zEl9WI
allow_redefinition = False
check_untyped_defs = True
disallow_any_explicit = True
disallow_any_generics = True
disallow_untyped_calls = True
ignore_errors = False
ignore_missing_imports = True
implicit_reexport = False
strict_optional = True
strict_equality = True
local_partial_types = True
no_implicit_optional = True
warn_no_return = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
warn_unreachable = True

View file

@ -1,25 +0,0 @@
from setuptools import setup, find_packages
setup(
name = 'django-eav2',
version = __import__('eav').__version__,
license = 'GNU Lesser General Public License (LGPL), Version 3',
requires = ['python (>= 3.6)', 'django (>= 3.1)'],
provides = ['eav'],
description = 'Entity-Attribute-Value storage for Django',
url = 'http://github.com/lvm/django-eav2',
packages = find_packages(),
maintainer = 'Mauro Lizaur',
maintainer_email = 'mauro@sdf.org',
classifiers = [
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'Programming Language :: Python',
'Topic :: Database',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)