|
1 | 1 | [build-system]
|
2 |
| -requires = ["setuptools>=42", "wheel", "nodejs-bin==18.4.0a4"] |
3 |
| -build-backend = "setuptools.build_meta" |
| 2 | +build-backend = "hatchling.build" |
| 3 | +requires = ["hatchling"] |
4 | 4 |
|
5 |
| -[tool.mypy] |
6 |
| -ignore_missing_imports = true |
7 |
| -warn_unused_configs = true |
8 |
| -warn_redundant_casts = true |
9 |
| -warn_unused_ignores = true |
10 |
| -check_untyped_defs = true |
| 5 | +[project] |
| 6 | +name = "reactpy_router" |
| 7 | +description = "A URL router for ReactPy." |
| 8 | +readme = "README.md" |
| 9 | +keywords = ["React", "ReactJS", "ReactPy", "components"] |
| 10 | +license = "MIT" |
| 11 | +authors = [{ name = "Mark Bakhit", email = "[email protected]" }] |
| 12 | +requires-python = ">=3.9" |
| 13 | +classifiers = [ |
| 14 | + "Programming Language :: Python :: 3.9", |
| 15 | + "Programming Language :: Python :: 3.10", |
| 16 | + "Programming Language :: Python :: 3.11", |
| 17 | + "Programming Language :: Python :: 3.12", |
| 18 | + "Operating System :: OS Independent", |
| 19 | + "Intended Audience :: Developers", |
| 20 | + "Intended Audience :: Science/Research", |
| 21 | + "Topic :: Multimedia :: Graphics", |
| 22 | + "Topic :: Software Development :: Widget Sets", |
| 23 | + "Topic :: Software Development :: User Interfaces", |
| 24 | + "Environment :: Web Environment", |
| 25 | + "Typing :: Typed", |
| 26 | +] |
| 27 | +dependencies = ["reactpy>=1.0.0", "typing_extensions"] |
| 28 | +dynamic = ["version"] |
| 29 | +urls.Changelog = "https://reactive-python.github.io/reactpy-router/latest/about/changelog/" |
| 30 | +urls.Documentation = "https://reactive-python.github.io/reactpy-router/latest/" |
| 31 | +urls.Source = "https://github.com/reactive-python/reactpy-router" |
| 32 | + |
| 33 | +[tool.hatch.version] |
| 34 | +path = "src/reactpy_router/__init__.py" |
| 35 | + |
| 36 | +[tool.hatch.build.targets.sdist] |
| 37 | +include = ["/src"] |
| 38 | + |
| 39 | +[tool.hatch.metadata] |
| 40 | +license-files = { paths = ["LICENSE.md"] } |
| 41 | + |
| 42 | +[tool.hatch.envs.default] |
| 43 | +installer = "uv" |
| 44 | + |
| 45 | +# >>> Hatch Tests <<< |
| 46 | + |
| 47 | +[tool.hatch.envs.hatch-test] |
| 48 | +extra-dependencies = [ |
| 49 | + "pytest-sugar", |
| 50 | + "pytest-cov", |
| 51 | + "anyio", |
| 52 | + "reactpy[testing,starlette]", |
| 53 | +] |
| 54 | +randomize = true |
| 55 | +matrix-name-format = "{variable}-{value}" |
| 56 | + |
| 57 | +[[tool.hatch.envs.hatch-test.matrix]] |
| 58 | +python = ["3.9", "3.10", "3.11", "3.12"] |
| 59 | + |
| 60 | +# >>> Hatch Documentation Scripts <<< |
| 61 | + |
| 62 | +[tool.hatch.envs.docs] |
| 63 | +template = "docs" |
| 64 | +detached = true |
| 65 | +dependencies = [ |
| 66 | + "mkdocs", |
| 67 | + "mkdocs-git-revision-date-localized-plugin", |
| 68 | + "mkdocs-material==9.4.0", |
| 69 | + "mkdocs-include-markdown-plugin", |
| 70 | + "linkcheckmd", |
| 71 | + "mkdocs-spellcheck[all]", |
| 72 | + "mkdocs-git-authors-plugin", |
| 73 | + "mkdocs-minify-plugin", |
| 74 | + "mike", |
| 75 | + "mkdocstrings[python]", |
| 76 | + "black", |
| 77 | + "reactpy_router @ {root:uri}", |
| 78 | +] |
| 79 | + |
| 80 | +[tool.hatch.envs.docs.scripts] |
| 81 | +serve = ["cd docs && mkdocs serve"] |
| 82 | +build = ["cd docs && mkdocs build --strict"] |
| 83 | +linkcheck = [ |
| 84 | + "linkcheckMarkdown docs/ -v -r", |
| 85 | + "linkcheckMarkdown README.md -v -r", |
| 86 | + "linkcheckMarkdown CHANGELOG.md -v -r", |
| 87 | +] |
| 88 | +deploy_latest = ["cd docs && mike deploy --push --update-aliases {args} latest"] |
| 89 | +deploy_develop = ["cd docs && mike deploy --push develop"] |
| 90 | + |
| 91 | + |
| 92 | +# >>> Generic Tools <<< |
11 | 93 |
|
12 | 94 | [tool.ruff]
|
13 |
| -lint.ignore = ["E501"] |
14 |
| -lint.isort.known-first-party = ["src", "tests"] |
15 |
| -extend-exclude = [".venv/*", ".eggs/*", ".nox/*", "build/*"] |
16 | 95 | line-length = 120
|
| 96 | +format.preview = true |
| 97 | +lint.extend-ignore = [ |
| 98 | + "ARG001", # Unused function argument |
| 99 | + "ARG002", # Unused method argument |
| 100 | + "ARG004", # Unused static method argument |
| 101 | + "FBT001", # Boolean-typed positional argument in function definition |
| 102 | + "FBT002", # Boolean default positional argument in function definition |
| 103 | + "PLR2004", # Magic value used in comparison |
| 104 | + "SIM115", # Use context handler for opening files |
| 105 | + "SLF001", # Private member accessed |
| 106 | +] |
| 107 | +lint.preview = true |
| 108 | +lint.isort.known-first-party = ["src", "tests"] |
| 109 | +extend-exclude = [".venv/*", ".eggs/*", "build/*"] |
17 | 110 |
|
18 | 111 | [tool.pytest.ini_options]
|
19 |
| -testpaths = "tests" |
| 112 | +addopts = """\ |
| 113 | + --strict-config |
| 114 | + --strict-markers |
| 115 | + """ |
| 116 | + |
| 117 | +[tool.coverage.run] |
| 118 | +branch = true |
| 119 | +parallel = true |
| 120 | +source = ["src/", "tests/"] |
| 121 | + |
| 122 | +[tool.coverage.paths] |
| 123 | +source = ["src/"] |
| 124 | + |
| 125 | +[tool.coverage.report] |
| 126 | +fail_under = 100 |
| 127 | +show_missing = true |
| 128 | +skip_covered = true |
| 129 | +sort = "Miss" |
| 130 | +exclude_lines = ["pragma: no cover", "...", "raise NotImplementedError"] |
0 commit comments