openedx-learning


Nameopenedx-learning JSON
Version 0.9.1 PyPI version JSON
download
home_pagehttps://github.com/openedx/openedx-learning
SummaryAn experiment.
upload_time2024-04-16 16:48:58
maintainerNone
docs_urlNone
authorDavid Ormsbee
requires_python>=3.8
licenseAGPL 3.0
keywords python edx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            openedx-learning
=============================

|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
|license-badge|

This is experimentation/prototyping and not in any way production ready!
------------------------------------------------------------------------

Overview
--------

The Open edX Learning repository holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform.

Motivation
----------

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 edx-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.

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

Architecture
------------

Parts
~~~~~

* ``openedx_learning.lib`` is for shared utilities, and may include things like custom field types, plugin registration code, etc.
* ``openedx_learning.core`` contains our Core Django apps, where foundational data structures and APIs will live.
* ``openedx_tagging.core`` contains the core Tagging app, which provides data structures and apis for tagging Open edX objects.

App Dependencies
~~~~~~~~~~~~~~~~

Anything can import from ``openedx_learning.lib``.

Core apps can import from each other, but cannot import from other apps outside of core. For those apps:

* ``learning_publishing`` has no dependencies. All the other apps depend on it.
* ``learning_composition`` and ``learning_navigation`` both depend on ``learning_partitioning``

Model Conventions
~~~~~~~~~~~~~~~~~

We have a few different identifier types in the schema, and we try to avoid ``_id`` for this because Django uses that convention to reference IDs in other models/tables. So instead we have:

* ``id`` is the auto-generated, internal row ID and primary key. This never changes. Data models should make foreign keys to this field, as per Django convention.
* ``uuid`` is a randomly generated UUID4. This is the stable way to refer to a row/resource from an external service. This never changes. This is separate from ``id`` mostly because there are performance penalties when using UUIDs as primary keys with MySQL.
* ``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.
* ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.


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:

* [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)

Code Overview
-------------

The ``openedx_learning.apps`` package contains all our Django applications. All apps are named with a ``learning_`` prefix to better avoid name conflicts, because Django's app namespace is flat. Apps will adhere to `OEP-0049: Django App Patterns <https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html>`_.

Development Workflow
--------------------

One Time Setup
~~~~~~~~~~~~~~
.. code-block::

  # Clone the repository
  git clone git@github.com:ormsbee/openedx-learning.git
  cd openedx-learning

  # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
  mkvirtualenv -p python3.8 openedx-learning


Every time you develop something in this repo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block::

  # Activate the virtualenv
  workon openedx-learning

  # Grab the latest code
  git checkout master
  git pull

  # Install/update the dev requirements
  make requirements

  # Run the tests and quality checks (to verify the status before you make any changes)
  make validate

  # Make a new branch for your changes
  git checkout -b <your_github_username>/<short_description>

  # Using your favorite editor, edit the code to make your change.
  vim …

  # Run your new tests
  pytest ./path/to/new/tests

  # Run all the tests and quality checks
  make validate

  # Commit all your changes
  git commit …
  git push

  # Open a PR and ask for review.

License
-------

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see `LICENSE.txt <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
-------------------------

Please do not report security issues in public. Please email security@openedx.org.

Help
----

If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.

Our real-time conversations are on Slack. You can request a `Slack invitation`_, then join our `community Slack workspace`_.

For more information about these options, see the `Getting Help`_ page.

.. _Slack invitation: https://openedx.org/slack
.. _community Slack workspace: https://openedx.slack.com/
.. _Getting Help: https://openedx.org/getting-help

.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-learning.svg
    :target: https://pypi.python.org/pypi/openedx-learning/
    :alt: PyPI

.. |ci-badge| image:: https://github.com/openedx/openedx-learning/workflows/Python%20CI/badge.svg?branch=master
    :target: https://github.com/openedx/openedx-learning/actions
    :alt: CI

.. |codecov-badge| image:: https://codecov.io/github/edx/openedx-learning/coverage.svg?branch=master
    :target: https://codecov.io/github/edx/openedx-learning?branch=master
    :alt: Codecov

.. |doc-badge| image:: https://readthedocs.org/projects/openedx-learning/badge/?version=latest
    :target: https://openedx-learning.readthedocs.io/en/latest/
    :alt: Documentation

.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-learning.svg
    :target: https://pypi.python.org/pypi/openedx-learning/
    :alt: Supported Python versions

.. |license-badge| image:: https://img.shields.io/github/license/edx/openedx-learning.svg
    :target: https://github.com/openedx/openedx-learning/blob/master/LICENSE.txt
    :alt: License


Change Log
----------

..
   All enhancements and patches to openedx-learning will be documented
   in this file.  It adheres to the structure of https://keepachangelog.com/ ,
   but in reStructuredText instead of Markdown (for ease of incorporation into
   Sphinx documentation and the PyPI description).

   This project adheres to Semantic Versioning (https://semver.org/).

.. There should always be an "Unreleased" section for changes pending release.

Unreleased
~~~~~~~~~~

* Removed usage of ``tox-battery`` and added support for ``tox 4.0``
* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is
  deprecated.  See https://github.com/openedx/edx-sphinx-theme/issues/184 for
  more details.  

[0.1.0] - 2021-08-08
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Added
_____

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openedx/openedx-learning",
    "name": "openedx-learning",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Python edx",
    "author": "David Ormsbee",
    "author_email": "dave@tcril.org",
    "download_url": "https://files.pythonhosted.org/packages/5a/62/a05f5caf94086f4906ba099e5892404300fe752d6722e7e5be6efa07363a/openedx_learning-0.9.1.tar.gz",
    "platform": null,
    "description": "openedx-learning\n=============================\n\n|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|\n|license-badge|\n\nThis is experimentation/prototyping and not in any way production ready!\n------------------------------------------------------------------------\n\nOverview\n--------\n\nThe Open edX Learning repository holds Django apps that represent core learning concepts and data models that have been extracted from edx-platform.\n\nMotivation\n----------\n\nThe short term goal of this project is to create a small, extensible core that is easier to reason about and write extensions for than edx-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.\n\nReplacing edx-platform is explicitly *not* a goal of this project, as only a small fraction of the concepts in edx-platform make sense to carry over here. When these core concepts are extracted and the data migrated, edx-platform will import apps from this repo and make use of their public in-process APIs.\n\nArchitecture\n------------\n\nParts\n~~~~~\n\n* ``openedx_learning.lib`` is for shared utilities, and may include things like custom field types, plugin registration code, etc.\n* ``openedx_learning.core`` contains our Core Django apps, where foundational data structures and APIs will live.\n* ``openedx_tagging.core`` contains the core Tagging app, which provides data structures and apis for tagging Open edX objects.\n\nApp Dependencies\n~~~~~~~~~~~~~~~~\n\nAnything can import from ``openedx_learning.lib``.\n\nCore apps can import from each other, but cannot import from other apps outside of core. For those apps:\n\n* ``learning_publishing`` has no dependencies. All the other apps depend on it.\n* ``learning_composition`` and ``learning_navigation`` both depend on ``learning_partitioning``\n\nModel Conventions\n~~~~~~~~~~~~~~~~~\n\nWe have a few different identifier types in the schema, and we try to avoid ``_id`` for this because Django uses that convention to reference IDs in other models/tables. So instead we have:\n\n* ``id`` is the auto-generated, internal row ID and primary key. This never changes. Data models should make foreign keys to this field, as per Django convention.\n* ``uuid`` is a randomly generated UUID4. This is the stable way to refer to a row/resource from an external service. This never changes. This is separate from ``id`` mostly because there are performance penalties when using UUIDs as primary keys with MySQL.\n* ``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.\n* ``num`` is like ``key``, but for use when it's strictly numeric. It can also be used as a suffix.\n\n\nSee Also\n~~~~~~~~\n\nThe 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:\n\n* [Scaling Django to 500 apps](https://2021.djangocon.us/talks/scaling-django-to-500-apps/) (Dan Palmer, DjangoCon US 2021)\n* [Django structure for scale and longevity](https://www.youtube.com/watch?v=yG3ZdxBb1oo) (Radoslav Georgiev, EuroPython 2018)\n\nCode Overview\n-------------\n\nThe ``openedx_learning.apps`` package contains all our Django applications. All apps are named with a ``learning_`` prefix to better avoid name conflicts, because Django's app namespace is flat. Apps will adhere to `OEP-0049: Django App Patterns <https://open-edx-proposals.readthedocs.io/en/latest/architectural-decisions/oep-0049-django-app-patterns.html>`_.\n\nDevelopment Workflow\n--------------------\n\nOne Time Setup\n~~~~~~~~~~~~~~\n.. code-block::\n\n  # Clone the repository\n  git clone git@github.com:ormsbee/openedx-learning.git\n  cd openedx-learning\n\n  # Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it\n  mkvirtualenv -p python3.8 openedx-learning\n\n\nEvery time you develop something in this repo\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block::\n\n  # Activate the virtualenv\n  workon openedx-learning\n\n  # Grab the latest code\n  git checkout master\n  git pull\n\n  # Install/update the dev requirements\n  make requirements\n\n  # Run the tests and quality checks (to verify the status before you make any changes)\n  make validate\n\n  # Make a new branch for your changes\n  git checkout -b <your_github_username>/<short_description>\n\n  # Using your favorite editor, edit the code to make your change.\n  vim \u2026\n\n  # Run your new tests\n  pytest ./path/to/new/tests\n\n  # Run all the tests and quality checks\n  make validate\n\n  # Commit all your changes\n  git commit \u2026\n  git push\n\n  # Open a PR and ask for review.\n\nLicense\n-------\n\nThe code in this repository is licensed under the AGPL 3.0 unless otherwise noted.\n\nPlease see `LICENSE.txt <LICENSE.txt>`_ for details.\n\nHow To Contribute\n-----------------\n\nThis 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.\n\nReporting Security Issues\n-------------------------\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\nHelp\n----\n\nIf you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.\n\nOur real-time conversations are on Slack. You can request a `Slack invitation`_, then join our `community Slack workspace`_.\n\nFor more information about these options, see the `Getting Help`_ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n.. _Getting Help: https://openedx.org/getting-help\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/openedx-learning.svg\n    :target: https://pypi.python.org/pypi/openedx-learning/\n    :alt: PyPI\n\n.. |ci-badge| image:: https://github.com/openedx/openedx-learning/workflows/Python%20CI/badge.svg?branch=master\n    :target: https://github.com/openedx/openedx-learning/actions\n    :alt: CI\n\n.. |codecov-badge| image:: https://codecov.io/github/edx/openedx-learning/coverage.svg?branch=master\n    :target: https://codecov.io/github/edx/openedx-learning?branch=master\n    :alt: Codecov\n\n.. |doc-badge| image:: https://readthedocs.org/projects/openedx-learning/badge/?version=latest\n    :target: https://openedx-learning.readthedocs.io/en/latest/\n    :alt: Documentation\n\n.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/openedx-learning.svg\n    :target: https://pypi.python.org/pypi/openedx-learning/\n    :alt: Supported Python versions\n\n.. |license-badge| image:: https://img.shields.io/github/license/edx/openedx-learning.svg\n    :target: https://github.com/openedx/openedx-learning/blob/master/LICENSE.txt\n    :alt: License\n\n\nChange Log\n----------\n\n..\n   All enhancements and patches to openedx-learning will be documented\n   in this file.  It adheres to the structure of https://keepachangelog.com/ ,\n   but in reStructuredText instead of Markdown (for ease of incorporation into\n   Sphinx documentation and the PyPI description).\n\n   This project adheres to Semantic Versioning (https://semver.org/).\n\n.. There should always be an \"Unreleased\" section for changes pending release.\n\nUnreleased\n~~~~~~~~~~\n\n* Removed usage of ``tox-battery`` and added support for ``tox 4.0``\n* Switch from ``edx-sphinx-theme`` to ``sphinx-book-theme`` since the former is\n  deprecated.  See https://github.com/openedx/edx-sphinx-theme/issues/184 for\n  more details.  \n\n[0.1.0] - 2021-08-08\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAdded\n_____\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "AGPL 3.0",
    "summary": "An experiment.",
    "version": "0.9.1",
    "project_urls": {
        "Homepage": "https://github.com/openedx/openedx-learning"
    },
    "split_keywords": [
        "python",
        "edx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1583d4c4bf2a63e7299d4ea65895f48ffba33875f6c0c5878ac9666c0ba79ce4",
                "md5": "3542d854fd89648722989426ad67480e",
                "sha256": "2ab558e0a7d860c893122bd9155e34964307edd61e88e72b8563dc86fc8fcf3d"
            },
            "downloads": -1,
            "filename": "openedx_learning-0.9.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3542d854fd89648722989426ad67480e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 144241,
            "upload_time": "2024-04-16T16:48:56",
            "upload_time_iso_8601": "2024-04-16T16:48:56.384964Z",
            "url": "https://files.pythonhosted.org/packages/15/83/d4c4bf2a63e7299d4ea65895f48ffba33875f6c0c5878ac9666c0ba79ce4/openedx_learning-0.9.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a62a05f5caf94086f4906ba099e5892404300fe752d6722e7e5be6efa07363a",
                "md5": "231ba3f804aa5bd1e30302ced41be0b4",
                "sha256": "6209e2b060a289e9fb1930a720722b2f9d1eaa289e4e7502b104db2bdf3db1a8"
            },
            "downloads": -1,
            "filename": "openedx_learning-0.9.1.tar.gz",
            "has_sig": false,
            "md5_digest": "231ba3f804aa5bd1e30302ced41be0b4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 113757,
            "upload_time": "2024-04-16T16:48:58",
            "upload_time_iso_8601": "2024-04-16T16:48:58.001175Z",
            "url": "https://files.pythonhosted.org/packages/5a/62/a05f5caf94086f4906ba099e5892404300fe752d6722e7e5be6efa07363a/openedx_learning-0.9.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-16 16:48:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openedx",
    "github_project": "openedx-learning",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "openedx-learning"
}
        
Elapsed time: 0.24381s