nvitop/pyproject.toml
2023-03-27 07:38:17 +00:00

166 lines
4.5 KiB
TOML

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "nvitop"
description = "An interactive NVIDIA-GPU process viewer and beyond, the one-stop solution for GPU process management."
readme = "README.md"
requires-python = ">= 3.7"
authors = [{ name = "Xuehai Pan", email = "XuehaiPan@pku.edu.cn" }]
license = { text = "Apache License, Version 2.0 (Apache-2.0) & GNU General Public License, Version 3 (GPL-3.0)" }
keywords = [
"nvidia",
"nvidia-smi",
"NVIDIA",
"NVML",
"CUDA",
"GPU",
"top",
"monitoring",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Environment :: GPU",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: Console",
"Environment :: Console :: Curses",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"Topic :: System :: Hardware",
"Topic :: System :: Monitoring",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
dependencies = [
# Sync with nvitop/version.py and requirements.txt
"nvidia-ml-py >= 11.450.51, < 11.526.0a0",
"psutil >= 5.6.6",
"cachetools >= 1.0.1",
"termcolor >= 1.0.0",
"colorama >= 0.4.0; platform_system == 'Windows'",
"windows-curses >= 2.2.0; platform_system == 'Windows'",
]
dynamic = ["version", "optional-dependencies"]
[project.scripts]
nvitop = "nvitop.cli:main"
nvisel = "nvitop.select:main"
[project.urls]
Homepage = "https://github.com/XuehaiPan/nvitop"
Repository = "https://github.com/XuehaiPan/nvitop"
Documentation = "https://nvitop.readthedocs.io"
"Bug Report" = "https://github.com/XuehaiPan/nvitop/issues"
[tool.setuptools.packages.find]
include = ["nvitop", "nvitop.*"]
[tool.black]
safe = true
line-length = 100
skip-string-normalization = true
target-version = ["py37", "py38", "py39", "py310", "py311"]
[tool.isort]
atomic = true
profile = "black"
src_paths = ["nvitop"]
indent = 4
line_length = 100
lines_after_imports = 2
multi_line_output = 3
[tool.pydocstyle]
convention = "google"
match-dir = '^(?!(gui|callbacks|docs))[^\.].*'
[tool.codespell]
ignore-words = "docs/source/spelling_wordlist.txt"
[tool.ruff]
target-version = "py37"
line-length = 100
show-source = true
src = ["nvitop"]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"N", # pep8-naming
"UP", # pyupgrade
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"RUF", # ruff
]
ignore = [
# E501: line too long
# W505: doc line too long
# too long docstring due to long example blocks
"E501",
"W505",
# ANN101: missing type annotation for `self` in method
# ANN102: missing type annotation for `cls` in classmethod
"ANN101",
"ANN102",
# ANN401: dynamically typed expressions (typing.Any) are disallowed
"ANN401",
# S101: use of `assert` detected
# internal use and may never raise at runtime
"S101",
# SIM105: use `contextlib.suppress(...)` instead of try-except-pass
# reduce unnessary function call
"SIM105",
]
[tool.ruff.per-file-ignores]
"__init__.py" = [
"F401", # unused-import
]
"setup.py" = [
"ANN", # flake8-annotations
]
"nvitop/api/lib*.py" = [
"N", # pep8-naming
"ANN", # flake8-annotations
]
"nvitop/callbacks/*.py" = [
"ANN", # flake8-annotations
]
"nvitop/gui/**/*.py" = [
"ANN", # flake8-annotations
]
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
inline-quotes = "single"
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"