-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (153 loc) · 5.82 KB
/
pyproject.toml
File metadata and controls
177 lines (153 loc) · 5.82 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
[project]
name = "django_example_ynh"
dynamic = ["version"]
description = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
license = {text = "GPL-3.0-or-later"}
readme = "README.md"
authors = [
{name = 'Jens Diemer', email = 'django_example_ynh@jensdiemer.de'}
]
# Until we can update to Django 5.2, we need to stay with Python <3.14
requires-python = ">=3.11,<3.14"
dependencies = [
"django_example>=0.2.0", # https://github.com/jedie/django-example
#
# extras "ynh" will install: gunicorn, psycopg2, django-redis and django-axes
# see: https://github.com/YunoHost-Apps/django_yunohost_integration/blob/main/pyproject.toml
"django_yunohost_integration>=0.10.7", # https://github.com/YunoHost-Apps/django_yunohost_integration
#
# Stay with Django <= 5.1, because >=5.2 requires postgresql >= 14
# See: https://docs.djangoproject.com/en/dev/ref/databases/#postgresql-notes
# But current YunoHost v12.x postgresql version is 13.x
"Django<5.2",
#
'gunicorn',
'psycopg[binary]', # https://github.com/psycopg/psycopg
'django-redis',
'django-axes', # https://github.com/jazzband/django-axes
#
"cli-base-utilities", # https://github.com/jedie/cli-base-utilities
]
[dependency-groups]
dev = [
"django-debug-toolbar", # http://django-debug-toolbar.readthedocs.io/en/stable/changes.html
"manage_django_project", # https://github.com/jedie/manage_django_project
"manageprojects", # https://github.com/jedie/manageprojects
"bx_django_utils", # https://github.com/boxine/bx_django_utils
"beautifulsoup4", # https://pypi.org/project/beautifulsoup4/
"uv", # https://github.com/astral-sh/uv
"tblib", # https://github.com/ionelmc/python-tblib
"nox", # https://github.com/wntrblm/nox
"coverage", # https://github.com/nedbat/coveragepy
"ruff", # https://github.com/astral-sh/ruff
"codespell", # https://github.com/codespell-project/codespell
"EditorConfig", # https://github.com/editorconfig/editorconfig-core-py
"pip-audit", # https://github.com/pypa/pip-audit
"mypy", # https://github.com/python/mypy
"twine", # https://github.com/pypa/twine
"typeguard", # https://github.com/agronholm/typeguard/
]
[project.urls]
Documentation = "https://github.com/YunoHost-Apps/django_example_ynh"
Source = "https://github.com/YunoHost-Apps/django_example_ynh"
[project.scripts]
django_example_ynh_dev = "django_example_ynh.cli_dev:main"
[ynh-integration]
local_settings_source= "local_settings_source.py"
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm>=7.1"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["django_example_ynh*"]
[tool.setuptools.dynamic]
version = {attr = "django_example_ynh.__version__"}
[tool.cli_base.pip_audit]
# https://github.com/jedie/cli-base-utilities/blob/main/docs/pip_audit.md
requirements=["requirements.dev.txt"]
strict=true
require_hashes=true
ignore-vuln=[]
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
line-length = 120
exclude = [
".*/","*/htmlcov/*","*/migrations/*","*/local_test/*"
]
[tool.ruff.lint]
preview = true # Needed for some of the rules
extend-select = [
"E", # pycodestyle: https://docs.astral.sh/ruff/rules/#error-e
"I", # isort: https://docs.astral.sh/ruff/rules/#isort-i
]
ignore = [
"E402", # https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
"E731", # https://docs.astral.sh/ruff/rules/lambda-assignment/
]
[tool.ruff.lint.isort]
# https://docs.astral.sh/ruff/settings/#lintisort
lines-after-imports = 2
[tool.ruff.format]
quote-style = "single"
[tool.coverage.run]
branch = true
parallel = true
concurrency = ["multiprocessing"]
source = ['.']
command_line = './dev-cli.py test'
disable_warnings = ["couldnt-parse"]
[tool.coverage.report]
omit = ['.*', '*/tests/*']
skip_empty = true
fail_under = 10
show_missing = true
exclude_lines = [
'if self.debug:',
'pragma: no cover',
'raise NotImplementedError',
'if __name__ == .__main__.:',
]
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
allow_redefinition = true # https://github.com/python/mypy/issues/7165
show_error_codes = true
plugins = []
exclude = ['.venv', 'tests']
[manageprojects] # https://github.com/jedie/manageprojects
initial_revision = "da47a1e"
initial_date = 2022-11-06T17:25:53+01:00
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
cookiecutter_directory = "yunohost_django_package"
applied_migrations = [
"4dbd146", # 2022-11-06T17:59:58+01:00
"baf1ebc", # 2022-11-30T21:19:10+01:00
"44aa620", # 2022-12-21T19:59:39+01:00
"b204761", # 2022-12-21T20:25:20+01:00
"fad909d", # 2023-08-22T19:20:34+02:00
"4abd4c0", # 2023-11-25T15:59:31+01:00
"6fa011a", # 2024-09-07T11:11:40+02:00
"935485b", # 2024-09-09T10:39:39+02:00
"7b8d152", # 2024-12-03T21:16:56+01:00
"c059f97", # 2025-03-21T19:19:56+01:00
"71a6fcd", # 2025-10-30T22:39:21+01:00
]
[manageprojects.cookiecutter_context.cookiecutter]
project_name = "Django Example"
project_id = "django_example"
full_name = "Jens Diemer"
github_username = "jedie"
author_email = "django_example_ynh@jensdiemer.de"
upstream_pkg_name = "django_example"
upstream_pkg_app_name = "django_example"
upstream_pkg_project_name = "django_example"
upstream_url = "https://github.com/jedie/django-example"
ynh_app_pkg_name = "django_example_ynh"
ynh_app_url = "https://github.com/YunoHost-Apps/django_example_ynh"
bug_tracker_url = "https://github.com/jedie/django-example/issues"
upstream_version = "0.2.0"
ynh_suffix_version = "ynh6"
package_description = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
license = "GPL-3.0-or-later"
_template = "https://github.com/jedie/cookiecutter_templates/"
_output_dir = "~/repos_ynh/django_example_ynh"