| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- [tool.poetry]
- name = "open_gopro"
- version = "0.21.2"
- description = "Open GoPro API and Examples"
- authors = ["Tim Camise <tcamise@gopro.com>"]
- readme = "README.md"
- license = "MIT"
- repository = "https://github.com/gopro/OpenGoPro/tree/main/demos/python/sdk_wireless_camera_control"
- documentation = "https://gopro.github.io/OpenGoPro/python_sdk/"
- classifiers = [
- "Intended Audience :: Developers",
- "Topic :: Communications",
- "License :: OSI Approved :: MIT License",
- "Natural Language :: English",
- "Operating System :: Microsoft :: Windows :: Windows 10",
- "Operating System :: POSIX :: Linux",
- "Operating System :: MacOS :: MacOS X",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.11",
- "Programming Language :: Python :: 3.12",
- "Programming Language :: Python :: 3.13",
- ]
- [tool.poetry.scripts]
- gopro-photo = "open_gopro.demos.photo:entrypoint"
- gopro-video = "open_gopro.demos.video:entrypoint"
- gopro-log-battery = "open_gopro.demos.log_battery:entrypoint"
- gopro-wifi = "open_gopro.demos.connect_wifi:entrypoint"
- gopro-webcam = "open_gopro.demos.gui.webcam:entrypoint"
- gopro-livestream = "open_gopro.demos.gui.livestream:entrypoint"
- gopro-preview-stream = "open_gopro.demos.gui.preview_stream:entrypoint"
- gopro-cohn = "open_gopro.demos.cohn:entrypoint"
- gopro-scan = "open_gopro.demos.scanner:entrypoint"
- [build-system]
- requires = ["poetry-core>=1.0.0"]
- build-backend = "poetry.core.masonry.api"
- [tool.poetry.dependencies]
- python = ">=3.11,<3.14"
- bleak = "=0.22.3"
- construct = "^2"
- wrapt = "^1"
- requests = "^2"
- protobuf = "^6"
- packaging = "25"
- rich = "^14"
- pexpect = "^4"
- zeroconf = "^0"
- pydantic = "^2"
- opencv-python = { version = "^4", optional = true }
- Pillow = {version= "^11", optional = true}
- pytz = "*"
- tzlocal = "*"
- tinydb = "^4"
- returns = {extras = ["compatible-mypy"], version = "^0"}
- asyncstdlib = "^3"
- [tool.poetry.extras]
- gui = ["opencv-python", "pillow"]
- [tool.poetry.group.dev.dependencies]
- pydoclint = "^0"
- pydocstyle = { extras = ["toml"], version = "^6" }
- pytest = "^8"
- pytest-cov = "^6"
- pytest-asyncio = "^1"
- pytest-html = "^4"
- coverage = { extras = ["toml"], version = "^7" }
- requests-mock = "^1"
- black = "*"
- pylint = "*"
- mypy = "*"
- types-requests = "*"
- types-attrs = "*"
- types-pytz = "*"
- types-tzlocal = "*"
- construct-typing = "*"
- sphinx = "^8"
- sphinx-rtd-theme = "^3"
- coverage-badge = "^1"
- poethepoet = "^0"
- autodoc-pydantic = "^2"
- pytest-timeout = "^2"
- isort = "*"
- types-protobuf = "*"
- licensecheck = "*"
- [tool.poe.tasks.tests]
- cmd = "pytest tests/unit --cov-fail-under=70"
- help = "Run unit tests"
- [tool.poe.tasks._types]
- cmd = "mypy open_gopro"
- help = "Check types"
- [tool.poe.tasks._pylint]
- cmd = "pylint open_gopro"
- help = "Run pylint"
- [tool.poe.tasks._format_code]
- cmd = "black open_gopro tests noxfile.py docs/conf.py"
- help = "Apply black formatting to source code"
- [tool.poe.tasks._sort_imports]
- cmd = "isort open_gopro tests"
- help = "Sort imports with isort"
- [tool.poe.tasks.format]
- sequence = ["_format_code", "_sort_imports"]
- help = "Format code and sort imports"
- [tool.poe.tasks.lint]
- sequence = ["format", "_types", "_pylint"]
- help = "Perform all static code analysis"
- [tool.poe.tasks._pydocstyle]
- cmd = "pydocstyle --config pyproject.toml -v open_gopro"
- help = "check docstrings style"
- [tool.poe.tasks._doclint]
- cmd = "pydoclint open_gopro"
- help = "validate docstrings"
- [tool.poe.tasks.docstrings]
- sequence = ["_pydocstyle", "_doclint"]
- help = "Analyze docstrings for consistency and errors"
- [tool.poe.tasks.sphinx]
- cmd = "sphinx-build -W --keep-going -a -n -E -b html docs docs/build"
- help = "Build sphinx documentation."
- [tool.poe.tasks._coverage]
- cmd = "coverage-badge -f -o docs/_static/coverage.svg"
- help = "update coverage badge"
- [tool.poe.tasks._clean_artifacts]
- cmd = "rm -rf **/__pycache__ *.csv *.mp4 *.jpg *.log .mypy_cache .nox"
- help = "Clean testing artifacts and pycache"
- [tool.poe.tasks._clean_tests]
- cmd = "rm -rf .reports && rm -rf .pytest_cache"
- help = "Clean test reports"
- [tool.poe.tasks._clean_docs]
- cmd = "rm -f docs/modules.rst && rm -rf docs/build"
- help = "Clean built docs output"
- [tool.poe.tasks._clean_build]
- cmd = "rm -rf dist"
- help = "Clean module build output"
- [tool.poe.tasks.docs]
- sequence = ["docstrings", "sphinx"]
- help = "Validate docstrings and build docs"
- [tool.poe.tasks.clean]
- sequence = ["_clean_artifacts", "_clean_tests", "_clean_docs", "_clean_build"]
- help = "Clean everything"
- [tool.poe.tasks.all]
- sequence = ["format", "lint", "tests", "docs", "licenses"]
- help = "Format, check types, lint, check docstrings, run unit tests, and update license report."
- [tool.poe.tasks.licenses]
- cmd = "licensecheck"
- help = "Analyze dependency licenses"
- [tool.mypy]
- ignore_missing_imports = true
- warn_redundant_casts = true
- disallow_untyped_calls = false
- disallow_untyped_defs = true
- disallow_incomplete_defs = true
- disallow_untyped_decorators = false
- warn_unused_ignores = true
- warn_unreachable = false
- show_error_context = true
- pretty = true
- plugins = ["returns.contrib.mypy.returns_plugin"]
- [tool.pytest.ini_options]
- asyncio_default_fixture_loop_scope = "function"
- asyncio_default_test_loop_scope = "function"
- asyncio_mode = "auto"
- log_auto_indent = true
- log_cli = true
- log_cli_level = "ERROR"
- log_cli_format = "%(asctime)s %(levelname)s %(message)s"
- log_cli_date_format = "%H:%M:%S"
- log_file_level = "DEBUG"
- log_file_format = "%(threadName)13s: %(name)40s:%(lineno)5d %(asctime)s.%(msecs)03d %(levelname)-8s | %(message)s"
- log_file_date_format = "%H:%M:%S"
- filterwarnings = "ignore::DeprecationWarning"
- timeout = 10
- addopts = [
- "-s",
- "--capture=tee-sys",
- "--cov=open_gopro",
- "--cov-report=term",
- "--cov-report=html",
- "--html=.reports/test_report.html",
- "--self-contained-html",
- "--asyncio-mode=auto",
- ]
- [tool.coverage.run]
- data_file = ".reports/coverage/.coverage"
- branch = true
- source = ["open_gopro"]
- omit = [
- "open_gopro/constants/*",
- "open_gopro/proto/*",
- "open_gopro/demos/*"
- ]
- [tool.coverage.html]
- directory = ".reports/coverage"
- [tool.coverage.report]
- exclude_lines = ["raise NotImplementedError"]
- [tool.pylint.'MASTER']
- no-docstring-rgx="__|main|parse_arguments|entrypoint"
- extension-pkg-whitelist = "cv2" # TODO this isn't working
- load-plugins = "pylint.extensions.docparams"
- accept-no-param-doc = "yes"
- accept-no-return-doc = "yes"
- default-docstring-type = "google"
- ignore = ["tests", "proto"]
- [tool.pylint.'MESSAGES CONTROL']
- disable = [
- "use-maxsplit-arg",
- "unnecessary-lambda",
- "unnecessary-lambda-assignment",
- "too-many-ancestors",
- "no-name-in-module",
- "too-many-nested-blocks",
- "unspecified-encoding",
- "consider-using-with",
- "abstract-method",
- "useless-type-doc",
- "cyclic-import",
- "logging-fstring-interpolation",
- "logging-format-interpolation",
- "duplicate-code",
- "global-statement",
- "too-few-public-methods",
- "too-many-public-methods",
- "too-many-arguments",
- "too-many-instance-attributes",
- "too-many-branches",
- "too-many-locals",
- "too-many-lines",
- "too-many-statements",
- "fixme",
- "protected-access",
- "invalid-name",
- "unsubscriptable-object",
- "too-many-positional-arguments",
- "no-member", # This is bad. We need to make stub files since mypy and pylint do not follow decorators well
- ]
- [tool.pylint.'FORMAT']
- max-line-length = 160
- [tool.pylint.'TYPECHECK']
- ignored-modules = "cv2"
- [tool.black]
- line-length = 120
- exclude = ".venv"
- [tool.pydocstyle]
- convention = "google"
- add-ignore = "D415, D107, D105"
- match = '(?!params|.*pb).*\.py'
- match-dir = '(?!.*demos).*'
- [tool.isort]
- profile = "black"
- [tool.pydoclint]
- style = 'google'
- exclude = 'schemas/'
- require-return-section-when-returning-nothing = false
- should-declare-assert-error-if-assert-statement-exists = false
- [tool.licensecheck]
- using = "PEP631"
- format = 'csv'
- file = "thirdPartyDependencies.csv"
|