-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
238 lines (216 loc) · 6.22 KB
/
Copy pathpyproject.toml
File metadata and controls
238 lines (216 loc) · 6.22 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "xblocks-contrib"
dynamic = ["version"]
description = "core xblocks"
readme = "README.rst"
license = "AGPL-3.0"
license-files = ["LICENSE.txt"]
authors = [
{ name = "Open edX Project", email = "oscm@openedx.org" }
]
keywords = ["Python", "edx"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.2",
]
requires-python = ">=3.12"
dependencies = [
"beautifulsoup4",
"chem",
"defusedxml",
"django>=4.2",
"edx-codejail",
"edx-django-utils",
"edx-opaque-keys",
"edx-submissions",
"edx-toggles",
"edxval",
"fs",
"html5lib",
"lxml",
"markupsafe",
"nh3",
"numpy",
"oauthlib",
"openedx-calc",
"path",
"pyparsing",
"pytz",
"random2",
"requests",
"shapely",
"simplejson",
"webob",
"wrapt",
"xblock",
]
[project.urls]
Homepage = "https://github.com/openedx/xblocks-contrib"
[project.entry-points."xblock.v1"]
# _extracted suffix is added for testing only.
_annotatable_extracted = "xblocks_contrib:AnnotatableBlock"
_discussion_extracted = "xblocks_contrib:DiscussionXBlock"
_html_extracted = "xblocks_contrib:HtmlBlock"
_lti_extracted = "xblocks_contrib:LTIBlock"
_poll_question_extracted = "xblocks_contrib:PollBlock"
_problem_extracted = "xblocks_contrib:ProblemBlock"
_video_extracted = "xblocks_contrib:VideoBlock"
_word_cloud_extracted = "xblocks_contrib:WordCloudBlock"
# 'Done' XBlocks -- ones that are ready for general use today,
# and have been migrated fully from edx-platform or their original repository.
pdf = "xblock_pdf:PDFBlock"
[project.entry-points."lms.djangoapp"]
xblocks_contrib_problem_capa = "xblocks_contrib.problem.capa.apps:CapaAppConfig"
xblocks_contrib_discussion = "xblocks_contrib.discussion.apps:DiscussionAppConfig"
[project.entry-points."cms.djangoapp"]
xblocks_contrib_problem_capa = "xblocks_contrib.problem.capa.apps:CapaAppConfig"
xblocks_contrib_discussion = "xblocks_contrib.discussion.apps:DiscussionAppConfig"
[dependency-groups]
test-base = [
"ddt",
"pytest",
"pytest-cov",
"pytest-django",
"six",
]
# Current default Django version. When adding or retiring a Django version
# from the matrix, update this group and [tool.uv].conflicts accordingly.
test = [
{ include-group = "test-base" },
"Django>=5.2,<6.0",
]
django42 = [
{ include-group = "test-base" },
"Django>=4.2,<5.0",
]
quality = [
{ include-group = "test" },
"ruff",
]
doc = [
{ include-group = "test" },
"doc8",
"Sphinx",
"sphinx-book-theme",
]
ci = [
"tox",
"tox-uv",
]
dev = [
{ include-group = "quality" },
{ include-group = "ci" },
{ include-group = "doc" },
]
[tool.setuptools_scm]
version_scheme = "only-version"
local_scheme = "no-local-version"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["xblocks_contrib*", "xblock_pdf*"]
exclude = ["*tests*"]
[tool.setuptools.exclude-package-data]
"*" = ["tests*", "*.tests*", "spec*", "*.spec*"]
[tool.edx_lint]
uv_constraints = [
# Date: 2026-02-10
# setuptools >=80.9.0 has breaking tests. More details:
# https://github.com/openedx/openedx-platform/pull/37991
# Unpin once the issue is resolved.
"setuptools<=80.9.0",
# Date: 2026-08-10
# pytest-django 4.13.0 references `_pre_setup_ran_eagerly`, an attribute
# that only exists on Django 5.x TransactionTestCase, causing AttributeError
# on Django 4.2. Pin until a compatible release is available.
"pytest-django<4.13.0",
]
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"DJ", # flake8-django
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-third-party = ["django", "xblock"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "test_settings"
django_find_project = false
addopts = "--cov xblocks_contrib --cov xblock_pdf --cov-report term-missing --cov-report xml"
norecursedirs = [".*", "docs", "requirements", "site-packages"]
[tool.coverage.run]
branch = true
source = [
"xblocks_contrib",
"xblock_pdf",
]
omit = [
"*/tests/*",
"*/migrations/*",
"*/__pycache__/*",
"*/settings.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
show_missing = true
[tool.coverage.html]
directory = "htmlcov"
[tool.doc8]
# D001 = Line too long
ignore = ["D001"]
[tool.uv]
package = true
# Each entry lists groups with mutually exclusive version requirements so uv
# can produce a single uv.lock with a separate resolution for each.
# Add a new pair whenever you add a legacy-version group to [dependency-groups].
conflicts = [
[{ group = "test" }, { group = "django42" }],
]
# DO NOT EDIT constraint-dependencies DIRECTLY.
# This list is managed by `edx_lint write_uv_constraints`
# and will be overwritten the next time `make upgrade` is run.
# - GLOBAL constraints: edit edx_lint/files/common_constraints.txt
# - REPO-SPECIFIC constraints: edit [tool.edx_lint].uv_constraints in this file
constraint-dependencies = [
"Django<6.0",
"elasticsearch<7.14.0",
"social-auth-app-django<6.0.0",
"social-auth-core<5.0.0",
"pip<26.2.1",
"setuptools<=80.9.0",
"pytest-django<4.13.0",
]
[tool.semantic_release]
# We use SETUPTOOLS_SCM_PRETEND_VERSION to pull the version from python-semantic-release
# instead of from version control because the build step happens before the repo gets tagged.
build_command = "python -m pip install --upgrade build && SETUPTOOLS_SCM_PRETEND_VERSION=$NEW_VERSION python -m build"