-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (137 loc) · 5.66 KB
/
pyproject.toml
File metadata and controls
148 lines (137 loc) · 5.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# For more information about configuring project metadata for the
# setuptools build backend, please see
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[build-system]
build-backend = "setuptools.build_meta"
requires = [
# 61.0.0 was the first version of setuptools to offer a full-fledged
# backend that uses pyproject.toml for metadata configuration (in
# compliance with PEP 621):
# https://setuptools.pypa.io/en/stable/history.html#v61-0-0
#
# 77.0.0 was the first version of setuptools to support license
# expressions (in compliance with PEP 639):
# https://setuptools.pypa.io/en/stable/history.html#v77-0-0
"setuptools>=77.0.0"
]
[project]
authors = [
{ name = "Cybersecurity and Infrastructure Security Agency", email = "github@cisa.dhs.gov" }
]
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
"Development Status :: 3 - Alpha",
"Environment :: Console",
# Indicate who your project is intended for
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"docopt",
"schema",
]
description = "Example Python library"
dynamic = ["readme", "version"]
keywords = ["skeleton"]
license = "CC0-1.0"
name = "example"
requires-python = ">=3.10"
[project.optional-dependencies]
# IMPORTANT: Keep type hinting-related dependencies of the dev section
# in sync with the mypy pre-commit hook configuration (see
# .pre-commit-config.yaml). Any changes to type hinting-related
# dependencies here should be reflected in the additional_dependencies
# field of the mypy pre-commit hook to avoid discrepancies in type
# checking between environments.
dev = [
"build",
"twine",
"types-docopt",
]
test = [
"coverage",
"coveralls",
"pre-commit",
"pytest-cov",
"pytest",
]
[project.scripts]
example = "example.example:main"
[project.urls]
homepage = "https://github.com/cisagov/skeleton-python-library"
issues = "https://github.com/cisagov/skeleton-python-library/issues"
# Landing page for CISA's cybersecurity mission
mission = "https://www.cisa.gov/cybersecurity"
source = "https://github.com/cisagov/skeleton-python-library"
[tool.flake8]
max-line-length = 80
# Select (turn on)
# * C: Complexity violations reported by mccabe -
# https://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes
# * C4: Default errors and warnings reported by flake8-comprehensions -
# https://github.com/adamchainz/flake8-comprehensions#rules
# * D: Documentation conventions compliance reported by pydocstyle -
# https://github.com/PyCQA/pydocstyle/blob/master/docs/error_codes.rst
# * DUO: Default errors and warnings reported by dlint -
# https://github.com/dlint-py/dlint/tree/master/docs
# * E: Default errors reported by pycodestyle -
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
# * F: Default errors reported by pyflakes -
# https://flake8.pycqa.org/en/latest/glossary.html#term-pyflakes
# * N: Default errors and warnings reported by pep8-naming -
# https://github.com/PyCQA/pep8-naming#error-codes
# * NQA: Default errors and warnings reported by flake8-noqa -
# https://github.com/plinss/flake8-noqa#error-codes
# * W: Default warnings reported by pycodestyle -
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
# * B: Default warnings reported by flake8-bugbear -
# https://github.com/PyCQA/flake8-bugbear#list-of-warnings
# * B950: Bugbear opinionated warning for line too long -
# https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
select = ["C", "C4", "D", "DUO", "E", "F", "N", "NQA", "W", "B", "B950"]
# Ignore
# * E203: pycodestyle's default warning about whitespace before ':' because Black enforces
# an equal amount of whitespace around slice operators (':').
# * E501: pycodestyle's default warning about maximum line length, which has a hard stop
# at the configured value. Instead we use flake8-bugbear's B950, which
# allows up to 10% overage.
# * W503: pycodestyle's warning about line breaks before binary operators. It no longer
# agrees with PEP8. See, for example, here:
# https://github.com/ambv/black/issues/21
# Guido agrees here:
# https://github.com/python/peps/commit/c59c4376ad233a62ca4b3a6060c81368bd21e85b
extend-ignore = ["E203", "E501", "W503"]
[tool.isort]
combine_star = true
force_sort_within_sections = true
import_heading_stdlib = "Standard Python Libraries"
import_heading_thirdparty = "Third-Party Libraries"
import_heading_firstparty = "cisagov Libraries"
# Run isort under the black profile to align with our other Python
# linting
profile = "black"
[tool.pytest.ini_options]
# Increase verbosity, display extra test summary info for tests that
# did not pass, display code coverage results, and enable debug
# logging.
addopts = "--verbose -ra --cov --log-cli-level=DEBUG"
[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
version = {attr = "example._version.__version__"}
[tool.setuptools.package-data]
example = ["data/*.txt"]