pyproject.toml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. [tool.poetry]
  2. name = "open-gopro-tutorials"
  3. version = "0.4.0"
  4. description = "Open GoPro Python Tutorials"
  5. authors = ["Tim Camise <tcamise@gopro.com>"]
  6. license = "MIT"
  7. readme = "README.md"
  8. packages = [{ include = "tutorial_modules" }]
  9. repository = "https://github.com/gopro/OpenGoPro/tree/main/demos/python/tutorial"
  10. documentation = "https://gopro.github.io/OpenGoPro/tutorials/"
  11. classifiers = [
  12. "Intended Audience :: Developers",
  13. "Topic :: Communications",
  14. "License :: OSI Approved :: MIT License",
  15. "Natural Language :: English",
  16. "Operating System :: Microsoft :: Windows :: Windows 10",
  17. "Operating System :: POSIX :: Linux",
  18. "Operating System :: MacOS :: MacOS X",
  19. "Programming Language :: Python",
  20. "Programming Language :: Python :: 3",
  21. "Programming Language :: Python :: 3.10",
  22. "Programming Language :: Python :: 3.11",
  23. "Programming Language :: Python :: 3.12",
  24. ]
  25. [tool.poetry.dependencies]
  26. python = ">=3.10,<3.13"
  27. bleak = "0.22.3"
  28. requests = "^2"
  29. rich = "^13"
  30. pytz = "*"
  31. tzlocal = "*"
  32. protobuf = "^3"
  33. [tool.poetry.group.dev.dependencies]
  34. mypy-protobuf = "*"
  35. poethepoet = "^0"
  36. black = "*"
  37. isort = "*"
  38. mypy = "*"
  39. pytest = "^7"
  40. pytest-asyncio = "^0"
  41. pytest-html = "^3"
  42. pytest-cov = "^4"
  43. coverage = { extras = ["toml"], version = "^6" }
  44. pylint = "^3"
  45. types-requests = "*"
  46. types-pytz = "*"
  47. [build-system]
  48. requires = ["poetry-core"]
  49. build-backend = "poetry.core.masonry.api"
  50. [tool.poe.tasks.tests]
  51. cmd = "pytest tests --cov-fail-under=60"
  52. help = "Run end-to-end tests. Requires ssid=${SSID} and password=${ssid} args to connect to AP"
  53. [tool.poe.tasks._types]
  54. cmd = "mypy tutorial_modules"
  55. help = "Check types"
  56. [tool.poe.tasks._pylint]
  57. cmd = "pylint --no-docstring-rgx=main|_ tutorial_modules"
  58. help = "Run pylint"
  59. [tool.poe.tasks._sort_imports]
  60. cmd = "isort open_gopro tests"
  61. help = "Sort imports with isort"
  62. [tool.poe.tasks.format]
  63. cmd = "black tutorial_modules tests"
  64. help = "Apply black formatting to source code"
  65. [tool.poe.tasks._clean_artifacts]
  66. cmd = "rm -rf **/__pycache__ *.csv *.mp4 *.jpg *.log .mypy_cache .nox"
  67. help = "Clean testing artifacts and pycache"
  68. [tool.poe.tasks._clean_tests]
  69. cmd = "rm -rf .reports && rm -rf .pytest_cache"
  70. help = "Clean test reports"
  71. [tool.poe.tasks._clean_build]
  72. cmd = "rm -rf dist"
  73. help = "Clean module build output"
  74. [tool.poe.tasks.clean]
  75. sequence = ["_clean_artifacts", "_clean_tests", "_clean_build"]
  76. help = "Clean everything"
  77. [tool.poe.tasks.lint]
  78. sequence = ["format", "_sort_imports", "_types", "_pylint",]
  79. help = "Format, check types, lint, and check docstrings"
  80. [tool.mypy]
  81. ignore_missing_imports = true
  82. warn_redundant_casts = true
  83. disallow_untyped_calls = false
  84. disallow_untyped_defs = true
  85. disallow_incomplete_defs = true
  86. disallow_untyped_decorators = false
  87. warn_unused_ignores = true
  88. warn_unreachable = false
  89. show_error_context = true
  90. pretty = true
  91. [tool.pytest.ini_options]
  92. log_auto_indent = true
  93. log_cli = true
  94. log_cli_level = "ERROR"
  95. log_cli_format = "%(asctime)s %(levelname)s %(message)s"
  96. log_cli_date_format = "%H:%M:%S"
  97. log_file_level = "DEBUG"
  98. log_file_format = "%(threadName)13s: %(name)40s:%(lineno)5d %(asctime)s.%(msecs)03d %(levelname)-8s | %(message)s"
  99. log_file_date_format = "%H:%M:%S"
  100. filterwarnings = "ignore::DeprecationWarning"
  101. addopts = [
  102. "-s",
  103. "--capture=tee-sys",
  104. "--cov=tutorial_modules",
  105. "--cov-report=term",
  106. "--cov-report=html",
  107. "--html=.reports/test_report.html",
  108. "--self-contained-html",
  109. "--asyncio-mode=auto",
  110. ]
  111. [tool.coverage.run]
  112. data_file = ".reports/coverage/.coverage"
  113. branch = true
  114. source = ["tutorial_modules"]
  115. [tool.coverage.html]
  116. directory = ".reports/coverage"
  117. [tool.coverage.report]
  118. exclude_lines = ["raise NotImplementedError"]
  119. [tool.pylint.'MASTER']
  120. load-plugins = "pylint.extensions.docparams"
  121. accept-no-param-doc = "yes"
  122. accept-no-return-doc = "yes"
  123. default-docstring-type = "google"
  124. ignore = ["tests", "proto"]
  125. [tool.pylint.'MESSAGES CONTROL']
  126. disable = [
  127. "missing-module-docstring",
  128. "unnecessary-lambda",
  129. "unnecessary-lambda-assignment",
  130. "too-many-ancestors",
  131. "no-name-in-module",
  132. "too-many-nested-blocks",
  133. "unspecified-encoding",
  134. "consider-using-with",
  135. "abstract-method",
  136. "useless-type-doc",
  137. "cyclic-import",
  138. "logging-fstring-interpolation",
  139. "logging-format-interpolation",
  140. "duplicate-code",
  141. "global-statement",
  142. "too-few-public-methods",
  143. "too-many-public-methods",
  144. "too-many-arguments",
  145. "too-many-instance-attributes",
  146. "too-many-branches",
  147. "too-many-locals",
  148. "too-many-lines",
  149. "too-many-statements",
  150. "fixme",
  151. "protected-access",
  152. "invalid-name",
  153. "unsubscriptable-object",
  154. ]
  155. [tool.pylint.'FORMAT']
  156. max-line-length = 300 # Handled by black
  157. [tool.black]
  158. line-length = 120
  159. exclude = ".venv"
  160. [tool.isort]
  161. profile = "black"