1
0

pyproject.toml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. [project]
  2. name = "reflex"
  3. version = "0.7.11dev1"
  4. description = "Web apps in pure Python."
  5. license = { text = "Apache-2.0" }
  6. authors = [
  7. { name = "Nikhil Rao", email = "nikhil@reflex.dev" },
  8. { name = "Alek Petuskey", email = "alek@reflex.dev" },
  9. { name = "Masen Furer", email = "masen@reflex.dev" },
  10. { name = "Elijah Ahianyo", email = "elijahahianyo@gmail.com" },
  11. { name = "Thomas Brandeho", email = "thomas@reflex.dev" },
  12. { name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" },
  13. ]
  14. maintainers = [
  15. { name = "Masen Furer", email = "masen@reflex.dev" },
  16. { name = "Thomas Brandeho", email = "thomas@reflex.dev" },
  17. { name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" },
  18. ]
  19. readme = "README.md"
  20. keywords = ["web", "framework"]
  21. requires-python = ">=3.10,<4.0"
  22. dependencies = [
  23. "alembic >=1.15.2,<2.0",
  24. "fastapi >=0.115.0",
  25. "granian[reload] >=2.2.5",
  26. "httpx >=0.28.0,<1.0",
  27. "jinja2 >=3.1.2,<4.0",
  28. "packaging >=24.2,<26",
  29. "platformdirs >=4.3.7,<5.0",
  30. "psutil >=7.0.0,<8.0",
  31. "pydantic >=1.10.21,<3.0",
  32. "python-socketio >=5.12.0,<6.0",
  33. "python-multipart >=0.0.20,<1.0",
  34. "redis >=5.2.1,<6.0",
  35. "reflex-hosting-cli >=0.1.47",
  36. "rich >=13,<15",
  37. "sqlmodel >=0.0.24,<0.1",
  38. "click >=8",
  39. "typing_extensions >=4.13.0",
  40. "wrapt >=1.17.0,<2.0",
  41. ]
  42. classifiers = [
  43. "Development Status :: 4 - Beta",
  44. "License :: OSI Approved :: Apache Software License",
  45. "Programming Language :: Python :: 3",
  46. "Programming Language :: Python :: 3.10",
  47. "Programming Language :: Python :: 3.11",
  48. "Programming Language :: Python :: 3.12",
  49. "Programming Language :: Python :: 3.13",
  50. ]
  51. [project.urls]
  52. homepage = "https://reflex.dev"
  53. repository = "https://github.com/reflex-dev/reflex"
  54. documentation = "https://reflex.dev/docs/getting-started/introduction"
  55. [project.scripts]
  56. reflex = "reflex.reflex:cli"
  57. [build-system]
  58. requires = ["hatchling"]
  59. build-backend = "hatchling.build"
  60. [tool.hatch.build]
  61. include = ["reflex"]
  62. [tool.hatch.build.targets.sdist]
  63. artifacts = ["*.pyi"]
  64. [tool.hatch.build.targets.wheel]
  65. artifacts = ["*.pyi"]
  66. [tool.hatch.build.hooks.custom]
  67. dependencies = ["plotly", "ruff"]
  68. require-runtime-dependencies = true
  69. [tool.pyright]
  70. reportIncompatibleMethodOverride = false
  71. [tool.ruff]
  72. target-version = "py310"
  73. output-format = "concise"
  74. lint.isort.split-on-trailing-comma = false
  75. lint.select = [
  76. "ANN001",
  77. "B",
  78. "C4",
  79. "D",
  80. "E",
  81. "ERA",
  82. "F",
  83. "FURB",
  84. "I",
  85. "N",
  86. "PERF",
  87. "PGH",
  88. "PTH",
  89. "RUF",
  90. "SIM",
  91. "T",
  92. "TRY",
  93. "UP",
  94. "W",
  95. ]
  96. lint.ignore = [
  97. "B008",
  98. "D205",
  99. "E501",
  100. "F403",
  101. "SIM115",
  102. "RUF006",
  103. "RUF008",
  104. "RUF012",
  105. "TRY0",
  106. "UP038",
  107. ]
  108. lint.pydocstyle.convention = "google"
  109. [tool.ruff.lint.per-file-ignores]
  110. "__init__.py" = ["F401"]
  111. "tests/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"]
  112. "benchmarks/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"]
  113. "reflex/.templates/*.py" = ["D100", "D103", "D104"]
  114. "*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N", "PGH"]
  115. "pyi_generator.py" = ["N802"]
  116. "reflex/constants/*.py" = ["N"]
  117. "*/blank.py" = ["I001"]
  118. [tool.pytest.ini_options]
  119. filterwarnings = "ignore:fields may not start with an underscore:RuntimeWarning"
  120. asyncio_default_fixture_loop_scope = "function"
  121. asyncio_mode = "auto"
  122. [tool.codespell]
  123. skip = "docs/*,*.html,examples/*, *.pyi, poetry.lock, uv.lock"
  124. ignore-words-list = "te, TreeE"
  125. [dependency-groups]
  126. dev = [
  127. "asynctest >=0.13",
  128. "darglint >=1.8",
  129. "dill >=0.3",
  130. "hatchling >=1.27",
  131. "libsass >=0.23",
  132. "numpy >=2.2",
  133. "pandas >=2.2",
  134. "pillow >=11",
  135. "playwright >=1.51",
  136. "plotly >=6.0",
  137. "pre-commit-pyproject-toml >=4.2.0.post2",
  138. "psycopg[binary] >=3.2",
  139. "pyright >=1.1.400",
  140. "pytest >=8.3",
  141. "pytest-asyncio >=0.26",
  142. "pytest-benchmark >=5.1",
  143. "pytest-codspeed >=3.2",
  144. "pytest-cov >=6.1",
  145. "pytest-mock >=3.14",
  146. "pytest-playwright >=0.7",
  147. "pytest-retry >=1.7",
  148. "pytest-split >=0.10",
  149. "python-dotenv >=1",
  150. "ruff >=0.11",
  151. "selenium >=4.31",
  152. "starlette-admin >=0.14",
  153. "uvicorn >=0.34.0",
  154. ]
  155. [tool.pre-commit]
  156. fail_fast = true
  157. [[tool.pre-commit.repos]]
  158. repo = "https://github.com/astral-sh/ruff-pre-commit"
  159. rev = "v0.11.8"
  160. hooks = [
  161. { id = "ruff-format", args = [
  162. "reflex",
  163. "tests",
  164. ] },
  165. { id = "ruff", args = [
  166. "--fix",
  167. "--exit-non-zero-on-fix",
  168. ], exclude = "^integration/benchmarks/" },
  169. ]
  170. [[tool.pre-commit.repos]]
  171. repo = "https://github.com/codespell-project/codespell"
  172. rev = "v2.4.1"
  173. hooks = [
  174. { id = "codespell", args = [
  175. "reflex",
  176. ], additional_dependencies = [
  177. "tomli",
  178. ] },
  179. ]
  180. # Run pyi check before pyright because pyright can fail if pyi files are wrong.
  181. [[tool.pre-commit.repos]]
  182. repo = "local"
  183. hooks = [
  184. { id = "update-pyi-files", name = "update-pyi-files", always_run = true, language = "system", require_serial = true, description = "Update pyi files as needed", entry = "python3 scripts/make_pyi.py" },
  185. ]
  186. [[tool.pre-commit.repos]]
  187. repo = "https://github.com/RobertCraigie/pyright-python"
  188. rev = "v1.1.400"
  189. hooks = [{ id = "pyright", args = ["reflex", "tests"], language = "system" }]
  190. [[tool.pre-commit.repos]]
  191. repo = "https://github.com/terrencepreilly/darglint"
  192. rev = "v1.8.1"
  193. hooks = [{ id = "darglint", exclude = "^reflex/reflex.py" }]
  194. [[tool.pre-commit.repos]]
  195. repo = "https://github.com/pre-commit/mirrors-prettier"
  196. rev = "f62a70a3a7114896b062de517d72829ea1c884b6"
  197. hooks = [{ id = "prettier", require_serial = true }]
  198. [tool.coverage.run]
  199. source = ["reflex"]
  200. branch = true
  201. omit = [
  202. "*/pyi_generator.py",
  203. "reflex/__main__.py",
  204. "reflex/app_module_for_backend.py",
  205. "reflex/components/chakra/*",
  206. "reflex/experimental/*",
  207. ]
  208. [tool.coverage.report]
  209. show_missing = true
  210. # TODO bump back to 79
  211. fail_under = 70
  212. precision = 2
  213. ignore_errors = true
  214. exclude_also = [
  215. "def __repr__",
  216. # Don't complain about missing debug-only code:
  217. "if self.debug",
  218. # Don't complain if tests don't hit defensive assertion code:
  219. "raise AssertionError",
  220. "raise NotImplementedError",
  221. # Regexes for lines to exclude from consideration
  222. "if 0:",
  223. # Don't complain if non-runnable code isn't run:
  224. "if __name__ == .__main__.:",
  225. # Don't complain about abstract methods, they aren't run:
  226. "@(abc.)?abstractmethod",
  227. # Don't complain about overloaded methods:
  228. "@overload",
  229. ]
  230. [tool.coverage.html]
  231. directory = "coverage_html_report"