lainiwa/buglog

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"


[tool.black]
line-length = 79
exclude = '''
(
  /(
      \.eggs         # exclude a few common directories in the
    | \.git          # root of the project
    | \.hg
    | \.mypy_cache
    | \.tox
    | \.venv
    | _build
    | buck-out
    | build
    | dist
  )/
  | foo.py           # also separately exclude a file named foo.py in
                     # the root of the project
  | /src/buglog/data/config.py
)
'''


[tool.flakehell]
format = "colored"  # colored/grouped/stat/json/gitlab
show_source = true
max_line_length = 79
# mccabe
max_complexity = 6
# flake8-annotations-complexity
max_annotations_complexity = 4
no_accept_encodings = true
# flake8-expression-complexity
max_expression_complexity = 7

[tool.flakehell.plugins]
# Enable all first
dlint      = ["+*"]
pyflakes   = ["+*"]
# pylint     = ["+*"]
pep8-naming = ["+*"]
"flake8-*" = ["+*"]
# Then disable some
flake8-bandit = ["+*",
  "-S101",  # Use of assert detected
  "-S404",  # Consider possible security implications associated with CalledProcessError module
  "-S603",  # Subprocess call - check for execution of untrusted input
  "-S607",  # Starting a process with a partial executable path
]
flake8-cognitive-complexity = ["-*"]
flake8-docstrings = ["-*"]
flake8-print = ["-*"]
mccabe = ["-*"]

[tool.flakehell.exceptions."docs/conf.py"]
"flake8-builtins" = ["+*",
  "-A001",  # Variable is shadowing a python builtin
]

[tool.flakehell.exceptions."**/data/config.py"]
"flake8-*" = ["-*"]
"pep8-naming" = ["-*"]


[tool.poetry]
name = "buglog"
version = "0.1.0"
description = ""
license = "MIT"
authors = ["lainiwa <kirrik96@gmail.com>"]
# maintainers
readme = "README.rst"
homepage = "https://github.com/lainiwa/buglog"
repository = "https://github.com/lainiwa/buglog"
documentation = "https://buglog.readthedocs.io"
# keywords
classifiers = [
  "Development Status :: 2 - Pre-Alpha",
  "Environment :: Console :: Curses",
  "Intended Audience :: End Users/Desktop",
  "License :: OSI Approved :: MIT License",
  "Natural Language :: English",
  "Operating System :: POSIX :: Linux",
  "Programming Language :: Python :: 3.7",
  "Programming Language :: Python :: 3.8",
  "Programming Language :: Python :: Implementation :: CPython",
  # "Topic :: Office/Business :: ......",
  "Topic :: Utilities",
  "Typing :: Typed",
]
# packages
include = [
    "LICENSE",
]
# exclude

[tool.poetry.dependencies]
python         = ">=3.7,<3.9"
beautifulsoup4 = "*"
blessings      = "*"
click          = "*"
docutils       = "*"
httpx          = "*"
prompt_toolkit = "*"
readchar       = "*"
xdg            = "*"
timefhuman = { git = "https://github.com/alvinwan/timefhuman", rev = "ae31f38" }
pydantic = { version = "*", extras = ["typing_extensions"] }
# Extra: lint
dead                          = { optional = true, version = "*" }
dlint                         = { optional = true, version = "*" }  # Encourage best practices + security
flake8                        = { optional = true, version = "*" }
flake8-alfred                 = { optional = true, version = "*" }  # Check for unsafe/obsolete symbols
flake8-annotations            = { optional = true, version = "*" }
flake8-annotations-complexity = { optional = true, version = "*" }  # Validate annotations complexity
flake8-bandit                 = { optional = true, version = "*" }  # Check security
flake8-broken-line            = { optional = true, version = "*" }  # Don't break the line
flake8-bugbear                = { optional = true, version = "*" }  # Likely bugs and design problems
flake8-builtins               = { optional = true, version = "*" }  # Builtins used as variables or parameters
flake8-cognitive-complexity   = { optional = true, version = "*" }  # Functions' cognitive complexity
flake8-comprehensions         = { optional = true, version = "*" }  # Better list/set/dict comprehensions
flake8-debugger               = { optional = true, version = "*" }  # Check for debug statements
flake8-docstrings             = { optional = true, version = "*" }  # Checks provided by pep257
flake8-eradicate              = { optional = true, version = "*" }  # Commented out or dead code
flake8-executable             = { optional = true, version = "*" }  # Executable flags and shebangs
flake8-expression-complexity  = { optional = true, version = "*" }  # Annotations' complexity
flake8-fixme                  = { optional = true, version = "*" }  # Check for FIXME, TODO etc notes
flake8-functions              = { optional = true, version = "*" }  # Function parameters (length, complexity, etc)
flake8-mutable                = { optional = true, version = "*" }  # Check for mutable default arguments
flake8-pep3101                = { optional = true, version = "*" }  # Ceck for old string formatting
flake8-pie                    = { optional = true, version = "*" }  # Misc. lints
flake8-print                  = { optional = true, version = "*" }  # Print statements
flake8-string-format          = { optional = true, version = "*" }  # Check .format()
flake8-tidy-imports           = { optional = true, version = "*" }
flakehell                     = { optional = true, version = "*" }
pep8-naming                   = { optional = true, version = "*" }  # Check naming conventions
yamllint                      = { optional = true, version = "*" }
# Extra: fmt
autoflake              = { optional = true, version = "*" }
black                  = { optional = true, version = "*" }
docformatter           = { optional = true, version = "*" }
pyupgrade              = { optional = true, version = "*" }
reorder-python-imports = { optional = true, version = "*" }
# Extra: test
codecov     = { optional = true, version = "*" }
coverage    = { optional = true, version = "*", extras = ["toml"] }
pytest      = { optional = true, version = "*" }
pytest-cov  = { optional = true, version = "*" }
pytest-mock = { optional = true, version = "*" }
# Extra: docs
sphinx                   = { optional = true, version = "*" }
sphinx-autodoc-typehints = { optional = true, version = "*" }
sphinx-rtd-theme         = { optional = true, version = "*" }

[tool.poetry.dev-dependencies]
mypy       = "*"
safety     = "*"
pre-commit = "*"
ipython    = "*"
toml-sort  = "*"
restview   = "*"

[tool.poetry.extras]
lint = [
  "dead",
  "dlint",
  "flake8",
  "flake8-alfred",
  "flake8-annotations",
  "flake8-annotations-complexity",
  "flake8-bandit",
  "flake8-broken-line",
  "flake8-bugbear",
  "flake8-builtins",
  "flake8-cognitive-complexity",
  "flake8-comprehensions",
  "flake8-debugger",
  "flake8-docstrings",
  "flake8-eradicate",
  "flake8-executable",
  "flake8-expression-complexity",
  "flake8-fixme",
  "flake8-functions",
  "flake8-mutable",
  "flake8-pep3101",
  "flake8-pie",
  "flake8-print",
  "flake8-string-format",
  "flake8-tidy-imports",
  "flakehell",
  "pep8-naming",
  "yamllint",
]
fmt = [
  "autoflake",
  "black",
  "docformatter",
  "pyupgrade",
  "reorder-python-imports",
]
test = [
  "codecov",
  "coverage",
  "pytest",
  "pytest-cov",
  "pytest-mock",
]
docs = [
  "sphinx",
  "sphinx-autodoc-typehints",
  "sphinx-rtd-theme",
]

[tool.poetry.scripts]
bug = 'buglog.cli:main'

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/lainiwa/buglog/issues"

[tool.pytest.ini_options]
norecursedirs = ['docs', '.*']
addopts = '''
  --doctest-modules
  --verbose
  --cov=buglog
  --cov-report=html
'''
markers = '''
    slow: marks tests as slow (deselect with '-m "not slow"')
    serial
'''


[tool.coverage.paths]
source = ["src", "*/site-packages"]

[tool.coverage.run]
branch = true
source = ["buglog"]

[tool.coverage.report]
show_missing = true