From 2e3e57f4ac3ca5cf03b5dd2a8895638ca2df06ab Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 16:51:04 -0400 Subject: [PATCH 01/11] build: Bump version to 1.0.0 --- src/openedx_core/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openedx_core/__init__.py b/src/openedx_core/__init__.py index ef364eec5..e9bef3c71 100644 --- a/src/openedx_core/__init__.py +++ b/src/openedx_core/__init__.py @@ -6,4 +6,4 @@ """ # The version for the entire repository -__version__ = "0.48.1" +__version__ = "1.0.0" From 664f50a843f0b6ab190fd7cf60a9fa0bbbb65d16 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:01:56 -0400 Subject: [PATCH 02/11] refactor: Remove unnecessary AUTH_USER migration deps --- .../migrations/0008_rename_collection_key_to_collection_code.py | 1 - .../migrations/0013_unicode_container_component_codes.py | 1 - 2 files changed, 2 deletions(-) diff --git a/src/openedx_content/migrations/0008_rename_collection_key_to_collection_code.py b/src/openedx_content/migrations/0008_rename_collection_key_to_collection_code.py index 9bdab4915..66db2a3bb 100644 --- a/src/openedx_content/migrations/0008_rename_collection_key_to_collection_code.py +++ b/src/openedx_content/migrations/0008_rename_collection_key_to_collection_code.py @@ -15,7 +15,6 @@ class Migration(migrations.Migration): dependencies = [ ('openedx_content', '0007_publishlogrecord_direct'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ diff --git a/src/openedx_content/migrations/0013_unicode_container_component_codes.py b/src/openedx_content/migrations/0013_unicode_container_component_codes.py index e944ce2fd..ad211d909 100644 --- a/src/openedx_content/migrations/0013_unicode_container_component_codes.py +++ b/src/openedx_content/migrations/0013_unicode_container_component_codes.py @@ -14,7 +14,6 @@ class Migration(migrations.Migration): dependencies = [ ('openedx_content', '0012_rename_componentversionmedia_key_to_path'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ From c15e04fa586318634f19a05bcffa4a24a5e9230a Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:04:23 -0400 Subject: [PATCH 03/11] docs: Remove instability warning from README --- README.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.rst b/README.rst index fd4a41600..ce7446cfb 100644 --- a/README.rst +++ b/README.rst @@ -63,11 +63,6 @@ The code in this repository is licensed under the AGPL 3.0 unless otherwise note Please see `LICENSE.txt `_ for details. -How To Contribute ------------------ - -This repo is in a very experimental state. Discussion using GitHub Issues is welcome, but you probably don't want to make contributions as everything can shift around drastically with little notice. - Reporting Security Issues ------------------------- From 867a34c793ce5c1947c251cf7054d53afa05c4ca Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:06:17 -0400 Subject: [PATCH 04/11] docs: Remove top-level instability warnings --- src/openedx_content/applets/collections/api.py | 2 +- src/openedx_content/applets/components/api.py | 2 +- src/openedx_content/applets/containers/api.py | 4 +--- src/openedx_content/applets/media/api.py | 2 +- src/openedx_content/applets/publishing/api.py | 2 +- src/openedx_content/applets/sections/api.py | 2 -- src/openedx_content/applets/subsections/api.py | 2 -- src/openedx_content/applets/units/api.py | 2 -- 8 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/openedx_content/applets/collections/api.py b/src/openedx_content/applets/collections/api.py index 40692ca03..b0b4a43f1 100644 --- a/src/openedx_content/applets/collections/api.py +++ b/src/openedx_content/applets/collections/api.py @@ -1,5 +1,5 @@ """ -Collections API (warning: UNSTABLE, in progress API) +Collections API """ from __future__ import annotations diff --git a/src/openedx_content/applets/components/api.py b/src/openedx_content/applets/components/api.py index 2a08fb159..99a372b93 100644 --- a/src/openedx_content/applets/components/api.py +++ b/src/openedx_content/applets/components/api.py @@ -1,5 +1,5 @@ """ -Components API (warning: UNSTABLE, in progress API) +Components API These functions are often going to be simple-looking write operations, but there is bookkeeping logic needed across multiple models to keep state consistent. You diff --git a/src/openedx_content/applets/containers/api.py b/src/openedx_content/applets/containers/api.py index 9f0756a58..e457807c6 100644 --- a/src/openedx_content/applets/containers/api.py +++ b/src/openedx_content/applets/containers/api.py @@ -1,5 +1,5 @@ """ -Containers API (warning: UNSTABLE, in progress API) +Containers API """ from __future__ import annotations @@ -45,8 +45,6 @@ # start with an underscore AND it is not in __all__, that function is considered # to be callable only by other apps in the authoring package. __all__ = [ - # 🛑 UNSTABLE: All APIs related to containers are unstable until we've figured - # out our approach to dynamic content (randomized, A/B tests, etc.) "ContainerSubclass", "ContainerImplementationMissingError", "create_container", diff --git a/src/openedx_content/applets/media/api.py b/src/openedx_content/applets/media/api.py index 90d0ff801..f36c71a25 100644 --- a/src/openedx_content/applets/media/api.py +++ b/src/openedx_content/applets/media/api.py @@ -1,5 +1,5 @@ """ -Low Level media.api (warning: UNSTABLE, in progress API) +Low Level media.api Please look at the models.py file for more information about the kinds of data are stored in this app. diff --git a/src/openedx_content/applets/publishing/api.py b/src/openedx_content/applets/publishing/api.py index 88a715cbf..ddbc39463 100644 --- a/src/openedx_content/applets/publishing/api.py +++ b/src/openedx_content/applets/publishing/api.py @@ -1,5 +1,5 @@ """ -Publishing API (warning: UNSTABLE, in progress API) +Publishing API Please look at the models.py file for more information about the kinds of data are stored in this app. diff --git a/src/openedx_content/applets/sections/api.py b/src/openedx_content/applets/sections/api.py index 5449235eb..5d80596a6 100644 --- a/src/openedx_content/applets/sections/api.py +++ b/src/openedx_content/applets/sections/api.py @@ -13,8 +13,6 @@ from ..subsections.models import Subsection, SubsectionVersion from .models import Section, SectionVersion -# 🛑 UNSTABLE: All APIs related to containers are unstable until we've figured -# out our approach to dynamic content (randomized, A/B tests, etc.) __all__ = [ "get_section", "create_section_and_version", diff --git a/src/openedx_content/applets/subsections/api.py b/src/openedx_content/applets/subsections/api.py index 1d9544990..46f8d8c9f 100644 --- a/src/openedx_content/applets/subsections/api.py +++ b/src/openedx_content/applets/subsections/api.py @@ -13,8 +13,6 @@ from ..units.models import Unit, UnitVersion from .models import Subsection, SubsectionVersion -# 🛑 UNSTABLE: All APIs related to containers are unstable until we've figured -# out our approach to dynamic content (randomized, A/B tests, etc.) __all__ = [ "get_subsection", "create_subsection_and_version", diff --git a/src/openedx_content/applets/units/api.py b/src/openedx_content/applets/units/api.py index 415ebf291..c1556a32f 100644 --- a/src/openedx_content/applets/units/api.py +++ b/src/openedx_content/applets/units/api.py @@ -13,8 +13,6 @@ from ..publishing.models import LearningPackage from .models import Unit, UnitVersion -# 🛑 UNSTABLE: All APIs related to containers are unstable until we've figured -# out our approach to dynamic content (randomized, A/B tests, etc.) __all__ = [ "get_unit", "create_unit_and_version", From b3387a21ce89c688060f44a002a85a4cae941d43 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:10:52 -0400 Subject: [PATCH 05/11] temp: Stable or unstable? -- resolve before merging --- src/openedx_content/applets/containers/api.py | 34 +++++++++---------- src/openedx_content/applets/publishing/api.py | 8 ++--- src/openedx_content/applets/sections/api.py | 4 +-- .../applets/subsections/api.py | 4 +-- src/openedx_content/applets/units/api.py | 4 +-- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/openedx_content/applets/containers/api.py b/src/openedx_content/applets/containers/api.py index e457807c6..ec41e73f7 100644 --- a/src/openedx_content/applets/containers/api.py +++ b/src/openedx_content/applets/containers/api.py @@ -74,7 +74,7 @@ @dataclass(frozen=True) class ContainerEntityListEntry: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Data about a single entity in a container, e.g. a component in a unit. """ @@ -143,7 +143,7 @@ def create_container( can_stand_alone: bool = True, ) -> ContainerModel: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Create a new container. Args: @@ -183,7 +183,7 @@ def create_container( def create_entity_list() -> EntityList: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Create a new entity list. This is an structure that holds a list of entities that will be referenced by the container. @@ -199,7 +199,7 @@ def create_entity_list_with_rows( learning_package_id: LearningPackage.ID | None, ) -> EntityList: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Create new entity list rows for an entity list. Args: @@ -305,7 +305,7 @@ def create_container_version( created_by: int | None, ) -> ContainerVersion: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Create a new container version. Args: @@ -355,7 +355,7 @@ def create_container_and_version( can_stand_alone: bool = True, ) -> tuple[ContainerModel, ContainerVersionModel]: """ - [ 🛑 UNSTABLE ] Create a new container and its initial version. + [ ❓TODO: STABLE or UNSTABLE? ] Create a new container and its initial version. Args: learning_package_id: The learning package ID. @@ -470,7 +470,7 @@ def create_next_container_version( force_version_num: int | None = None, ) -> ContainerVersion: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Create the next version of a container. A new version of the container is created only when its metadata changes: @@ -543,7 +543,7 @@ def create_next_container_version( def get_container(pk: Container.ID) -> Container: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get a container by its primary key. This returns the Container, not any specific version. It may not be published, or may have been soft deleted. @@ -559,7 +559,7 @@ def get_container(pk: Container.ID) -> Container: def get_container_version(container_version_pk: int) -> ContainerVersion: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get a container version by its primary key. Args: @@ -573,7 +573,7 @@ def get_container_version(container_version_pk: int) -> ContainerVersion: def get_container_by_code(learning_package_id: LearningPackage.ID, /, container_code: str) -> Container: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get a container by its learning package and container code. Args: @@ -639,7 +639,7 @@ def get_containers( include_deleted: bool | None = False, ) -> QuerySet[Container]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get all containers in the given learning package. Args: @@ -667,7 +667,7 @@ def get_entities_in_container( select_related_version: str | None = None, ) -> list[ContainerEntityListEntry]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the current draft or published version of the given container. @@ -726,7 +726,7 @@ def get_entities_in_container_as_of( publish_log_id: int, ) -> tuple[ContainerVersion | None, list[ContainerEntityListEntry]]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the published version of the given container as of the given PublishLog version (which is essentially a version for the entire learning package). @@ -760,7 +760,7 @@ def get_entities_in_container_as_of( def contains_unpublished_changes(container_or_pk: Container | Container.ID, /) -> bool: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Check recursively if a container has any unpublished changes. Note: I've preserved the API signature for now, but we probably eventually @@ -813,7 +813,7 @@ def get_containers_with_entity( published=False, ) -> QuerySet[Container]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Find all draft containers that directly contain the given entity. They will always be from the same learning package; cross-package containers @@ -854,7 +854,7 @@ def get_container_children_count( published: bool, ): """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the count of entities in the current draft or published version of the given container. Args: @@ -892,7 +892,7 @@ def get_container_children_entity_refs(container_version: ContainerVersion) -> l def get_descendant_component_entity_ids(container: Container) -> list[int]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Return the entity IDs of all leaf (non-Container) descendants of ``container``. Intermediate containers (e.g. Subsections, Units) are never included in the diff --git a/src/openedx_content/applets/publishing/api.py b/src/openedx_content/applets/publishing/api.py index ddbc39463..f3e4f3cb6 100644 --- a/src/openedx_content/applets/publishing/api.py +++ b/src/openedx_content/applets/publishing/api.py @@ -621,7 +621,7 @@ def get_entity_draft_history( publishable_entity_or_id: PublishableEntity | int, / ) -> QuerySet[DraftChangeLogRecord]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Return DraftChangeLogRecords for a PublishableEntity since its last publication, ordered from most recent to oldest. @@ -689,7 +689,7 @@ def get_entity_publish_history( publishable_entity_or_id: PublishableEntity | int, / ) -> QuerySet[PublishLogRecord]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Return all PublishLogRecords for a PublishableEntity, ordered most recent first. Edge cases: @@ -724,7 +724,7 @@ def get_entity_publish_history_entries( publish_log_uuid: str, ) -> QuerySet[DraftChangeLogRecord]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Return the DraftChangeLogRecords associated with a specific PublishLog. Finds the PublishLogRecord for the given entity and publish_log_uuid, then @@ -822,7 +822,7 @@ def get_entity_version_contributors( new_version_num: int | None, ) -> QuerySet: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Return distinct User queryset of contributors (changed_by) for DraftChangeLogRecords of a PublishableEntity after old_version_num. diff --git a/src/openedx_content/applets/sections/api.py b/src/openedx_content/applets/sections/api.py index 5d80596a6..91c6aa058 100644 --- a/src/openedx_content/applets/sections/api.py +++ b/src/openedx_content/applets/sections/api.py @@ -91,7 +91,7 @@ def create_next_section_version( @dataclass(frozen=True) class SectionListEntry: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Data about a single subsection in a section. """ @@ -109,7 +109,7 @@ def get_subsections_in_section( published: bool, ) -> list[SectionListEntry]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Section. diff --git a/src/openedx_content/applets/subsections/api.py b/src/openedx_content/applets/subsections/api.py index 46f8d8c9f..2bbcd02cf 100644 --- a/src/openedx_content/applets/subsections/api.py +++ b/src/openedx_content/applets/subsections/api.py @@ -91,7 +91,7 @@ def create_next_subsection_version( @dataclass(frozen=True) class SubsectionListEntry: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Data about a single unit in a subsection. """ @@ -109,7 +109,7 @@ def get_units_in_subsection( published: bool, ) -> list[SubsectionListEntry]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Subsection. diff --git a/src/openedx_content/applets/units/api.py b/src/openedx_content/applets/units/api.py index c1556a32f..41bcbd20c 100644 --- a/src/openedx_content/applets/units/api.py +++ b/src/openedx_content/applets/units/api.py @@ -91,7 +91,7 @@ def create_next_unit_version( @dataclass(frozen=True) class UnitListEntry: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Data about a single entity in a container, e.g. a component in a unit. """ @@ -109,7 +109,7 @@ def get_components_in_unit( published: bool, ) -> list[UnitListEntry]: """ - [ 🛑 UNSTABLE ] + [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Unit. From ad66dbd2e802bd4c0d564ca7291278e62b979d47 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:25:09 -0400 Subject: [PATCH 06/11] docs: Stability policy --- README.rst | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index ce7446cfb..d1bf5b026 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,10 @@ Overview The ``openedx-core`` project holds Django apps which represent core teaching & learning platform concepts. -Each app exposes stable, public API of Python functions and Django models. Some apps additionally provides REST APIs. These APIs are suitable for use in ``openedx-platform`` as well as in community-developed Open edX plugins. +Each app exposes a public API of Python functions and Django models; some apps also provide REST APIs. These APIs are suitable for use in openedx-platform and in community-developed Open edX plugins. + +APIs marked "UNSTABLE" are subject to change at any time. All other APIs are considered stable, and any breaking changes will be announced through the community DEPR (deprecation and removal) process. + Motivation ---------- diff --git a/setup.py b/setup.py index d451c1d6a..94e328c82 100755 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ def is_requirement(line): zip_safe=False, keywords='Python edx', classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', 'Framework :: Django', 'Framework :: Django :: 5.2', 'Intended Audience :: Developers', From 219e07faa8bbf41479fa16a276611670b8e447db Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Thu, 23 Apr 2026 17:30:32 -0400 Subject: [PATCH 07/11] docs: Fix links in readme --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index d1bf5b026..40e4b68d9 100644 --- a/README.rst +++ b/README.rst @@ -47,10 +47,10 @@ We have a few different identifier types in the schema, and we try to avoid ``_i See Also ~~~~~~~~ -The structure of this repo follows [OEP-0049](https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html) where possible, and also borrows inspiration from: +The structure of this repo follows `OEP-0049 `_ where possible, and also borrows inspiration from: -* [Scaling Django to 500 apps](https://2021.djangocon.us/talks/scaling-django-to-500-apps/) (Dan Palmer, DjangoCon US 2021) -* [Django structure for scale and longevity](https://www.youtube.com/watch?v=yG3ZdxBb1oo) (Radoslav Georgiev, EuroPython 2018) +* `Scaling Django to 500 apps `_ (Dan Palmer, DjangoCon US 2021) +* `Django structure for scale and longevity `_ (Radoslav Georgiev, EuroPython 2018) Code Overview ------------- From f676202b0198c349e93aa892c14ec5b00e98cd9b Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Mon, 27 Apr 2026 12:09:05 -0400 Subject: [PATCH 08/11] fix: backup_restore __all__ --- src/openedx_content/applets/backup_restore/api.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openedx_content/applets/backup_restore/api.py b/src/openedx_content/applets/backup_restore/api.py index 1f768b0b0..49de268d5 100644 --- a/src/openedx_content/applets/backup_restore/api.py +++ b/src/openedx_content/applets/backup_restore/api.py @@ -9,6 +9,17 @@ from .zipper import LearningPackageUnzipper, LearningPackageZipper +# The public API that will be re-exported by openedx_content.api +# is listed in the __all__ entries below. Internal helper functions that are +# private to this module should start with an underscore. If a function does not +# start with an underscore AND it is not in __all__, that function is considered +# to be callable only by other applets in the openedx_content package. +__all__ = [ + "create_zip_file", + "load_learning_package", +] + + def create_zip_file( package_ref: str, path: str, user: UserType | None = None, origin_server: str | None = None ) -> None: From 1c4c12e104787f372a184268765aa34887c42946 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Mon, 27 Apr 2026 12:10:57 -0400 Subject: [PATCH 09/11] docs: fix __all__ comment since restructure --- src/openedx_content/applets/components/api.py | 2 +- src/openedx_content/applets/containers/api.py | 2 +- src/openedx_content/applets/media/api.py | 2 +- src/openedx_content/applets/publishing/api.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openedx_content/applets/components/api.py b/src/openedx_content/applets/components/api.py index 99a372b93..fc4b1e843 100644 --- a/src/openedx_content/applets/components/api.py +++ b/src/openedx_content/applets/components/api.py @@ -33,7 +33,7 @@ # is listed in the __all__ entries below. Internal helper functions that are # private to this module should start with an underscore. If a function does not # start with an underscore AND it is not in __all__, that function is considered -# to be callable only by other apps in the authoring package. +# to be callable only by other applets in the openedx_content package. __all__ = [ "get_or_create_component_type", "create_component", diff --git a/src/openedx_content/applets/containers/api.py b/src/openedx_content/applets/containers/api.py index ec41e73f7..56f815f23 100644 --- a/src/openedx_content/applets/containers/api.py +++ b/src/openedx_content/applets/containers/api.py @@ -43,7 +43,7 @@ # is listed in the __all__ entries below. Internal helper functions that are # private to this module should start with an underscore. If a function does not # start with an underscore AND it is not in __all__, that function is considered -# to be callable only by other apps in the authoring package. +# to be callable only by other applets in the openedx_content package. __all__ = [ "ContainerSubclass", "ContainerImplementationMissingError", diff --git a/src/openedx_content/applets/media/api.py b/src/openedx_content/applets/media/api.py index f36c71a25..bf67d4cfe 100644 --- a/src/openedx_content/applets/media/api.py +++ b/src/openedx_content/applets/media/api.py @@ -21,7 +21,7 @@ # is listed in the __all__ entries below. Internal helper functions that are # private to this module should start with an underscore. If a function does not # start with an underscore AND it is not in __all__, that function is considered -# to be callable only by other apps in the authoring package. +# to be callable only by other applets in the openedx_content package. __all__ = [ "get_or_create_media_type", "get_media", diff --git a/src/openedx_content/applets/publishing/api.py b/src/openedx_content/applets/publishing/api.py index f3e4f3cb6..13ab6f803 100644 --- a/src/openedx_content/applets/publishing/api.py +++ b/src/openedx_content/applets/publishing/api.py @@ -43,7 +43,7 @@ # is listed in the __all__ entries below. Internal helper functions that are # private to this module should start with an underscore. If a function does not # start with an underscore AND it is not in __all__, that function is considered -# to be callable only by other apps in the authoring package. +# to be callable only by other applets in the openedx_content package. __all__ = [ "get_learning_package", "get_learning_package_by_ref", From 3ca72d5b2b55eedc8676ae381fc7ada8fba2d3d9 Mon Sep 17 00:00:00 2001 From: Kyle D McCormick Date: Wed, 29 Apr 2026 16:05:14 -0400 Subject: [PATCH 10/11] docs: It's all stable --- src/openedx_content/applets/containers/api.py | 17 ----------------- src/openedx_content/applets/publishing/api.py | 4 ---- src/openedx_content/applets/sections/api.py | 2 -- src/openedx_content/applets/subsections/api.py | 2 -- src/openedx_content/applets/units/api.py | 2 -- 5 files changed, 27 deletions(-) diff --git a/src/openedx_content/applets/containers/api.py b/src/openedx_content/applets/containers/api.py index 56f815f23..8398abc47 100644 --- a/src/openedx_content/applets/containers/api.py +++ b/src/openedx_content/applets/containers/api.py @@ -74,7 +74,6 @@ @dataclass(frozen=True) class ContainerEntityListEntry: """ - [ ❓TODO: STABLE or UNSTABLE? ] Data about a single entity in a container, e.g. a component in a unit. """ @@ -143,7 +142,6 @@ def create_container( can_stand_alone: bool = True, ) -> ContainerModel: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create a new container. Args: @@ -183,7 +181,6 @@ def create_container( def create_entity_list() -> EntityList: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create a new entity list. This is an structure that holds a list of entities that will be referenced by the container. @@ -199,7 +196,6 @@ def create_entity_list_with_rows( learning_package_id: LearningPackage.ID | None, ) -> EntityList: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create new entity list rows for an entity list. Args: @@ -305,7 +301,6 @@ def create_container_version( created_by: int | None, ) -> ContainerVersion: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create a new container version. Args: @@ -355,7 +350,6 @@ def create_container_and_version( can_stand_alone: bool = True, ) -> tuple[ContainerModel, ContainerVersionModel]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create a new container and its initial version. Args: learning_package_id: The learning package ID. @@ -470,7 +464,6 @@ def create_next_container_version( force_version_num: int | None = None, ) -> ContainerVersion: """ - [ ❓TODO: STABLE or UNSTABLE? ] Create the next version of a container. A new version of the container is created only when its metadata changes: @@ -543,7 +536,6 @@ def create_next_container_version( def get_container(pk: Container.ID) -> Container: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get a container by its primary key. This returns the Container, not any specific version. It may not be published, or may have been soft deleted. @@ -559,7 +551,6 @@ def get_container(pk: Container.ID) -> Container: def get_container_version(container_version_pk: int) -> ContainerVersion: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get a container version by its primary key. Args: @@ -573,7 +564,6 @@ def get_container_version(container_version_pk: int) -> ContainerVersion: def get_container_by_code(learning_package_id: LearningPackage.ID, /, container_code: str) -> Container: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get a container by its learning package and container code. Args: @@ -639,7 +629,6 @@ def get_containers( include_deleted: bool | None = False, ) -> QuerySet[Container]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get all containers in the given learning package. Args: @@ -667,7 +656,6 @@ def get_entities_in_container( select_related_version: str | None = None, ) -> list[ContainerEntityListEntry]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the current draft or published version of the given container. @@ -726,7 +714,6 @@ def get_entities_in_container_as_of( publish_log_id: int, ) -> tuple[ContainerVersion | None, list[ContainerEntityListEntry]]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the published version of the given container as of the given PublishLog version (which is essentially a version for the entire learning package). @@ -760,7 +747,6 @@ def get_entities_in_container_as_of( def contains_unpublished_changes(container_or_pk: Container | Container.ID, /) -> bool: """ - [ ❓TODO: STABLE or UNSTABLE? ] Check recursively if a container has any unpublished changes. Note: I've preserved the API signature for now, but we probably eventually @@ -813,7 +799,6 @@ def get_containers_with_entity( published=False, ) -> QuerySet[Container]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Find all draft containers that directly contain the given entity. They will always be from the same learning package; cross-package containers @@ -854,7 +839,6 @@ def get_container_children_count( published: bool, ): """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the count of entities in the current draft or published version of the given container. Args: @@ -892,7 +876,6 @@ def get_container_children_entity_refs(container_version: ContainerVersion) -> l def get_descendant_component_entity_ids(container: Container) -> list[int]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Return the entity IDs of all leaf (non-Container) descendants of ``container``. Intermediate containers (e.g. Subsections, Units) are never included in the diff --git a/src/openedx_content/applets/publishing/api.py b/src/openedx_content/applets/publishing/api.py index 13ab6f803..07d0696b4 100644 --- a/src/openedx_content/applets/publishing/api.py +++ b/src/openedx_content/applets/publishing/api.py @@ -621,7 +621,6 @@ def get_entity_draft_history( publishable_entity_or_id: PublishableEntity | int, / ) -> QuerySet[DraftChangeLogRecord]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Return DraftChangeLogRecords for a PublishableEntity since its last publication, ordered from most recent to oldest. @@ -689,7 +688,6 @@ def get_entity_publish_history( publishable_entity_or_id: PublishableEntity | int, / ) -> QuerySet[PublishLogRecord]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Return all PublishLogRecords for a PublishableEntity, ordered most recent first. Edge cases: @@ -724,7 +722,6 @@ def get_entity_publish_history_entries( publish_log_uuid: str, ) -> QuerySet[DraftChangeLogRecord]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Return the DraftChangeLogRecords associated with a specific PublishLog. Finds the PublishLogRecord for the given entity and publish_log_uuid, then @@ -822,7 +819,6 @@ def get_entity_version_contributors( new_version_num: int | None, ) -> QuerySet: """ - [ ❓TODO: STABLE or UNSTABLE? ] Return distinct User queryset of contributors (changed_by) for DraftChangeLogRecords of a PublishableEntity after old_version_num. diff --git a/src/openedx_content/applets/sections/api.py b/src/openedx_content/applets/sections/api.py index 91c6aa058..cdfd36e8b 100644 --- a/src/openedx_content/applets/sections/api.py +++ b/src/openedx_content/applets/sections/api.py @@ -91,7 +91,6 @@ def create_next_section_version( @dataclass(frozen=True) class SectionListEntry: """ - [ ❓TODO: STABLE or UNSTABLE? ] Data about a single subsection in a section. """ @@ -109,7 +108,6 @@ def get_subsections_in_section( published: bool, ) -> list[SectionListEntry]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Section. diff --git a/src/openedx_content/applets/subsections/api.py b/src/openedx_content/applets/subsections/api.py index 2bbcd02cf..e4c24ca36 100644 --- a/src/openedx_content/applets/subsections/api.py +++ b/src/openedx_content/applets/subsections/api.py @@ -91,7 +91,6 @@ def create_next_subsection_version( @dataclass(frozen=True) class SubsectionListEntry: """ - [ ❓TODO: STABLE or UNSTABLE? ] Data about a single unit in a subsection. """ @@ -109,7 +108,6 @@ def get_units_in_subsection( published: bool, ) -> list[SubsectionListEntry]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Subsection. diff --git a/src/openedx_content/applets/units/api.py b/src/openedx_content/applets/units/api.py index 41bcbd20c..0fb55cfe0 100644 --- a/src/openedx_content/applets/units/api.py +++ b/src/openedx_content/applets/units/api.py @@ -91,7 +91,6 @@ def create_next_unit_version( @dataclass(frozen=True) class UnitListEntry: """ - [ ❓TODO: STABLE or UNSTABLE? ] Data about a single entity in a container, e.g. a component in a unit. """ @@ -109,7 +108,6 @@ def get_components_in_unit( published: bool, ) -> list[UnitListEntry]: """ - [ ❓TODO: STABLE or UNSTABLE? ] Get the list of entities and their versions in the draft or published version of the given Unit. From 39e8088fc93e573590eab710de0d3d224555f787 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Thu, 30 Apr 2026 00:09:57 -0400 Subject: [PATCH 11/11] temp: isort fix --- src/openedx_content/applets/backup_restore/api.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/openedx_content/applets/backup_restore/api.py b/src/openedx_content/applets/backup_restore/api.py index 49de268d5..8f880aa7b 100644 --- a/src/openedx_content/applets/backup_restore/api.py +++ b/src/openedx_content/applets/backup_restore/api.py @@ -8,7 +8,6 @@ from ..publishing.api import get_learning_package_by_ref from .zipper import LearningPackageUnzipper, LearningPackageZipper - # The public API that will be re-exported by openedx_content.api # is listed in the __all__ entries below. Internal helper functions that are # private to this module should start with an underscore. If a function does not