forked from nautobot/nautobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
338 lines (324 loc) · 10.9 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
[tool.poetry]
name = "nautobot"
# Primary package version gets set here. This is used for publishing, and once
# installed, `nautobot.__version__` will have this version number.
version = "1.5.12-beta.1"
description = "Source of truth and network automation platform."
authors = ["Network to Code <[email protected]>"]
license = "Apache-2.0"
homepage = "https://nautobot.com"
repository = "https://github.com/nautobot/nautobot"
documentation = "https://docs.nautobot.com"
readme = "README.md"
keywords = ["Nautobot"]
classifiers = [
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
packages = [
{include = "nautobot"}
]
include = [
"CHANGELOG.md",
"CONTRIBUTING.md",
"LICENSE.txt",
"NOTICE",
# Poetry by default will exclude these files as they are in .gitignore
"nautobot/project-static/docs/**/*",
]
[tool.poetry.dependencies]
python = "^3.7"
# Background task processing
celery = "~5.2.7"
# Fundamental web framework for Nautobot
Django = "~3.2.18"
# Adds AJAX capabilities to django-tables2
django-ajax-tables = "~1.1.1"
# LDAP Support
django-auth-ldap = {version = "~4.1.0", optional = true}
# Caching with Redis
django-cacheops = "~6.0"
# Base functionality for task scheduling with Celery
django-celery-beat = "~2.2.1"
# Management of app configuration via the Django admin UI
django-constance = {version = "~2.9.0", extras = ["database"]}
# Permit cross-domain API requests
django-cors-headers = "~3.13.0"
# Support for encrypted database fields
django-cryptography = "~1.0"
# Store files in the database for background tasks
django-db-file-storage = "~0.5.5"
# AutoSlugField and shell_plus
django-extensions = "~3.2.0"
# Advanced query filters
django-filter = "~21.1"
# Health check endpoint
django-health-check = "~3.16.5"
# Django Jinja - jinja2 backend for django, used to easily register custom jinja filters and render jinja.
django-jinja = "~2.10.2"
# Modified Pre-order Tree Traversal - tree structure for Region, RackGroup, etc.
django-mptt = "~0.14.0"
# Prometheus metrics for Django
django-prometheus = "~2.2.0"
# Custom prometheus metrics
prometheus-client = "~0.14.1"
# Redis cache for Django used for distributed locking
django-redis = "~5.2.0"
# RQ (Redis Queueing) for background handling of webhooks, jobs, etc.
django-rq = "~2.5.1"
# External Storage support (i.e. S3)
django-storages = {version = "~1.12.3", optional = true}
# Advanced HTML tables
django-tables2 = "~2.4.1"
# Tags
django-taggit = "~3.0.0"
# Represent time zones in Django
# NOTE: django-timezone-field 4.2.x is available but appears to break our initial migrations?
django-timezone-field = "~4.1.2"
# Tree database structures based on Common Table Expressions
django-tree-queries = "~0.11"
# Run production webservers such as uWSGI/gunicorn as a Django management command.
django-webserver = "~1.2.0"
# REST API framework
djangorestframework = "~3.14.0"
# OpenAPI 3.0 schema generation for the REST API
drf-spectacular = {version = "~0.24.2", extras = ["sidecar"]}
# 2.0 TODO: no longer used, but retained for now to avoid breaking plugin expectations
drf-yasg = {version = "^1.20.0", extras = ["validation"]}
# Git integrations for Python
GitPython = "~3.1.30"
# GraphQL support
graphene-django = "~2.15.0"
# Graphene Optimizer
# NOTE: graphene-django-optimizer 0.9 and later require Graphene v3
graphene-django-optimizer = "~0.8.0"
# Package version detection in older versions of Python
# NOTE: We want to permit newer versions of importlib-metadata to be installed while not forcing
# plugins to move their dependencies ahead. Currently this is a direct dependency until
# Python 3.8+ where our direct dependency becomes part of stdlib.
importlib-metadata = {version = "^4.4", python = "<3.8"}
# Template rendering engine
Jinja2 = "~3.1.0"
# Optional data validation of config contexts
jsonschema = "~4.7.0"
# Rendering of markdown files to HTML
Markdown = "~3.3.7"
# Escape text to use HTML and XML
MarkupSafe = "~2.1.1"
# MySQL database adapter
mysqlclient = {version = "~2.1.0", optional = true}
# NAPALM automation library
napalm = {version = "~3.4.1", optional = true}
# IP prefix and address handling
netaddr = "~0.8.0"
# Library of network related Jinja Filters
# Note: netutils is limited in scope, dependencies, and observes semver, as such
# we permit a looser (^) version constraint here.
netutils = "^1.4.0"
# Image processing library
Pillow = "~9.3.0"
# PostgreSQL database adapter
# NOTE: psycopg3 is avaiable now and nominally replaces psycopg2
psycopg2-binary = "~2.9.5"
# Cryptographic library
pycryptodome = "~3.13.0"
# The uWSGI WSGI HTTP server as a Python module
pyuwsgi = "~2.0.21"
# YAML parsing and rendering
PyYAML = "~6.0"
# Social authentication core
social-auth-core = {version = "~4.3.0", optional = true, extras = ["openidconnect", "saml"]}
# Social authentication/registration with support for many auth providers
social-auth-app-django = "~5.0.0"
# Rendering of SVG images (for rack elevations, etc.)
svgwrite = "~1.4.2"
[tool.poetry.extras]
all = ["django-auth-ldap", "django-storages", "mysqlclient", "napalm", "social-auth-core"]
ldap = ["django-auth-ldap"]
mysql = ["mysqlclient"]
napalm = ["napalm"]
# This is not currently possible, there is a feature request with Poetry https://github.com/python-poetry/poetry/issues/3913
# openid = ["social-auth-core[openidconnect]"]
remote_storage = ["django-storages"]
# This is not currently possible, there is a feature request with Poetry https://github.com/python-poetry/poetry/issues/3913
# saml = ["social-auth-core[saml]"]
sso = ["social-auth-core"]
[tool.poetry.dev-dependencies]
# Code style enforcement
black = "~22.8.0"
# Test code coverage measurement
coverage = "~6.5.0"
# Tool for debugging Django
django-debug-toolbar = "~3.7.0"
# DiscoverSlowestTestsRunner for running CI performance tests and benchmarking.
django-slowtests = "^1.1.1"
# Nautobot example plugin used for testing
example-plugin = {path = "examples/example_plugin", develop = true}
# Nautobot test plugin used for testing core view overrides
example-plugin-with-view-override = { path = "examples/example_plugin_with_view_override", develop = true }
# Random data generation
factory-boy = "~3.2.1"
# Code style checking and limited static analysis
# NOTE: flake8 4.x pins importlib-metadata<4.3; see https://github.com/PyCQA/flake8/pull/1438
flake8 = "~3.9.1"
# Alternative to Make, CLI based on `tasks.py`
invoke = "~1.7.1"
# Rendering docs to HTML
mkdocs = "~1.4.2"
# Automatically generate some files as part of mkdocs build
mkdocs-gen-files = "~0.4.0"
# Allow Markdown files to include other files
mkdocs-include-markdown-plugin = "~3.6.0"
# Material for mkdocs theme
mkdocs-material = "~8.5.8"
# Render custom markdown for version added/changed/remove notes
mkdocs-version-annotations = "~1.0.0"
# Automatic documentation from sources, for MkDocs
mkdocstrings = "0.19"
mkdocstrings-python = "0.7.1"
# Code static analysis
pylint = {version = "~2.14.5", python = "^3.7.2"}
# Pylint extensions for Django
pylint-django = {version = "~2.5.3", python = "^3.7.2"}
# Integration Tests
requests = "~2.27.1"
# Colorization and autoformatting of CLI output, used for Invoke tasks
rich = "~12.5.1"
# Selenium web drivers for live integration testing
selenium = "~4.3.0"
# Abstraction layer for working with Selenium
splinter = "~0.18.0"
# Change log management and generation
towncrier = "~22.8.0"
# Watch files for celery and mkdocs reload
watchdog = "~2.1.9"
[tool.poetry.scripts]
nautobot-server = "nautobot.core.cli:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
target-version = ['py37', 'py38', 'py39', 'py310']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''
[tool.pylint.master]
load-plugins = "pylint_django"
py-version = "3.7"
ignore-paths = [
".*third_party.*"
]
[tool.pylint.basic]
# No docstrings required yet for private functions, or for test_* functions, or for inner Meta classes.
no-docstring-rgx="^(_|test_|Meta$)"
# Don't complain about "pk" as a variable name
good-names = """_,i,j,k,pk"""
[tool.pylint.message_control]
# TODO: re-enable and fix these as time permits
# unused-import is already covered by flake8
disable=""",
abstract-method,
arguments-renamed,
attribute-defined-outside-init,
broad-except,
consider-iterating-dictionary,
consider-using-from-import,
consider-using-in,
consider-using-generator,
cyclic-import,
duplicate-code,
empty-docstring,
exec-used,
fixme,
global-statement,
global-variable-not-assigned,
hard-coded-auth-user,
import-outside-toplevel,
invalid-name,
keyword-arg-before-vararg,
line-too-long,
logging-format-interpolation,
logging-fstring-interpolation,
missing-class-docstring,
missing-function-docstring,
missing-module-docstring,
modelform-uses-exclude,
no-else-raise,
no-else-return,
no-member,
not-callable,
pointless-statement,
pointless-string-statement,
protected-access,
raise-missing-from,
self-assigning-variable,
signature-differs,
super-init-not-called,
super-with-arguments,
superfluous-parens,
too-few-public-methods,
too-many-ancestors,
too-many-arguments,
too-many-boolean-expressions,
too-many-branches,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-nested-blocks,
too-many-public-methods,
too-many-return-statements,
too-many-statements,
ungrouped-imports,
unnecessary-dunder-call,
unspecified-encoding,
unused-argument,
unused-import,
unused-wildcard-import,
use-maxsplit-arg,
wildcard-import,
wrong-import-order,
wrong-import-position,
"""
[tool.pylint.miscellaneous]
# We don't want to fail on "TODO" comments as there are plenty of those in our code for good reason
notes = """,
FIXME,
XXX,
"""
[tool.pylint.typecheck]
# @patch changes the signature of a function it's applied to; don't raise "no-value-for-parameter" here
signature-mutators=["unittest.mock.patch"]
[tool.towncrier]
package = "nautobot"
directory = "changes"
filename = "nautobot/docs/release-notes/version-1.5.md"
template = "development/towncrier_template.j2"
start_string = "<!-- towncrier release notes start -->"
issue_format = "[#{issue}](https://github.com/nautobot/nautobot/issues/{issue})"
[tool.towncrier.fragment.added]
[tool.towncrier.fragment.changed]
[tool.towncrier.fragment.dependencies]
[tool.towncrier.fragment.deprecated]
[tool.towncrier.fragment.fixed]
[tool.towncrier.fragment.removed]
[tool.towncrier.fragment.security]