mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
169 lines
5.3 KiB
TOML
169 lines
5.3 KiB
TOML
|
|
[build-system]
|
|
build-backend = "poetry.core.masonry.api"
|
|
requires = ["poetry-core"]
|
|
|
|
[tool.poetry]
|
|
authors = ["Matt Love <matt@hyperglass.dev>"]
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Intended Audience :: Information Technology",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Programming Language :: TypeScript",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Topic :: Internet",
|
|
"Topic :: System :: Networking",
|
|
]
|
|
description = "hyperglass is the modern network looking glass that tries to make the internet better."
|
|
documentation = "https://hyperglass.dev"
|
|
homepage = "https://hyperglass.dev"
|
|
keywords = ["looking glass", "network automation", "isp", "bgp", "routing"]
|
|
license = "BSD-3-Clause-Clear"
|
|
name = "hyperglass"
|
|
readme = "README.md"
|
|
repository = "https://github.com/thatmattlove/hyperglass"
|
|
version = "2.0.0-dev"
|
|
|
|
[tool.poetry.scripts]
|
|
hyperglass = "hyperglass.console:run"
|
|
|
|
[tool.poetry.dependencies]
|
|
Pillow = "^8.3.2"
|
|
PyJWT = "^2.0.1"
|
|
PyYAML = "^5.4.1"
|
|
aiofiles = "^0.7.0"
|
|
distro = "^1.5.0"
|
|
fastapi = "^0.73.0"
|
|
favicons = ">=0.1.0,<1.0"
|
|
gunicorn = "^20.1.0"
|
|
httpx = "^0.20.0"
|
|
loguru = "^0.5.3"
|
|
netmiko = "^3.4.0"
|
|
paramiko = "^2.12.0"
|
|
psutil = "^5.7.2"
|
|
py-cpuinfo = "^8.0.0"
|
|
pydantic = {extras = ["dotenv"], version = "^1.9.0"}
|
|
python = ">=3.8.1,<4.0"
|
|
redis = "^3.5.3"
|
|
rich = "^10.11.0"
|
|
typer = "^0.4.0"
|
|
typing-extensions = "^3.7.4"
|
|
uvicorn = {extras = ["standard"], version = "^0.15.0"}
|
|
uvloop = "^0.16.0"
|
|
xmltodict = "^0.12.0"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
bandit = "^1.7.4"
|
|
black = "^22.12.0"
|
|
isort = "^5.10.1"
|
|
pep8-naming = "^0.13.2"
|
|
pre-commit = "^2.20.0"
|
|
pytest = "^7.2.0"
|
|
pytest-asyncio = "^0.20.3"
|
|
pytest-dependency = "^0.5.1"
|
|
ruff = "v0.0.194"
|
|
stackprinter = "^0.2.10"
|
|
taskipy = "^1.10.3"
|
|
|
|
[tool.black]
|
|
line-length = 100
|
|
|
|
[tool.isort]
|
|
balanced_wrapping = true
|
|
force_single_line = false
|
|
import_heading_firstparty = "Project"
|
|
import_heading_localfolder = "Local"
|
|
import_heading_stdlib = "Standard Library"
|
|
import_heading_thirdparty = "Third Party"
|
|
include_trailing_comma = true
|
|
indent = ' '
|
|
known_third_party = ["starlette", "fastapi", "inquirer"]
|
|
length_sort = true
|
|
line_length = 100
|
|
multi_line_output = 3
|
|
profile = "black"
|
|
skip_glob = "hyperglass/api/examples/*.py"
|
|
|
|
[tool.pyright]
|
|
exclude = ["**/node_modules", "**/ui", "**/__pycache__"]
|
|
include = ["hyperglass"]
|
|
pythonVersion = "3.9"
|
|
reportMissingImports = true
|
|
reportMissingTypeStubs = true
|
|
|
|
[tool.taskipy.tasks]
|
|
check = {cmd = "task lint && task ui-lint", help = "Run all lint checks"}
|
|
docs-platforms = {cmd = "python3 -c 'from hyperglass.util.docs import create_platform_list;print(create_platform_list())'"}
|
|
format = {cmd = "black hyperglass", help = "Run Black"}
|
|
lint = {cmd = "ruff hyperglass", help = "Run Ruff Linter"}
|
|
sort = {cmd = "isort hyperglass", help = "Run iSort"}
|
|
start = {cmd = "python3 -m hyperglass.main", help = "Start hyperglass"}
|
|
start-asgi = {cmd = "uvicorn hyperglass.api:app", help = "Start hyperglass via Uvicorn"}
|
|
test = {cmd = "pytest hyperglass --ignore hyperglass/plugins/external", help = "Run hyperglass tests"}
|
|
ui-build = {cmd = "python3 -m hyperglass.console build-ui", help = "Run a UI Build"}
|
|
ui-dev = {cmd = "yarn --cwd ./hyperglass/ui/ dev", help = "Start the Next.JS dev server"}
|
|
ui-format = {cmd = "yarn --cwd ./hyperglass/ui/ format", help = "Run Prettier"}
|
|
ui-lint = {cmd = "yarn --cwd ./hyperglass/ui/ lint", help = "Run ESLint"}
|
|
ui-typecheck = {cmd = "yarn --cwd ./hyperglass/ui/ typecheck", help = "Run TypeScript Check"}
|
|
upgrade = {cmd = "python3 version.py", help = "Upgrade hyperglass version"}
|
|
yarn = {cmd = "yarn --cwd ./hyperglass/ui/", help = "Run a yarn command from the UI directory"}
|
|
|
|
[tool.ruff]
|
|
exclude = [
|
|
".git",
|
|
"__pycache__",
|
|
"hyperglass/ui",
|
|
"hyperglass/plugins/external",
|
|
"hyperglass/api/examples/*.py",
|
|
"hyperglass/compat/_sshtunnel.py",
|
|
]
|
|
ignore = [
|
|
# "W503",
|
|
"RET504",
|
|
"D202", # "S403",
|
|
# "S301",
|
|
# "S404",
|
|
"E731",
|
|
"D203", # Blank line before docstring.
|
|
"D213", # Multiline docstring summary on second line.
|
|
"D402",
|
|
"D406",
|
|
"D407",
|
|
"B008",
|
|
"I001",
|
|
"D418", # No docstring on overloaded functions.
|
|
"N818", # Error suffix on custom exceptions.
|
|
"RET501", # Explicitly return None
|
|
"B905", # zip without `strict`
|
|
]
|
|
line-length = 100
|
|
select = ["B", "C", "D", "E", "F", "I", "N", "S", "RET", "W"]
|
|
|
|
[tool.ruff.mccabe]
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"hyperglass/main.py" = ["E402"]
|
|
# Disable classmethod warning for validator decorat
|
|
"hyperglass/configuration/models/*.py" = ["N805"]
|
|
"hyperglass/defaults/*/*.py" = ["E501"]
|
|
"hyperglass/models/*.py" = ["N805", "E501"]
|
|
"hyperglass/models/api/*.py" = ["N805", "E501"]
|
|
"hyperglass/models/commands/*.py" = ["N805", "E5"]
|
|
"hyperglass/parsing/models/*.py" = ["N805"]
|
|
# Disable unused import warning for modules
|
|
"hyperglass/*/__init__.py" = ["F401"]
|
|
"hyperglass/models/*/__init__.py" = ["F401"]
|
|
# Disable assertion and docstring checks on tests.
|
|
"hyperglass/**/test_*.py" = ["S101", "D103", "D100", "D104"]
|
|
"hyperglass/**/tests/*.py" = ["S101", "D103", "D100", "D104"]
|
|
"hyperglass/**/tests/__init__.py" = ["D103", "D100", "D104"]
|
|
"hyperglass/state/hooks.py" = ["F811"]
|
|
# Ignore whitespace in docstrings
|
|
"hyperglass/cli/static.py" = []
|
|
# Ignore docstring standards
|
|
"hyperglass/cli/*.py" = ["B904"]
|
|
"hyperglass/cli/main.py" = ["D400", "D403", "D415"]
|