Skip to content

Commit cf335f0

Browse files
authored
refactor: fold web_fragments into XBlock python project (#917)
Part of: openedx-unsupported/web-fragments#309 Bumps version to 6.2.0
1 parent c57c1bd commit cf335f0

21 files changed

Lines changed: 790 additions & 24 deletions

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ Change history for XBlock
55
Unreleased
66
----------
77

8+
6.2.0 - 2026-06-09
9+
------------------
10+
11+
* Migrated web_fragments into XBlock's project. You should remove web_fragments as a separate dependency if you
12+
currently depend on it directly.
13+
814
5.3.0 - 2025-12-19
915
------------------
1016

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ help: ## display this help message
2121

2222
quality: ## check coding style with pycodestyle and pylint
2323
pycodestyle
24-
pylint xblock
24+
pylint xblock web_fragments
2525

2626
validate: test
2727

docs/fragments.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _Fragments API:
2+
3+
#############
4+
Fragments API
5+
#############
6+
7+
.. automodule:: web_fragments.fragment
8+
:members:
9+
10+
.. autoclass:: web_fragments.views.FragmentView
11+
:members:

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ in depth and guides developers through the process of creating an XBlock.
2121
runtime
2222
plugins
2323
exceptions
24+
fragments
2425
xblock-tutorial/index
2526
xblock-utils/index

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dependencies = [
3333
"pytz",
3434
"pyyaml",
3535
"simplejson",
36-
"web-fragments",
3736
"webob>=1.6.0",
3837
]
3938

@@ -54,10 +53,15 @@ local_scheme = "no-local-version"
5453
include-package-data = true
5554

5655
[tool.setuptools.packages.find]
56+
include = [
57+
"xblock*",
58+
"web_fragments*",
59+
]
5760

5861
[tool.setuptools.package-data]
5962
"xblock.utils" = ["public/*", "templates/*", "templatetags/*"]
6063
"xblock.test.utils" = ["data/*"]
64+
"web_fragments" = ["templates/*"]
6165

6266
[dependency-groups]
6367
# Base test packages, no Django version pinned

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = tox-uv>=1
44

55
[pytest]
66
DJANGO_SETTINGS_MODULE = xblock.test.settings
7-
addopts = --cov xblock
7+
addopts = --cov xblock --cov web_fragments
88
filterwarnings = always
99
norecursedirs = .* docs requirements
1010

@@ -14,7 +14,7 @@ dependency_groups =
1414
django42: django42
1515
django52: test
1616
commands =
17-
python -Wd -m pytest {posargs:xblock}
17+
python -Wd -m pytest {posargs:xblock web_fragments}
1818
python -m coverage xml
1919
allowlist_externals =
2020
make

uv.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web_fragments/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
Web fragments.
3+
"""

web_fragments/apps.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Web Fragments Django application initialization.
3+
"""
4+
from django.apps import AppConfig
5+
6+
7+
class WebFragmentsConfig(AppConfig):
8+
"""
9+
Configuration for the Web Fragments Django application.
10+
"""
11+
12+
name = 'web_fragments'

web_fragments/examples/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)