-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
100 lines (90 loc) · 3.34 KB
/
Copy pathpyproject.toml
File metadata and controls
100 lines (90 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# setuptools >= 77 accepts the PEP 639 SPDX `license = "MIT"` string below.
# (Older setuptools requires the deprecated `license = {text = "MIT"}` table.)
[build-system]
requires = ["setuptools>=77.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "fastcomments-django"
version = "0.1.0"
description = "FastComments for Django - embed the comment widgets and sign Secure SSO with template tags."
readme = "README.md"
license = "MIT"
authors = [
{name = "FastComments", email = "support@fastcomments.com"}
]
# The FastComments SDK's SSO module uses PEP 604 (X | None) annotations, which
# require Python 3.10+ at runtime.
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
# The base install is lightweight: Django plus the pure-stdlib SSO signer from
# the FastComments Python SDK. Server-side REST access needs the [api] extra,
# which pulls in the SDK's generated OpenAPI client.
dependencies = [
"Django>=4.2",
"fastcomments @ git+https://github.com/fastcomments/fastcomments-python.git@v3.0.1",
]
[project.optional-dependencies]
api = [
"fastcomments[client] @ git+https://github.com/fastcomments/fastcomments-python.git@v3.0.1",
]
dev = [
"pytest>=7.0.0",
"pytest-django>=4.5.0",
"ruff>=0.6.0",
"mypy>=1.8.0",
]
[project.urls]
Homepage = "https://github.com/fastcomments/fastcomments-django"
Documentation = "https://docs.fastcomments.com"
Repository = "https://github.com/fastcomments/fastcomments-django"
Issues = "https://github.com/fastcomments/fastcomments-django/issues"
[tool.setuptools]
packages = ["fastcomments_django", "fastcomments_django.templatetags"]
[tool.setuptools.package-data]
fastcomments_django = ["templates/**/*", "py.typed"]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.settings"
python_files = ["test_*.py"]
testpaths = ["tests"]
# Put the repo root on sys.path so `tests.settings` imports under the plain
# `pytest` runner (not just `python -m pytest`, which adds CWD implicitly).
pythonpath = ["."]
[tool.ruff]
line-length = 120
target-version = "py310"
extend-exclude = ["build", "dist"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
[tool.mypy]
python_version = "3.10"
files = ["fastcomments_django", "example"]
# The FastComments SDK (sso/client) and Django ship no type stubs here.
ignore_missing_imports = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_optional = true
# Skip following the generated SDK so the type-check behaves identically whether
# or not the [api] extra is installed (its `client` ships py.typed, so mypy would
# otherwise follow it in CI but not under a local editable install).
[[tool.mypy.overrides]]
module = ["client.*", "sso", "sso.*"]
follow_imports = "skip"
ignore_missing_imports = true