-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
193 lines (172 loc) · 4.2 KB
/
pyproject.toml
File metadata and controls
193 lines (172 loc) · 4.2 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "jsweb"
version = "1.2.1"
description = "JsWeb - A lightweight and modern Python web framework designed for speed and simplicity."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{ name = "Jones Peter", email = "jonespetersoftware@gmail.com" }
]
keywords = [
"JsWeb", "Framework", "Web", "Python", "ASGI", "Web Server", "ORM",
"Database", "Routing", "Authentication", "Forms", "CLI", "Admin"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Application Frameworks"
]
dependencies = [
"jinja2",
"sqlalchemy",
"werkzeug",
"itsdangerous",
"alembic",
"markupsafe",
"uvicorn",
"pydantic>=2.0,<3.0" # Required for DTO system and OpenAPI docs
]
[project.optional-dependencies]
dev = [
# Development server
"watchdog>=3.0",
"websockets>=11.0",
# Testing
"pytest>=7.4",
"pytest-cov>=4.1",
"pytest-asyncio>=0.21",
# Code formatting
"black>=24.0",
"isort>=5.12",
# Linting
"ruff>=0.4",
# Type checking
"mypy>=1.7",
# Security scanning
"bandit>=1.7",
"safety>=2.3",
# Pre-commit hooks
"pre-commit>=3.5",
]
qr = ["qrcode[pil]"]
postgresql = ["psycopg2-binary"]
[project.scripts]
jsweb = "jsweb.cli:cli"
[project.urls]
Documentation = "https://jsweb-framework.site/"
Homepage = "https://github.com/Jsweb-Tech/jsweb"
"Bug Tracker" = "https://github.com/Jsweb-Tech/jsweb/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["jsweb*"]
[tool.setuptools.package-data]
jsweb = [
# Core framework files
"templates/*.html",
"static/*.css",
"static/*.js",
"static/*.png",
# Project generation templates
"project_templates/*.jinja",
"project_templates/alembic/*",
# --- UPDATED FOR ADMIN SUB-PACKAGE ---
# Include all templates and static files from within the new 'admin' package
"admin/templates/*.html",
"admin/static/*"
]
[tool.pytest.ini_options]
testpaths = ["Tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v --strict-markers --tb=short --cov=jsweb --cov-report=html --cov-report=term-missing"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Tests that take a long time to run",
"asyncio: Async tests"
]
asyncio_mode = "auto"
[tool.coverage.run]
source = ["jsweb"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"@abstractmethod"
]
precision = 2
skip_covered = false
skip_empty = true
[tool.coverage.html]
directory = "htmlcov"
[tool.black]
line-length = 88
target-version = ["py38"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.venv
| venv
| build
| dist
| __pycache__
)/
'''
[tool.ruff]
line-length = 88
target-version = "py311" # adjust if needed
fix = false
exclude = [
".git",
"__pycache__",
"build",
"dist",
".venv",
"venv",
]
# Linter configuration
[tool.ruff.lint]
# Enable important rule sets
select = [
"E", # pycodestyle
"F", # pyflakes
"B", # bugbear
"I", # import sorting (replaces isort)
"UP", # pyupgrade
]
# Ignore noise & Black conflicts
ignore = [
"E203", # Black-compatible
"E501", # Line length handled by Black
]
# Per-file exceptions (framework-friendly)
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"Tests/*" = ["F401", "B007", "E731"]