forked from nautobot/nautobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
428 lines (401 loc) · 13.5 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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
[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 = "2.3.14b1"
description = "Source of truth and network automation platform."
authors = ["Network to Code <opensource@networktocode.com>"]
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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
packages = [
{include = "nautobot"}
]
include = [
# Rendered documentation - Poetry by default would exclude these files as they are in .gitignore
"nautobot/project-static/docs/**/*",
]
exclude = [
# Source code of the documentation doesn't need to be included since we package the rendered docs
"nautobot/docs/**/*",
]
[tool.poetry.dependencies]
python = ">=3.8,<3.13"
# Background task processing
celery = "~5.3.6"
# Fundamental web framework for Nautobot
Django = "~4.2.17"
# Adds AJAX capabilities to django-tables2
django-ajax-tables = "~1.1.1"
# LDAP Support
django-auth-ldap = {version = "~4.8.0", optional = true}
# Base functionality for task scheduling with Celery
django-celery-beat = "~2.6.0"
# Provides a database backend & models for Celery task results
django-celery-results = "~2.5.1"
# Management of app configuration via the Django admin UI
django-constance = "~3.1.0"
# Permit cross-domain API requests
django-cors-headers = "~4.4.0"
# Store files in the database for background tasks
django-db-file-storage = "~0.5.6.1"
# AutoSlugField and shell_plus
django-extensions = "~3.2.3"
# Advanced query filters
django-filter = "~24.2"
# Health check endpoint
django-health-check = "~3.18.3"
# Django Jinja - jinja2 backend for django, used to easily register custom jinja filters and render jinja.
django-jinja = "~2.11.0"
# Prometheus metrics for Django
django-prometheus = "~2.3.1"
# Redis cache for Django used for distributed locking
django-redis = "~5.4.0"
# Django silk for request profiling
django-silk = "~5.1.0"
# External Storage support (i.e. S3)
# Pinned temporarily to 1.14.3 due to https://github.com/revsys/django-health-check/issues/434
django-storages = {version = "1.14.3", optional = true}
# Structured logging for Django
django-structlog = {version = "^8.1.0", extras = ["celery"]}
# Advanced HTML tables
django-tables2 = "~2.7.0"
# Tags
django-taggit = "~5.0.0"
# Represent time zones in Django
django-timezone-field = "~7.0"
# Tree database structures based on Common Table Expressions
django-tree-queries = "~0.19.0"
# Run production webservers such as uWSGI/gunicorn as a Django management command.
django-webserver = "~1.2.0"
# REST API framework
djangorestframework = "~3.15.2"
# Adds JSON schema support to API endpoints for rendering JSON schema forms.
drf-react-template-framework = "^0.0.17"
# OpenAPI 3.0 schema generation for the REST API
drf-spectacular = {version = "~0.27.2", extras = ["sidecar"]}
# Emoji terminal output for Python.
emoji = "~2.12.1"
# Git integrations for Python
GitPython = "~3.1.43"
# GraphQL support
# NOTE: graphene-django 3.x is available but includes breaking changes. Will address in a future release.
graphene-django = "~2.16.0"
# Graphene Optimizer
# NOTE: graphene-django-optimizer 0.9 and later require Graphene v3
graphene-django-optimizer = "~0.8.0"
# Template rendering engine
Jinja2 = "~3.1.4"
# Optional data validation of config contexts - loose dependency since our usage is light but apps may be more specific
jsonschema = "^4.7.0"
# Messaging library for Python - dependency of Celery
# Included as an explicit dependency (for now?) to require a version with https://github.com/celery/kombu/pull/2007
kombu = "~5.4.2"
# Rendering of markdown files to HTML
Markdown = "~3.6"
# Escape text to use HTML and XML
MarkupSafe = "~2.1.5"
# MySQL database adapter
mysqlclient = {version = "~2.2.6", optional = true}
# NAPALM automation library
napalm = {version = ">=4.1.0,<6.0.0", optional = true}
# IP prefix and address handling
netaddr = "~1.3.0"
# Library of network related utilities including network driver mappings and Jinja Filters
# Note: netutils is limited in scope, dependencies, and observes semver, as such
# we permit a looser (^) version constraint here.
netutils = "^1.6.0"
# HTML sanitization
nh3 = "~0.2.19"
# Handling of version numbers
packaging = ">=23.1"
# Image processing library
Pillow = "~10.3.0"
# Custom prometheus metrics
prometheus-client = "~0.20.0"
# PostgreSQL database adapter
# NOTE: psycopg3 is available now and nominally replaces psycopg2
psycopg2-binary = "~2.9.10"
# A Python slugify application that handles unicode.
python-slugify = "~8.0.3"
# The uWSGI WSGI HTTP server as a Python module
pyuwsgi = "~2.0.26"
# YAML parsing and rendering
PyYAML = "~6.0.2"
# Social authentication core
# Note that social-auth-app-django (below) is *not* an optional dependency, and it requires social-auth-core in turn.
# The only part of this dependency that is actually optional is in fact social-auth-core's "saml" extra.
social-auth-core = {version = "~4.5.3", optional = true, extras = ["saml"]}
# Social authentication/registration with support for many auth providers
social-auth-app-django = "~5.4.2"
# 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.group.dev.dependencies]
# Tool for debugging Django
django-debug-toolbar = "~4.4.0"
# DiscoverSlowestTestsRunner for running CI performance tests and benchmarking.
django-slowtests = "^1.1.1"
# Nautobot example App used for testing
example-app = {path = "examples/example_app", develop = true}
# Nautobot test App used for testing core view overrides
example-app-with-view-override = {path = "examples/example_app_with_view_override", develop = true}
# Random data generation
factory-boy = "~3.3.1"
# Factory Boy dependency. Don't upgrade to v26.x until breaking change is fixed https://github.com/joke2k/faker/issues/2070
faker = ">=0.7.0,<26.0.0"
# Alternative to Make, CLI based on `tasks.py`
invoke = "~2.2.0"
# Colorization and autoformatting of CLI output, used for Invoke tasks
rich = "~13.7.1"
# Change log management and generation
towncrier = "~23.11.0"
# Watch files for celery and mkdocs reload
watchdog = "~4.0.2"
[tool.poetry.group.docs.dependencies]
# Rendering docs to HTML
mkdocs = "~1.6.1"
# Embedding YAML files into Markdown documents as tables
markdown-data-tables = "~1.0.0"
# Render custom markdown for version added/changed/remove notes
markdown-version-annotations = "~1.0.1"
# Automatically generate some files as part of mkdocs build
mkdocs-gen-files = "~0.5.0"
# Image lightboxing in mkdocs
mkdocs-glightbox = "^0.4.0"
# Allow Markdown files to include other files
# 3.0 TODO: remove this, as we don't actually use it any more since 2.0?
mkdocs-include-markdown-plugin = ">=4.0.4"
# Use Jinja2 templating in docs - see optional-settings.md and required-settings.md
mkdocs-macros-plugin = "~1.0.5"
# Material for mkdocs theme
mkdocs-material = "~9.5.48"
# Handle docs redirections
mkdocs-redirects = "~1.2.2"
# Automatically handle index pages for docs sections
mkdocs-section-index = "~0.3.9"
# Automatic documentation from sources, for MkDocs
mkdocstrings = "~0.25.2"
# Python-specific extension to mkdocstrings
mkdocstrings-python = "~1.10.9"
[tool.poetry.group.linting.dependencies]
# Code static analysis
pylint = "~3.2.7"
# Pylint extensions for Django
pylint-django = "~2.5.3"
# Combination linter and code formatter
ruff = "~0.5.7"
# YAML linting
yamllint = "~1.35.1"
[tool.poetry.group.testing.dependencies]
# Test code coverage measurement - pinned to 6.4.0 to resolve https://github.com/nedbat/coveragepy/issues/1420
coverage = "6.4.0"
# DiscoverSlowestTestsRunner for running CI performance tests and benchmarking.
django-slowtests = "^1.1.1"
# Integration Tests
requests = "~2.32.2"
# Selenium web drivers for live integration testing
selenium = "~4.22.0"
# Abstraction layer for working with Selenium
splinter = "~0.21.0"
# Serialization of tracebacks - used when running unittest with --parallel flag
tblib = "~3.0.0"
# Time travel for testing, used in ScheduledJob tests etc.
time-machine = "~2.15.0"
[tool.poetry.scripts]
nautobot-server = "nautobot.core.cli:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
concurrency = ["multiprocessing", "thread"]
omit = [
# Don't measure coverage of test code
"nautobot/**/tests/**/*.py",
"nautobot/core/testing/*.py",
"nautobot/extras/test_jobs/*.py",
]
[tool.pylint.master]
load-plugins = "pylint_django"
py-version = "3.8"
ignore-paths = [
".*third_party.*",
"nautobot/extras/tests/git_data/02-invalid-files/",
]
jobs = 0
[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 ruff
disable=""",
abstract-method,
arguments-differ,
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-break,
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.ruff]
line-length = 120
target-version = "py38"
extend-exclude = [
# Intentionally malformed files
"nautobot/extras/tests/git_data/02-invalid-files/jobs",
]
[tool.ruff.lint]
select = [
"DJ", # flake8-django
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PIE", # flake8-pie
"RUF", # ruff itself
"S", # flake8-bandit
"W", # pycodestyle
]
ignore = [
"E501", # pycodestyle: line-too-long
"PIE808", # unnecessary-range-start
"RUF012", # mutable-class-default - see https://github.com/astral-sh/ruff/issues/5243
]
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-local-folder = ["example_app"]
order-by-type = false
[tool.towncrier]
package = "nautobot"
directory = "changes"
filename = "nautobot/docs/release-notes/version-2.3.md"
template = "development/towncrier_template.j2"
start_string = "<!-- towncrier release notes start -->"
issue_format = "[#{issue}](https://github.com/nautobot/nautobot/issues/{issue})"
[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "dependencies"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "housekeeping"
name = "Housekeeping"
showcontent = true