Skip to content

Commit 8f61d77

Browse files
committed
build!: Rename the PyPI project to openedx-core
To represent the increasing scope of this repository, we are renaming it from openedx-learning to openedx-core. Practically, this commit: * Updates GitHub hyperlinks in this repo from openedx/openedx-learning -> openedx/openedx-core * Publishes a new PyPI project called openedx-core, version starting at 0.34 * Publishes a final PyPI release of openedx-learning, versioned 0.33, which is empty and just installs openedx-core as a dependency * Updates "Learning Core" to "Open edX Core" in various docs and comments * Updates various docs and comments to represent the project's new scope. BREAKING CHANGE: openedx-learning==0.33.0 will be the final release of openedx-learning. It will transitively install openedx-core==0.34.0 (fully code-compatible) and not receive updates going forward. In order to receive updates, operators should install openedx-core instead. Part of: #470
1 parent ccaf8fd commit 8f61d77

43 files changed

Lines changed: 226 additions & 207 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.

.github/workflows/pypi-publish.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,28 @@ jobs:
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__
3030
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
31+
32+
# TEMPORARY: Build and publish the transitional openedx-learning shell package.
33+
# TODO: Remove after the transition is complete.
34+
# See https://github.com/openedx/openedx-learning/issues/470
35+
36+
- name: Build shell package (openedx-learning)
37+
run: |
38+
cd tmp-openedx-learning
39+
python setup.py sdist bdist_wheel
40+
cd ..
41+
42+
- name: Publish openedx-learning shell to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
user: __token__
46+
password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
47+
packages-dir: tmp-openedx-learning/dist/

CHANGELOG.rst

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ selfcheck: ## check that the Makefile is well-formed
8181

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

8686
extract_translations: ## extract strings to be translated, outputting .mo files
8787
rm -rf docs/_build

README.rst

Lines changed: 27 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
Open edX Learning Core (and Tagging)
2-
====================================
1+
Open edX Core: Foundational Packages for a Teaching & Learning Platform
2+
=======================================================================
33

44
|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
55
|license-badge|
66

77
Overview
88
--------
99

10-
The ``openedx-learning`` project holds Django apps that represent core learning platform concepts.
10+
*Formerly known as "Learning Core" or "openedx-learning".*
11+
12+
The ``openedx-core`` project holds Django apps which represent core teaching & learning platform concepts.
13+
14+
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.
1115

1216
Motivation
1317
----------
1418

15-
The short term goal of this project is to create a small, extensible core that is easier to reason about and write extensions for than openedx-platform. The longer term goal is to create a more nimble core learning platform, enabling rapid experimentation and drastic changes to the learner experience that are difficult to implement with Open edX today.
19+
The short term goal of this project is to create a small, extensible core that is easier to reason about and write extensions for than ``openedx-platform``. The longer term goal is to create a more nimble core learning platform, enabling rapid experimentation and drastic changes to the learner experience that are difficult to implement with Open edX today.
1620

17-
Replacing openedx-platform is explicitly *not* a goal of this project, as only a small fraction of the concepts in openedx-platform make sense to carry over here. When these core concepts are extracted and the data migrated, openedx-platform will import apps from this repo and make use of their public in-process APIs.
21+
Replacing ``openedx-platform`` is explicitly *not* a goal of this project, as only a small fraction of the concepts in openedx-platform make sense to carry over here. When these core concepts are extracted and the data migrated, openedx-platform will import apps from this repo and make use of their public in-process APIs.
1822

1923
Architecture
2024
------------
2125

22-
Learning Core Package Dependencies
26+
Open edX Core Package Dependencies
2327
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2428

25-
Learning Core code should never import from ``openedx-platform``.
29+
Open edX Core code should never import from ``openedx-platform``.
2630

2731
We want to be very strict about dependency management internally as well. Please read the `.importlinter config file <.importlinter>`_ file and the `Python API Conventions ADR <docs/decisions/0016-python-public-api-conventions>`_ for more details.
2832

@@ -37,7 +41,6 @@ We have a few different identifier types in the schema, and we try to avoid ``_i
3741
* ``key`` is intended to be a case-sensitive, alphanumeric key, which holds some meaning to library clients. This is usually stable, but can be changed, depending on the business logic of the client. The apps in this repo should make no assumptions about it being stable. It can be used as a suffix. Since ``key`` is a reserved name on certain database systems, the database field is ``_key``.
3842
* ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.
3943

40-
4144
See Also
4245
~~~~~~~~
4346

@@ -49,66 +52,10 @@ The structure of this repo follows [OEP-0049](https://open-edx-proposals.readthe
4952
Code Overview
5053
-------------
5154

52-
The ``src`` folder contains all our Django applications.
53-
54-
Development Workflow
55-
--------------------
56-
57-
One Time Setup
58-
~~~~~~~~~~~~~~
59-
.. code-block::
60-
61-
# Clone the repository
62-
git clone git@github.com:ormsbee/openedx-learning.git
63-
cd openedx-learning
64-
65-
# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
66-
mkvirtualenv -p python3.11 openedx-learning
67-
68-
69-
Every time you develop something in this repo
70-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71-
.. code-block::
72-
73-
# Activate the virtualenv
74-
workon openedx-learning
75-
76-
# Grab the latest code
77-
git checkout master
78-
git pull
79-
80-
# Install/update the dev requirements
81-
make requirements
82-
83-
# Run the tests and quality checks (to verify the status before you make any changes)
84-
make validate
85-
86-
# Make a new branch for your changes
87-
git checkout -b <your_github_username>/<short_description>
88-
89-
# Using your favorite editor, edit the code to make your change.
90-
vim …
91-
92-
# Run your new tests
93-
pytest ./path/to/new/tests
94-
95-
# Run all the tests and quality checks
96-
make validate
97-
98-
# Commit all your changes
99-
git commit …
100-
git push
101-
102-
# Open a PR and ask for review.
103-
104-
Configuring Visual Studio Code
105-
------------------------------
106-
107-
If you are using VS Code as your editor, you can enable the Testing bar by copying from the example configuration provided in the ``.vscode`` directory::
108-
109-
cd .vscode/
110-
cp launch.json.example launch.json
111-
cp settings.json.example settings.json
55+
* ``./src/``: All published code. Packages are importable relative to this directory (e.g., ``import openedx_content``). See ``readme.rst`` in each sub-folder.
56+
* ``./tests/``: Unit tests (not published).
57+
* ``./test_utils/``: Internal helpers for unit tests (not published).
58+
* ``./olx_importer/``: Internal utility for importing data for development (not published).
11259

11360
License
11461
-------
@@ -140,26 +87,26 @@ For more information about these options, see the `Getting Help`_ page.
14087
.. _community Slack workspace: https://openedx.slack.com/
14188
.. _Getting Help: https://openedx.org/getting-help
14289

143-
.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-learning.svg
144-
:target: https://pypi.python.org/pypi/openedx-learning/
90+
.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-core.svg
91+
:target: https://pypi.python.org/pypi/openedx-core/
14592
:alt: PyPI
14693

147-
.. |ci-badge| image:: https://github.com/openedx/openedx-learning/workflows/Python%20CI/badge.svg?branch=master
148-
:target: https://github.com/openedx/openedx-learning/actions
94+
.. |ci-badge| image:: https://github.com/openedx/openedx-core/workflows/Python%20CI/badge.svg?branch=master
95+
:target: https://github.com/openedx/openedx-core/actions
14996
:alt: CI
15097

151-
.. |codecov-badge| image:: https://codecov.io/github/edx/openedx-learning/coverage.svg?branch=master
152-
:target: https://codecov.io/github/edx/openedx-learning?branch=master
98+
.. |codecov-badge| image:: https://codecov.io/github/edx/openedx-core/coverage.svg?branch=master
99+
:target: https://codecov.io/github/edx/openedx-core?branch=master
153100
:alt: Codecov
154101

155-
.. |doc-badge| image:: https://readthedocs.org/projects/openedx-learning/badge/?version=latest
156-
:target: https://openedx-learning.readthedocs.io/en/latest/
102+
.. |doc-badge| image:: https://readthedocs.org/projects/openedx-core/badge/?version=latest
103+
:target: https://openedx-core.readthedocs.io/en/latest/
157104
:alt: Documentation
158105

159-
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-learning.svg
160-
:target: https://pypi.python.org/pypi/openedx-learning/
106+
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-core.svg
107+
:target: https://pypi.python.org/pypi/openedx-core/
161108
:alt: Supported Python versions
162109

163-
.. |license-badge| image:: https://img.shields.io/github/license/edx/openedx-learning.svg
164-
:target: https://github.com/openedx/openedx-learning/blob/master/LICENSE.txt
110+
.. |license-badge| image:: https://img.shields.io/github/license/edx/openedx-core.svg
111+
:target: https://github.com/openedx/openedx-core/blob/master/LICENSE.txt
165112
:alt: License

catalog-info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: backstage.io/v1alpha1
22
kind: Component
33
metadata:
4-
name: openedx-learning
4+
name: openedx-core
55
spec:
66
type: other
77
lifecycle: unknown

docs/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ qthelp:
9696
@echo
9797
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
9898
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
99-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openedx-learning.qhcp"
99+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/openedx-core.qhcp"
100100
@echo "To view the help file:"
101-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openedx-learning.qhc"
101+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/openedx-core.qhc"
102102

103103
.PHONY: applehelp
104104
applehelp:
@@ -115,8 +115,8 @@ devhelp:
115115
@echo
116116
@echo "Build finished."
117117
@echo "To view the help file:"
118-
@echo "# mkdir -p $$HOME/.local/share/devhelp/openedx-learning"
119-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openedx-learning"
118+
@echo "# mkdir -p $$HOME/.local/share/devhelp/openedx-core"
119+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/openedx-core"
120120
@echo "# devhelp"
121121

122122
.PHONY: epub

docs/conf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pylint: disable=invalid-name
22
"""
3-
openedx-learning documentation build configuration file.
3+
openedx-core documentation build configuration file.
44
55
This file is execfile()d with the current directory set to its
66
containing dir.
@@ -89,10 +89,10 @@ def get_version(*file_paths):
8989
top_level_doc = 'index'
9090

9191
# General information about the project.
92-
project = 'openedx-learning'
93-
copyright = f'{datetime.now().year}, edX Inc.' # pylint: disable=redefined-builtin
94-
author = 'edX Inc.'
95-
project_title = 'Open edX Learning Core'
92+
project = 'openedx-core'
93+
copyright = f'{datetime.now().year}, Axim Collaborative, Inc.' # pylint: disable=redefined-builtin
94+
author = 'Axim Collaborative, Inc.'
95+
project_title = 'Open edX Core'
9696
documentation_title = f"{project_title}"
9797

9898
# The version info for the project you're documenting, acts as replacement for
@@ -169,7 +169,7 @@ def get_version(*file_paths):
169169
# documentation.
170170
#
171171
html_theme_options = {
172-
"repository_url": "https://github.com/openedx/openedx-learning",
172+
"repository_url": "https://github.com/openedx/openedx-core",
173173
"repository_branch": "main",
174174
"path_to_docs": "docs/",
175175
"home_page_in_toc": True,
@@ -206,7 +206,7 @@ def get_version(*file_paths):
206206
# The name for this set of Sphinx documents.
207207
# "<project> v<release> documentation" by default.
208208
#
209-
# html_title = 'openedx-learning v0.1.0'
209+
# html_title = 'openedx-core v0.1.0'
210210

211211
# A shorter title for the navigation bar. Default is the same as html_title.
212212
#
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
21. Learning Core is now Open edX Core
2+
======================================
3+
4+
Context
5+
-------
6+
7+
When this repo was created, it was intended to only encompass learning concepts. The content models were supposed to be read-optimized LMS-friendly representations of learning content. It was imagined that the authoring models would live elsewhere (e.g. Blockstore). That's why this was called "Learning Core".
8+
9+
Over time, we realized that we actually needed to start by developing write-optimized CMS-friendly models, many of which are ideal to be also be used in LMS. We ended up with an "Authoring API" which powered the Studio-only Content Libraries feature.
10+
11+
Now, we are working on CBE, Pathways, and Catalog-realted features in this repo. There's also still a Tagging API in this repo. So, the scope of Learning Core has increased, although it still makes sense to develop these important foundational, stable packages together in one core repository.
12+
13+
Decision
14+
--------
15+
16+
The Learning Core is now the Open edX Core. The openedx-learning repository is now openedx-core, as is the installable PyPI project. It's a place to put foundational teaching and learning models and stable APIs. It is **not** a place to put code that is periphery, highly feature-specific, or lacking a path towards stability.
17+
18+
The Open edX Core will consist of several Django apps, each implementing a cohesive yet significant platform concern. Each app should expose a Python API (at ``.api``) and a models API (ideally at ``.models_api``), and optionally a REST API (at ``.rest_api``). We'll use importlinter to enforce boundaries between the apps. In the future, if we move to uv, we may manage these as `uv workspaces <https://docs.astral.sh/uv/concepts/projects/workspaces/>`_.
19+
20+
We will initially have two top-level Django applications:
21+
22+
* ``openedx_content``
23+
* ``openedx_tagging``
24+
25+
We expect it to grow a few more top-level Django applications, including:
26+
27+
* ``openedx_learning`` (learner-facing models, similar to the original intent of Learning Core).
28+
* ``openedx_catalog`` (CourseRun, etc.)
29+
* ``openedx_cbe`` (Models related to pathways, credential-based education. Still in discussion).
30+
31+
Long term, we are open to more stable, core APIs moving in, such as:
32+
33+
* ``openedx_events``
34+
* ``openedx_filters``
35+
* ``openedx_authz``
36+
* ``openedx_keys`` (renamed from ``opaque_keys``)
37+
38+
There are dependencies between these apps we'd want to keep in mind. For example, we wouldn't want to move in ``openedx_keys`` without moving in ``openedx_authz`` first, otherwise we'd create a cyclical dependency between ``openex-authz`` and ``openedx-core``.
39+
40+
By keeping each app as a top-level package and by using importlinter, we leave the door open for packages to be removed later. For example, if it becomes cumbersome to maintain ``openedx_catalog`` alongside the other core apps, then it should be possible to extract it into a separate ``openedx-catalog`` repo without breaking any external instances of ``from openedx_catalog import ...``.
41+
42+
Consequences
43+
------------
44+
45+
We'll implement this change immediately as detailed in https://github.com/openedx/openedx-core/issues/470
46+
47+
Rejected alternatives
48+
---------------------
49+
50+
* Separate repos for ``openedx-content``, ``openedx-cbe``, etc.
51+
52+
* Axim is making a conscious effort to slow the proliferation of new repos, as it has been challenging to maintain consistent standards, tooling, and upgrades across all of them. If there is not a strong reason to separate repos, then we would prefer to start off with a single repo.
53+
54+
* A combined top level Python package with nested apps: ``openedx_core.content.api``, ``openedx_core.cbe.api``, etc.
55+
56+
* This would make it harder to split apps out into separate repos later, because it would involve either (a) updating all the import statements or (b) having the ``openedx_core`` namespace split across multiple repos. We'd like to remain flexible with code reorganization given the fast-moving and experimental nature of these projects.

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
.. openedx-learning documentation top level file, created by
1+
.. openedx-core documentation top level file, created by
22
sphinx-quickstart on Sun Aug 08 00:18:04 2021.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Open edX Learning Core
7-
======================
6+
Open edX Core
7+
=============
88

99
The boring, foundational bits of a learning platform that are hard to get right at scale. Currently being developed for content storage.
1010

docs/make.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ if "%1" == "qthelp" (
129129
echo.
130130
echo.Build finished; now you can run "qcollectiongenerator" with the ^
131131
.qhcp project file in %BUILDDIR%/qthelp, like this:
132-
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\openedx-learning.qhcp
132+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\openedx-core.qhcp
133133
echo.To view the help file:
134-
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\openedx-learning.ghc
134+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\openedx-core.ghc
135135
goto end
136136
)
137137

0 commit comments

Comments
 (0)