-
-
Save iagoalonsomrf/0400fa8e9dc520ac47f180f554fd772b to your computer and use it in GitHub Desktop.
Example configuration files for Python packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[build-system] | |
requires = [ | |
"setuptools", | |
"wheel", | |
] | |
build-backend = "setuptools.build_meta" | |
[tool.black] | |
line-length = 120 | |
skip-string-normalization = true | |
[tool.mypy] | |
check_untyped_defs = true | |
warn_redundant_casts = true | |
warn_unused_ignores = true | |
disallow_any_generics = true | |
disallow_incomplete_defs = true | |
disallow_untyped_defs = true | |
no_implicit_optional = true | |
no_implicit_reexport = true | |
[[tool.mypy.overrides]] | |
module = [ | |
"testing.*", | |
"tests.*", | |
] | |
disallow_untyped_defs = false | |
[tool.pytest.ini_options] | |
addopts = [ | |
"-vvv", | |
] | |
minversion = "6.0" | |
testpaths = [ | |
"tests", | |
] | |
filterwarnings = [ | |
"ignore::DeprecationWarning", | |
] | |
[tool.coverage.run] | |
source = ["package_name"] | |
plugins = ["covdefaults"] | |
[tool.tox] | |
legacy_tox_ini = """ | |
[tox] | |
envlist = py36, py37, py38, py39 | |
[testenv] | |
deps = pytest pytest-cov | |
commands = pytest tests | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[metadata] | |
name = <package_name> | |
version = attr: <package_name>.__version__ | |
description = <description> | |
long_description = file: README.md | |
long_description_content_type = text/markdown | |
url = https://github.com/<user>/<package> | |
author = <author> | |
author_email = <email> | |
classifiers = | |
Operating System :: POSIX :: Linux | |
Programming Language :: Python :: 3 | |
Programming Language :: Python :: 3 :: Only | |
Programming Language :: Python :: 3.6 | |
Programming Language :: Python :: 3.7 | |
Programming Language :: Python :: 3.8 | |
Programming Language :: Python :: 3.9 | |
Programming Language :: Python :: Implementation :: CPython | |
Typing :: Typed | |
keywords = <keywords> | |
[options] | |
packages = find: | |
install_requires = | |
rich>=10.10.0 | |
toml | |
python_requires = >=3.6.1 | |
include_package_data = True | |
[options.packages.find] | |
exclude = | |
tests* | |
[options.entry_points] | |
console_scripts = | |
<package_name> = <package_name>.main:cli | |
[options.extras_require] | |
dev = | |
flake8 | |
mypy | |
types-toml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment