Skip to content

Commit af3b009

Browse files
committed
build!: Rename the repo and PyPI project to openedx-core
Updates some READMEs, etc. as well. Bumps version to 0.33.0 BREAKING CHANGE: TODO describe re-installation Part of: <TODO link to tickt>
1 parent 269a7e3 commit af3b009

46 files changed

Lines changed: 181 additions & 219 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.

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
#

docs/decisions/0001-purpose-of-this-repo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The code that operates on learning content in Open edX primarily resides in edx-
1212
Decision
1313
--------
1414

15-
The openedx-learning repository was created to provide a new place for certain core learning concepts, data models, and APIs to be implemented. These concepts will be more granular and composable than the courses we have today.
15+
The openedx-core repository was created to provide a new place for certain core learning concepts, data models, and APIs to be implemented. These concepts will be more granular and composable than the courses we have today.
1616

1717
This would have two long term goals:
1818

@@ -24,7 +24,7 @@ This repo will first be piloted with the use case of unit composition in service
2424
Consequences
2525
------------
2626

27-
The edx-platform repo will eventually have openedx-learning as a dependency. As functionality is implemented in openedx-learning (e.g. unit composition for content libraries), edx-platform will make use of it.
27+
The edx-platform repo will eventually have openedx-core as a dependency. As functionality is implemented in openedx-core (e.g. unit composition for content libraries), edx-platform will make use of it.
2828

2929
Over time, plugin apps should be able to make use of stable APIs in this repo instead of having to call into edx-platform's Modulestore or Block Transformers. This will serve as a third leg of the new in-process extension mechanisms, where openedx-events provides event notification, openedx-filters provides the ability to intercept and modify the workflow of existing views, and this repo will allow content querying capability.
3030

docs/decisions/0003-content-extensibility.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Learning Core data models will be built with extensibility in mind, with the fol
3535
#. It will be possible to migrate existing content data over time, as new plugin apps become available.
3636
#. All content and versions of content will have UUIDs to allow for stable references across services.
3737

38-
This layering of related models will add complexity to the data model, but we accept that tradeoff to decouple plugin models from the core application and from other plugins. To make this easier to deal with, openedx-learning should provide abstract models for common use cases, and expose those via a ``models_api.py`` module. This will lower the barrier to entry for developers, and allow us to more easily enforce conventions like setting ``primary_key=True`` with our ``OneToOneField`` relationships.
38+
This layering of related models will add complexity to the data model, but we accept that tradeoff to decouple plugin models from the core application and from other plugins. To make this easier to deal with, openedx-core should provide abstract models for common use cases, and expose those via a ``models_api.py`` module. This will lower the barrier to entry for developers, and allow us to more easily enforce conventions like setting ``primary_key=True`` with our ``OneToOneField`` relationships.
3939

4040
Rejected Alternatives
4141
---------------------

docs/decisions/0007-tagging-app.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Context
55
-------
66

7-
We want the openedx_tagging app to be useful in different Django projects outside of just openedx-learning and edx-platform.
7+
We want the openedx_tagging app to be useful in different Django projects outside of just openedx-core and edx-platform.
88

99

1010
Decisions

docs/decisions/0015-serving-static-assets.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ Both Studio and the LMS need to serve course team authored static assets as part
88

99
This ADR is the synthesis of various ideas that were discussed across a handful of pull requests and issues. These links are provided for extra context, but they are not required to understand this ADR:
1010

11-
* `File uploads + Experimental Media Server #31 <https://github.com/openedx/openedx-learning/pull/31>`_
12-
* `File Uploads + media_server app #33 <https://github.com/openedx/openedx-learning/pull/33>`_
13-
* `Modeling Files and File Dependencies #70 <https://github.com/openedx/openedx-learning/issues/70>`_
14-
* `Serving static assets (disorganized thoughts) #108 <https://github.com/openedx/openedx-learning/issues/108>`_
11+
* `File uploads + Experimental Media Server #31 <https://github.com/openedx/openedx-core/pull/31>`_
12+
* `File Uploads + media_server app #33 <https://github.com/openedx/openedx-core/pull/33>`_
13+
* `Modeling Files and File Dependencies #70 <https://github.com/openedx/openedx-core/issues/70>`_
14+
* `Serving static assets (disorganized thoughts) #108 <https://github.com/openedx/openedx-core/issues/108>`_
1515

1616
Data Storage Implementation
1717
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1818

19-
The underlying data models live in the openedx-learning repo. The most relevant models are:
19+
The underlying data models live in the openedx-core repo. The most relevant models are:
2020

21-
* `Content in contents/models.py <https://github.com/openedx/openedx-learning/blob/main/openedx_learning/core/contents/models.py>`_
22-
* `Component and ComponentVersion in components/models.py <https://github.com/openedx/openedx-learning/blob/main/openedx_learning/core/components/models.py>`_
21+
* `Content in contents/models.py <https://github.com/openedx/openedx-core/blob/main/openedx_learning/core/contents/models.py>`_
22+
* `Component and ComponentVersion in components/models.py <https://github.com/openedx/openedx-core/blob/main/openedx_learning/core/components/models.py>`_
2323

2424
Key takeaways about how this data is stored:
2525

@@ -60,7 +60,7 @@ Security Requirements
6060
**Assets should enforce more granular permissions at the individual Component level.**
6161
An important distinction between ContentStore and v2 Content Library assets is that the latter can be directly associated with a Component. As a long term goal, we should be able to make permissions check on per-Component basis. So if a student does not have permission to view a Component for whatever reason (wrong content group, exam hasn't started, etc.), then they should also not have permission to see static assets associated with that component.
6262

63-
The further implication of this requirement is that *permissions checking must be extensible*. The openedx-learning repo will implement the details of how to serve an asset, but it will not have the necessary models and logic to determine whether it is allowed to.
63+
The further implication of this requirement is that *permissions checking must be extensible*. The openedx-core repo will implement the details of how to serve an asset, but it will not have the necessary models and logic to determine whether it is allowed to.
6464

6565
**Assets must be served from an entirely different domain than the LMS and Studio instances.**
6666
To reduce our chance of maliciously uploaded JavaScript compromising LMS and Studio users, user-uploaded assets must live on an entirely different domain from LMS and Studio (i.e. not just another subdomain). So if our LMS is located at ``sandbox.openedx.org``, the files should be accessed at a URL like ``assets.sandbox.openedx.io``.

0 commit comments

Comments
 (0)