1
0

pyproject.toml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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", "scripts/hatch_build.py"]
  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. path = "scripts/hatch_build.py"
  68. dependencies = ["plotly", "ruff", "pre_commit", "toml"]
  69. require-runtime-dependencies = true
  70. [tool.pyright]
  71. reportIncompatibleMethodOverride = false
  72. [tool.ruff]
  73. target-version = "py310"
  74. output-format = "concise"
  75. lint.isort.split-on-trailing-comma = false
  76. lint.select = [
  77. "ANN001",
  78. "B",
  79. "C4",
  80. "D",
  81. "E",
  82. "ERA",
  83. "F",
  84. "FURB",
  85. "I",
  86. "N",
  87. "PERF",
  88. "PGH",
  89. "PTH",
  90. "RUF",
  91. "SIM",
  92. "T",
  93. "TRY",
  94. "UP",
  95. "W",
  96. ]
  97. lint.ignore = [
  98. "B008",
  99. "D205",
  100. "E501",
  101. "F403",
  102. "SIM115",
  103. "RUF006",
  104. "RUF008",
  105. "RUF012",
  106. "TRY0",
  107. "UP038",
  108. ]
  109. lint.pydocstyle.convention = "google"
  110. [tool.ruff.lint.per-file-ignores]
  111. "__init__.py" = ["F401"]
  112. "tests/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"]
  113. "benchmarks/*.py" = ["ANN001", "D100", "D103", "D104", "B018", "PERF", "T", "N"]
  114. "reflex/.templates/*.py" = ["D100", "D103", "D104"]
  115. "*.pyi" = ["D301", "D415", "D417", "D418", "E742", "N", "PGH"]
  116. "pyi_generator.py" = ["N802"]
  117. "reflex/constants/*.py" = ["N"]
  118. "*/blank.py" = ["I001"]
  119. [tool.pytest.ini_options]
  120. filterwarnings = "ignore:fields may not start with an underscore:RuntimeWarning"
  121. asyncio_default_fixture_loop_scope = "function"
  122. asyncio_mode = "auto"
  123. [tool.codespell]
  124. skip = "docs/*,*.html,examples/*, *.pyi, poetry.lock, uv.lock"
  125. ignore-words-list = "te, TreeE"
  126. [dependency-groups]
  127. dev = [
  128. "asynctest >=0.13",
  129. "darglint >=1.8",
  130. "dill >=0.3",
  131. "hatchling >=1.27",
  132. "libsass >=0.23",
  133. "numpy >=2.2",
  134. "pandas >=2.2",
  135. "pillow >=11",
  136. "playwright >=1.51",
  137. "plotly >=6.0",
  138. "pre-commit ==4.2.0",
  139. "psycopg[binary] >=3.2",
  140. "pyright >=1.1.400",
  141. "pytest >=8.3",
  142. "pytest-asyncio >=0.26",
  143. "pytest-benchmark >=5.1",
  144. "pytest-codspeed >=3.2",
  145. "pytest-cov >=6.1",
  146. "pytest-mock >=3.14",
  147. "pytest-playwright >=0.7",
  148. "pytest-retry >=1.7",
  149. "pytest-split >=0.10",
  150. "python-dotenv >=1",
  151. "ruff >=0.11",
  152. "selenium >=4.31",
  153. "starlette-admin >=0.14",
  154. "toml >=0.10.2",
  155. "uvicorn >=0.34.0",
  156. ]
  157. [tool.coverage.run]
  158. source = ["reflex"]
  159. branch = true
  160. omit = [
  161. "*/pyi_generator.py",
  162. "reflex/__main__.py",
  163. "reflex/app_module_for_backend.py",
  164. "reflex/components/chakra/*",
  165. "reflex/experimental/*",
  166. ]
  167. [tool.coverage.report]
  168. show_missing = true
  169. # TODO bump back to 79
  170. fail_under = 70
  171. precision = 2
  172. ignore_errors = true
  173. exclude_also = [
  174. "def __repr__",
  175. # Don't complain about missing debug-only code:
  176. "if self.debug",
  177. # Don't complain if tests don't hit defensive assertion code:
  178. "raise AssertionError",
  179. "raise NotImplementedError",
  180. # Regexes for lines to exclude from consideration
  181. "if 0:",
  182. # Don't complain if non-runnable code isn't run:
  183. "if __name__ == .__main__.:",
  184. # Don't complain about abstract methods, they aren't run:
  185. "@(abc.)?abstractmethod",
  186. # Don't complain about overloaded methods:
  187. "@overload",
  188. ]
  189. [tool.coverage.html]
  190. directory = "coverage_html_report"
  191. [tool.pre-commit]
  192. fail_fast = true
  193. [[tool.pre-commit.repos]]
  194. repo = "https://github.com/astral-sh/ruff-pre-commit"
  195. rev = "v0.11.8"
  196. hooks = [
  197. { id = "ruff-format", args = [
  198. "reflex",
  199. "tests",
  200. ] },
  201. { id = "ruff", args = [
  202. "--fix",
  203. "--exit-non-zero-on-fix",
  204. ], exclude = "^integration/benchmarks/" },
  205. ]
  206. [[tool.pre-commit.repos]]
  207. repo = "https://github.com/codespell-project/codespell"
  208. rev = "v2.4.1"
  209. hooks = [
  210. { id = "codespell", args = [
  211. "reflex",
  212. ], additional_dependencies = [
  213. "tomli",
  214. ] },
  215. ]
  216. # Run pyi check before pyright because pyright can fail if pyi files are wrong.
  217. [[tool.pre-commit.repos]]
  218. repo = "local"
  219. hooks = [
  220. { 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" },
  221. ]
  222. [[tool.pre-commit.repos]]
  223. repo = "https://github.com/RobertCraigie/pyright-python"
  224. rev = "v1.1.400"
  225. hooks = [{ id = "pyright", args = ["reflex", "tests"], language = "system" }]
  226. [[tool.pre-commit.repos]]
  227. repo = "https://github.com/terrencepreilly/darglint"
  228. rev = "v1.8.1"
  229. hooks = [{ id = "darglint", exclude = "^reflex/reflex.py" }]
  230. [[tool.pre-commit.repos]]
  231. repo = "https://github.com/pre-commit/mirrors-prettier"
  232. rev = "f62a70a3a7114896b062de517d72829ea1c884b6"
  233. hooks = [{ id = "prettier", require_serial = true }]