Skip to content

Commit c2b04b7

Browse files
docs: merge upstream/main into cbe_assessment_criteria_versioning_adr
2 parents ccfbba3 + e28fab7 commit c2b04b7

355 files changed

Lines changed: 9847 additions & 7757 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
branch = True
33
data_file = .coverage
44
source =
5-
openedx_learning
6-
openedx_tagging
5+
src
76
omit =
87
test_settings
98
**/migrations/*

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest] # Add macos-latest later?
19-
python-version: ['3.11', '3.12']
20-
toxenv: ["django42", "django52", "package", "quality"]
21-
# We're only testing against MySQL 8 right now because 5.7 is
22-
# incompatible with Djagno 4.2. We'd have to make the tox.ini file more
23-
# complicated than it's worth given the short expected shelf-life of
24-
# MySQL 5.7 in our stack.
19+
python-version: ['3.12']
20+
toxenv: ["django52", "package", "quality"]
2521
mysql-version: ["8"]
2622
services:
2723
mysql:

.github/workflows/lint-imports.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
- name: setup python
1818
uses: actions/setup-python@v6
1919
with:
20-
python-version: '3.11'
20+
python-version: '3.12'
2121

2222
- name: Install pip
2323
run: pip install -r requirements/pip.txt
2424

2525
- name: Install Dependencies
26-
run: pip install -r requirements/ci.txt
26+
run: pip install -e . -r requirements/quality.txt
2727

2828
- name: Analyze imports
2929
run: lint-imports

.github/workflows/pypi-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ jobs:
1515
- name: setup python
1616
uses: actions/setup-python@v6
1717
with:
18-
python-version: 3.11
18+
python-version: 3.12
1919

2020
- name: Install pip
2121
run: pip install -r requirements/pip.txt
2222

23-
- name: Build package
23+
- name: Build the package (openedx-core)
2424
run: python setup.py sdist bdist_wheel
2525

26-
- name: Publish to PyPI
26+
- name: Publish openedx-core to PyPI
2727
uses: pypa/gh-action-pypi-publish@release/v1
2828
with:
2929
user: __token__

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ output/*/index.html
5454
# Sphinx
5555
docs/_build
5656
docs/modules.rst
57-
docs/openedx_learning.rst
58-
docs/openedx_learning.*.rst
57+
docs/openedx_content.rst
58+
docs/openedx_content.*.rst
5959

6060
# Private requirements
6161
requirements/private.in
@@ -66,6 +66,7 @@ dev.db*
6666

6767
# virtualenv
6868
venv/
69+
.venv/
6970

7071
### Visual Studio Code ###
7172
# Generally ignore VS Code configuration, except...

.importlinter

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,66 @@
1-
# openedx_learning is intended to be a library of apps used across multiple
1+
# This repo is intended to be a library of apps used across multiple
22
# projects, and we want to ensure certain dependency relationships. Please
33
# think through any changes you make to this file carefully, and don't just
44
# casually modify these linting rules to "fix the build".
5+
56
[importlinter]
6-
root_package = openedx_learning
7-
8-
# This is the most basic layering for openedx_learning.
9-
#
10-
# The "lib" package is meant for low level utilities, field definitions, and the
11-
# like, so it's at the bottom layer.
12-
#
13-
# The "core" apps are meant to be the heart of our system, with foundational
14-
# data models and plugin interfaces. It can rely on "lib" utilities.
15-
#
16-
# The "contrib" apps are meant to be apps that could easily be created outside
17-
# of openedx_learning in a separate repository, but are bundled here because
18-
# we think they'll be generally useful. These apps may call into "core" or "lib"
19-
# apps, but not the other way around. The "core" apps should *never* import from
20-
# "contrib".
21-
[importlinter:contract:openedx_learning_layering]
22-
name = Lib / Core / Contrib Layering
7+
root_packages =
8+
openedx_content
9+
openedx_tagging
10+
openedx_django_lib
11+
openedx_core
12+
13+
# This is layering between our top-level src folders (mostly Django apps).
14+
# This should be updated as new Django apps are added.
15+
# It's possible this might need to grow into multiple rules.
16+
[importlinter:contract:src_layering]
17+
name = "top-level source folders are layered correctly"
2318
type = layers
24-
layers=
25-
openedx_learning.contrib
26-
openedx_learning.apps
27-
openedx_learning.lib
28-
29-
# This is layering within our Authoring apps. Every new app should be added to
30-
# this list when it it created.
31-
[importlinter:contract:core_apps_layering]
32-
name = Authoring App Dependency Layering
19+
layers =
20+
# Content is currently the highest-level thing in this repo.
21+
# Over time, we may add apps "above" or "below" this.
22+
openedx_content
23+
24+
# Tagging is very simple & fundamental. Should probably not depend on any other Django apps.
25+
openedx_tagging
26+
27+
# Django utilities. Should not dependend on any of the real apps (above).
28+
openedx_django_lib
29+
30+
# This just an empty shell package, to expose the __version__ number.
31+
# Should not depend on anything.
32+
openedx_core
33+
34+
# This is "applet" layering, within our Content djangoapp.
35+
# Every new applet should be added to this list when it it created.
36+
[importlinter:contract:content_applet_layering]
37+
name = "openedx_content's internal applets are layered correctly"
3338
type = layers
3439
layers=
35-
# The public authoring API is at the top–none of the apps should call to it.
36-
openedx_learning.api.authoring
40+
# The public API is at the top. None of the internal applets should call to it.
41+
openedx_content.api
3742

38-
# The "backup_restore" app handle the new export and import mechanism.
39-
openedx_learning.apps.openedx_content.applets.backup_restore
43+
# The "backup_restore" applet handles the new export and import mechanism.
44+
openedx_content.applets.backup_restore
4045

41-
# The "components" app is responsible for storing versioned Components,
42-
# which is Open edX Studio terminology maps to things like individual
46+
# The "components" applet is responsible for storing versioned Components,
47+
# which in Open edX Studio terminology maps to things like individual
4348
# Problems, Videos, and blocks of HTML text. This is also the type we would
4449
# associate with a single "leaf" XBlock–one that is not a container type and
4550
# has no child elements.
46-
openedx_learning.apps.openedx_content.applets.components
51+
# The "containers" app is built on top of publishing, and is a peer to
52+
# "components" but they do not depend on each other.
53+
openedx_content.applets.components | openedx_content.applets.containers
4754

48-
# The "contents" app stores the simplest pieces of binary and text data,
55+
# The "media" applet stores the simplest pieces of binary and text data,
4956
# without versioning information. These belong to a single Learning Package.
50-
openedx_learning.apps.openedx_content.applets.contents
57+
openedx_content.applets.media
5158

52-
# The "collections" app stores arbitrary groupings of PublishableEntities.
59+
# The "collections" applet stores arbitrary groupings of PublishableEntities.
5360
# Its only dependency should be the publishing app.
54-
openedx_learning.apps.openedx_content.applets.collections
61+
openedx_content.applets.collections
5562

5663
# The lowest layer is "publishing", which holds the basic primitives needed
5764
# to create Learning Packages and manage the draft and publish states for
5865
# various types of content.
59-
openedx_learning.apps.openedx_content.applets.publishing
66+
openedx_content.applets.publishing

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ sphinx:
1010
configuration: docs/conf.py
1111

1212
python:
13-
version: 3.11
13+
version: 3.12
1414
install:
1515
- requirements: requirements/doc.txt

CHANGELOG.rst

Lines changed: 0 additions & 28 deletions
This file was deleted.

MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ include CHANGELOG.rst
22
include LICENSE.txt
33
include README.rst
44
include requirements/base.in
5-
recursive-include openedx_learning *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg *.py
6-
recursive-include openedx_tagging *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg *.py *.yaml *.json *.csv
5+
recursive-include src *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg *.py *.yaml *.json *.csv

Makefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,19 @@ selfcheck: ## check that the Makefile is well-formed
8080
@echo "The Makefile is well-formed."
8181

8282
## Localization targets
83+
# TODO: Need to audit these, and then actually tell openedx-translations
84+
# to use them. https://github.com/openedx/openedx-core/issues/483
8385

8486
extract_translations: ## extract strings to be translated, outputting .mo files
8587
rm -rf docs/_build
86-
cd openedx_learning && ../manage.py makemessages -l en -v1 -d django
87-
cd openedx_learning && ../manage.py makemessages -l en -v1 -d djangojs
88-
cd openedx_tagging && ../manage.py makemessages -l en -v1 -d django
89-
cd openedx_tagging && ../manage.py makemessages -l en -v1 -d djangojs
88+
./manage.py makemessages -l en -v1 -d django
89+
./manage.py makemessages -l en -v1 -d djangojs
9090

9191
compile_translations: ## compile translation files, outputting .po files for each supported language
92-
cd openedx_learning && ../manage.py compilemessages
93-
cd openedx_tagging && ../manage.py compilemessages
92+
./manage.py compilemessages
9493

9594
detect_changed_source_translations:
96-
cd openedx_learning && i18n_tool changed
97-
cd openedx_tagging && i18n_tool changed
95+
cd src && i18n_tool changed
9896

9997
pull_translations: ## pull translations from Transifex
10098
tx pull -a -f -t --mode reviewed
@@ -103,8 +101,7 @@ push_translations: ## push source translation files (.po) from Transifex
103101
tx push -s
104102

105103
dummy_translations: ## generate dummy translation (.po) files
106-
cd openedx_learning && i18n_tool dummy
107-
cd openedx_tagging && i18n_tool dummy
104+
cd src && i18n_tool dummy
108105

109106
build_dummy_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files
110107

0 commit comments

Comments
 (0)