-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
205 lines (168 loc) · 6.83 KB
/
pyproject.toml
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
[metadata]
description-file = "README.md"
[build-system]
# virtualenv 20.0.34 partly breaks pre-commit under conda
# https://github.com/ContinuumIO/anaconda-issues/issues/12094
# Poetry uses pip and setuptools (although they're not included as dependencies)
# We don't need to list wheel here, but setting a min vr can avoid generating inferior wheels
requires = ["poetry>=1.1,<2", "virtualenv==20.0.33", "wheel>=0.37,<1.0"]
build-backend = "poetry.masonry.api"
#########################################################################################
# Poetry metadata
#########################################################################################
[tool.poetry]
name = "tyrannosaurus"
version = "0.11.0"
description = "Generate beautifully modern Python projects with seamless, GitHub-based CI/CD and loads of integrations."
authors = ["Douglas Myers-Turnbull"]
maintainers = ["Douglas Myers-Turnbull"]
license = "Apache-2.0"
readme = "README.md"
keywords = ["python", "template", "pyproject-toml", "python-poetry", "conda-build"]
homepage = "https://github.com/dmyersturnbull/tyrannosaurus"
repository = "https://github.com/dmyersturnbull/tyrannosaurus"
documentation = "https://tyrannosaurus.readthedocs.io"
classifiers = [
"Development Status :: 3 - Alpha",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Environment :: Console",
"Framework :: tox",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Code Generators"
]
[tool.poetry.urls]
CI = "https://github.com/dmyersturnbull/tyrannosaurus/actions"
Issues = "https://github.com/dmyersturnbull/tyrannosaurus/issues"
Download = "https://pypi.org/project/tyrannosaurus/"
Changelog = "https://github.com/dmyersturnbull/tyrannosaurus/blob/main/CHANGELOG.md"
#########################################################################################
# Tyrannosaurus
#########################################################################################
# Only needed for using 'tyrannosaurus sync' -- you can remove otherwise!
[tool.tyrannosaurus.options]
align = true
sort = true
[tool.tyrannosaurus.sources]
doc_license = "'CC BY 4.0'"
doc_license_url = "'https://creativecommons.org/licenses/by/4.0'"
status = "'Development'"
date = "'${today}'"
version = "tool.poetry.version"
release = "tool.poetry.version"
linelength = "tool.black.line-length"
copyright = "'Douglas Myers-Turnbull 2020–2022'"
authors = [
"Douglas Myers-Turnbull <github:dmyersturnbull,orcid:0000-0003-3610-4808>"
]
maintainers = "tool.tyrannosaurus.sources.authors"
long_description = """'
An opinionated, forwards-looking Python template for 2021. Generate elegant, ready-to-use Python projects that have
excellent continuous integration and deployment (CI/CD). Integrated with Docker Hub, the GitHub Container Registry, Azure,
Conda-Forge, and an array of linting, static analysis, security testing, documentation, dependency management, and
CI/CD tools, including a custom tool to keep all duplicate project metadata synchronized to a single pyproject.toml.
You only need to interact with your project via git, tyrannosaurus, and GitHub releases – all other integrations
kick off from there.
'"""
[tool.tyrannosuarus.paths]
recipe = "'recipes/${name}/meta.yaml'"
environment = "'environment.yml'"
[tool.tyrannosaurus.targets]
pyproject = true
init = true
precommit = true
tox = true
docs = true
recipes = true
license = true
authors = true
github = true
travis = true
scrutinizer = true
dockerfile = true
readme = true
changelog = true
citation = true
codemeta = true
headers = false
environment = false
#########################################################################################
# Poetry build & dependencies
#########################################################################################
[tool.poetry.scripts]
tyrannosaurus = "tyrannosaurus.cli:cli"
[tool.poetry.dependencies]
python = "^3.9"
tomlkit = ">=0.11, <1"
typer = {version="^0.6", extras=["all"]}
httpx = ">=0.23, <1"
grayskull = "^1.8"
[tool.poetry.group.test.dependencies]
bandit = "^1.7"
flake8 = "^5"
flake8-bugbear = ">=22"
flake8-comprehensions = "^3"
flake8-docstrings = "^1.6"
flake8-simplify = "^0.19"
coverage = {version = "^6", extras = ["toml"]}
nbqa = "^1.4"
pre-commit = "^2.20"
pytest = "^7"
pytest-cov = "^3"
[tool.poetry.group.docs.dependencies]
sphinx = "^5"
sphinx-autoapi = "^1.8"
sphinx-copybutton = "^0.5"
sphinx-rtd-theme = "^1"
#########################################################################################
# Testing
#########################################################################################
# This will be used in a future version of pytest:
#[tool.pytest]
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(name)s: %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
#########################################################################################
# Changelog generation
#########################################################################################
[tool.commitizen]
name = "cz_conventional_commits"
[tool.towncrier]
filename = "NEWS.md"
#########################################################################################
# Style checking
#########################################################################################
[tool.coverage.paths]
source = ["tyrannosaurus"]
[tool.coverage.run]
source = ["tyrannosaurus"]
[tool.coverage.report]
show_missing = true
[tool.black]
line-length = 100
target-version = ["py39", "py310", "py311"]
[tool.isort]
line_length = 100
profile = "black"
[mypy]
check_untyped_defs = true
strict_optional = true
# ------- THE FOLLOWING ARE NOT USED BY THEIR RESPECTIVE TOOLS --------
# --- There are open discussions about supporting pyproject for each ---
# https://github.com/python/mypy/issues/5205
# https://github.com/PyCQA/bandit/issues/606
# https://github.com/PyCQA/pycodestyle/issues/813
# https://github.com/PyCQA/pydocstyle/issues/447
[tool.bandit]
[tool.pycodestyle]
max-line-length = 100
statistics = true
[tool.pydocstyle]