pyproject.toml 5.3 KB

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