pyproject.toml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. [project]
  2. name = "borgmatic"
  3. version = "2.0.8.dev0"
  4. authors = [
  5. { name="Dan Helfman", email="witten@torsion.org" },
  6. ]
  7. description = "Simple, configuration-driven backup software for servers and workstations"
  8. readme = "README.md"
  9. requires-python = ">=3.9"
  10. classifiers=[
  11. "Development Status :: 5 - Production/Stable",
  12. "Environment :: Console",
  13. "Intended Audience :: System Administrators",
  14. "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
  15. "Programming Language :: Python",
  16. "Topic :: Security :: Cryptography",
  17. "Topic :: System :: Archiving :: Backup",
  18. ]
  19. dependencies = [
  20. "jsonschema",
  21. "packaging",
  22. "requests",
  23. "ruamel.yaml>0.15.0",
  24. ]
  25. [project.scripts]
  26. borgmatic = "borgmatic.commands.borgmatic:main"
  27. generate-borgmatic-config = "borgmatic.commands.generate_config:main"
  28. validate-borgmatic-config = "borgmatic.commands.validate_config:main"
  29. [project.optional-dependencies]
  30. Apprise = ["apprise"]
  31. [project.urls]
  32. Homepage = "https://torsion.org/borgmatic"
  33. [build-system]
  34. requires = ["setuptools>=61.0"]
  35. build-backend = "setuptools.build_meta"
  36. [tool.setuptools.packages.find]
  37. include = ["borgmatic*"]
  38. namespaces = false
  39. [tool.pytest.ini_options]
  40. testpaths = "tests"
  41. addopts = "--cov-report term-missing:skip-covered --cov=borgmatic --no-cov-on-fail --cov-fail-under=100 --ignore=tests/end-to-end"
  42. [tool.ruff]
  43. line-length = 100
  44. exclude = ["*.*/*"]
  45. [tool.ruff.format]
  46. quote-style = "preserve"
  47. [tool.ruff.lint]
  48. preview = true
  49. extend-select = [
  50. "A", # flake8-builtins: builtin shadowing
  51. "B", # flake8-bugbear: bugs and design problems
  52. "BLE", # flak8-blind-except: "except:" without exception type
  53. "C4", # flake8-comprehensions: generators and comprehensions
  54. "COM", # flake8-commas: trailing commas
  55. "DTZ", # flake8-datetimez: naive datetime
  56. "E", # pycodestyle: errors
  57. "F", # pyflakes: various linting
  58. "ERA", # eradicate: find commented out code
  59. "FLY", # flynt: f-string instead of string join
  60. "FIX", # flake8-fixme: leftover FIXMEs and TODOs
  61. "I", # isort: import ordering
  62. "ISC", # flake8-implicit-str-concat: implicit string concatenation
  63. "LOG", # flake8-logging: standard library logging
  64. "N", # pep8-naming: PEP-8 naming conventions
  65. "PERF", # perflint: performance linting
  66. "PIE", # flake8-pie: various linting
  67. "PL", # pylint: various linting
  68. "Q", # flake8-quotes: string quoting
  69. "RET", # flake-return: return statement
  70. "RUF", # Ruff-specific rules
  71. "S", # flake8-bandit: security testing
  72. "SIM", # flake-simplify: code simplifications
  73. "T20", # flake8-print: print statements
  74. "TID", # flake8-tidy-imports: absolute imports
  75. "UP", # pyupgrade: upgrade syntax for newer versions of Python
  76. "W", # pycodestyle: warnings
  77. "YTT", # flake8-202: sys.version misuse
  78. ]
  79. ignore = [
  80. "C408", # unnecessary dict() call (conflicts with makeLogRecord())
  81. "COM812", # trailing comma missing (conflicts with formatter)
  82. "B904", # unchained exception raised within "except:" clause
  83. "E501", # line too long
  84. "ISC001", # implicit string concatenation on one line (conflicts with formatter)
  85. "N801", # class name not title case
  86. "N818", # exception class name doesn't end in "Error"
  87. "PLR0913", # too many positional arguments in function definition
  88. "PLR0914", # too many local variables
  89. "PLR0917", # too many positional arguments
  90. "S105", # hard-coded password
  91. "S404", # subprocess import
  92. "SIM115", # open() without context manager
  93. "SIM905", # split() on literal string
  94. ]
  95. [tool.ruff.lint.flake8-quotes]
  96. docstring-quotes = "single"
  97. inline-quotes = "single"
  98. multiline-quotes = "single"
  99. [tool.ruff.lint.isort]
  100. known-first-party = ["borgmatic"]
  101. [tool.ruff.lint.per-file-ignores]
  102. "tests/**/*.py" = [
  103. "C406", # unnecessary list literal
  104. "N802", # uppercase in function name
  105. "PLC1901", # comparison to empty string
  106. "PLR2004", # magic value
  107. "PLW1514", # open() without encoding
  108. "S101", # asserts
  109. "S106", # hard-coded password
  110. "S108", # insecure usage of temporary file
  111. "S602", # shell=True
  112. "S603", # subprocess call
  113. "S604", # shell=True
  114. "S607", # executing a relative path
  115. "TID252", # relative import from parent
  116. ]
  117. "tests/end-to-end/commands/**/*.py" = [
  118. "T201", # print statement
  119. ]
  120. [tool.codespell]
  121. skip = ".git,.tox,build"