pyproject.toml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. [tool.poetry]
  2. name = "nicegui"
  3. version = "2.15.0-dev"
  4. description = "Create web-based user interfaces with Python. The nice way."
  5. authors = ["Zauberzeug GmbH <info@zauberzeug.com>"]
  6. license = "MIT"
  7. readme = "README.md"
  8. repository = "https://github.com/zauberzeug/nicegui"
  9. keywords = ["gui", "ui", "web", "interface", "live"]
  10. [tool.poetry.dependencies]
  11. python = "^3.8"
  12. typing-extensions = ">=4.0.0"
  13. markdown2 = ">=2.4.7,!=2.4.11"
  14. Pygments = ">=2.15.1,<3.0.0"
  15. starlette = [
  16. {version = "<0.42.0", python = "~3.8"}, # https://github.com/zauberzeug/nicegui/issues/4255
  17. {version = ">=0.45.3", python = ">=3.9"}
  18. ]
  19. uvicorn = {extras = ["standard"], version = ">=0.22.0"}
  20. fastapi = ">=0.109.1"
  21. python-socketio = {extras = ["asyncio-client"], version = ">=5.10.0"} # version min: see https://github.com/zauberzeug/nicegui/issues/1809
  22. python-engineio = ">=4.12.0" # https://github.com/zauberzeug/nicegui/issues/4602
  23. vbuild = ">=0.8.2"
  24. watchfiles = ">=0.18.1"
  25. jinja2 = "^3.1.6" # https://github.com/zauberzeug/nicegui/security/dependabot/44
  26. python-multipart = ">=0.0.18"
  27. orjson = {version = ">=3.9.15", markers = "platform_machine != 'i386' and platform_machine != 'i686'"} # https://github.com/zauberzeug/nicegui/security/dependabot/29, orjson does not support 32bit
  28. itsdangerous = "^2.1.2"
  29. aiofiles = ">=23.1.0"
  30. pywebview = { version = "^5.0.1", optional = true }
  31. plotly = { version = ">=5.13,<7.0", optional = true }
  32. matplotlib = { version = "^3.5.0", optional = true }
  33. httpx = ">=0.24.0"
  34. nicegui-highcharts = { version = "^2.0.2", optional = true }
  35. ifaddr = ">=0.2.0"
  36. aiohttp = ">=3.10.2" # https://github.com/zauberzeug/nicegui/security/dependabot/36
  37. libsass = { version = "^0.23.0", optional = true }
  38. docutils = ">=0.19.0"
  39. requests = ">=2.32.0" # https://github.com/zauberzeug/nicegui/security/dependabot/33
  40. urllib3 = ">=1.26.18,!=2.0.0,!=2.0.1,!=2.0.2,!=2.0.3,!=2.0.4,!=2.0.5,!=2.0.6,!=2.0.7,!=2.1.0,!=2.2.0,!=2.2.1" # https://github.com/zauberzeug/nicegui/security/dependabot/34
  41. certifi = ">=2024.07.04" # https://github.com/zauberzeug/nicegui/security/dependabot/35
  42. redis = { version = ">=4.0.0", optional = true }
  43. h11 = ">=0.16.0" # https://github.com/zauberzeug/nicegui/security/dependabot/45
  44. wait_for2 = ">=0.3.2"
  45. [tool.poetry.extras]
  46. native = ["pywebview"]
  47. plotly = ["plotly"]
  48. matplotlib = ["matplotlib"]
  49. highcharts = ["nicegui-highcharts"]
  50. sass = ["libsass"]
  51. redis = ["redis"]
  52. [tool.poetry.group.dev.dependencies]
  53. autopep8 = ">=1.5.7,<3.0.0"
  54. debugpy = "^1.3.0"
  55. pytest-selenium = "^4.1.0"
  56. pytest-asyncio = ">=0.23.0"
  57. pytest-watcher = "^0.4.2"
  58. pytest = "^8.2.2"
  59. itsdangerous = "^2.1.2" # required by SessionMiddleware (see https://fastapi.tiangolo.com/?h=itsdangerous#optional-dependencies)
  60. pandas = [
  61. {version = "^2.0.0", python = "<3.13"},
  62. {version = "^2.2.3", python = ">=3.13,<3.14"}
  63. ]
  64. secure = ">=0.3.0"
  65. webdriver-manager = ">=3.8.6,<5.0.0"
  66. numpy = [
  67. {version = "^1.24.0", python = "~3.8"},
  68. {version = ">=1.26.0", python = ">=3.9,<3.14"}
  69. ]
  70. selenium = "^4.11.2"
  71. pyecharts = "^2.0.4"
  72. ruff = ">=0.8.1"
  73. pre-commit = [
  74. {version = "<4.0.0", python = "<3.9"},
  75. {version = ">=4.0.0", python = ">=3.9,<3.14"}
  76. ]
  77. isort = "^5.11"
  78. polars = [
  79. {version = "^1.8.0", python = "~3.8"},
  80. {version = "^1.12.0", python = ">=3.9,<3.14"}
  81. ]
  82. mypy = "^1.13.0"
  83. pylint = [
  84. {version = "^3.1.0", python = "~3.8"},
  85. {version = ">=3.3.1", python = ">=3.9,<3.13"}
  86. ]
  87. [tool.poetry.scripts]
  88. nicegui-pack = "nicegui.scripts.pack:main"
  89. [build-system]
  90. requires = [
  91. "setuptools>=30.3.0",
  92. "poetry-core>=1.0.0"
  93. ]
  94. build-backend = "poetry.core.masonry.api"
  95. [tool.pytest.ini_options]
  96. addopts = "--driver Chrome"
  97. asyncio_mode = "auto"
  98. testpaths = ["tests"]
  99. asyncio_default_fixture_loop_scope = "function"
  100. filterwarnings = [
  101. 'ignore::DeprecationWarning:^vbuild(\.|$)',
  102. 'ignore::DeprecationWarning:^websockets\.legacy(\.|$)',
  103. 'ignore::DeprecationWarning:^uvicorn\.protocols\.websockets(\.|$)',
  104. ]
  105. [tool.mypy]
  106. python_version = "3.8"
  107. install_types = true
  108. check_untyped_defs = true
  109. [[tool.mypy.overrides]]
  110. module = [
  111. "markdown2",
  112. "matplotlib.*",
  113. "nicegui_highcharts",
  114. "plotly.*",
  115. "polars.*",
  116. "pyecharts.*",
  117. "sass",
  118. "socketio.*",
  119. "vbuild",
  120. "wait_for2",
  121. "webview.*", # can be removed with next pywebview release
  122. ]
  123. ignore_missing_imports = true
  124. [tool.autopep8]
  125. max-line-length = 120
  126. [tool.ruff]
  127. target-version = "py38"
  128. indent-width = 4
  129. line-length = 120
  130. [tool.ruff.lint]
  131. # See complete list: https://docs.astral.sh/ruff/rules/
  132. select = [
  133. "I", # isort
  134. "E", # pycodestyle
  135. "W", # pycodestyle
  136. "B", # bugbear
  137. "F", # pyflakes
  138. "UP", # pyupgrade
  139. "RUF", # ruff
  140. "PL", # pylint
  141. ]
  142. fixable = [
  143. "I", # isort
  144. "RUF022", # `__all__` is not sorted
  145. ]
  146. ignore = [
  147. "E501", # line too long
  148. "UP006", # use pipe for union type annotation
  149. "UP007", # use pipe for union type annotation
  150. "PLR0911", # too many return statements
  151. "PLR0912", # too many branches
  152. "PLR0913", # too many arguments
  153. "PLR0915", # too many statements
  154. "PLR2004", # magic value comparison
  155. ]
  156. exclude = [
  157. "website/documentation/content/*",
  158. ]
  159. [tool.pylint]
  160. disable = [
  161. "C0103", # Invalid name (e.g., variable/function/class naming conventions)
  162. "C0114", # Missing module docstring
  163. "C0115", # Missing class docstring
  164. "C0301", # Line too long (exceeds character limit)
  165. "C0302", # Too many lines in module
  166. "R0801", # Similar lines in files
  167. "R0901", # Too many ancestors
  168. "R0902", # Too many instance attributes
  169. "R0903", # Too few public methods
  170. "R0904", # Too many public methods
  171. "R0911", # Too many return statements
  172. "R0912", # Too many branches
  173. "R0913", # Too many arguments
  174. "R0914", # Too many local variables
  175. "R0915", # Too many statements
  176. "R1705", # Unnecessary "else" after "return"
  177. "W0102", # Dangerous default value as argument
  178. "W0718", # Catching too general exception
  179. "W1203", # Use % formatting in logging functions
  180. ]