An open edx plugin that implements customizations for deployment to Kubernetes
Project description
Cookiecutter Open edX Plugin
An Open edX Plugin that implements customizations for deployment to Kubernetes. Implements the following:
- Hooks for openedx Django Signals for 'user_logged_in', 'user_logged_out', 'register_user', 'course_enrollment_created', 'certificate_created' and more. Demonstrates both the legacy, and the newer methodology for subscribing to and listening for the signals.
- Scaffolding for waffle flag setup, including Django model initializations. These are currently only used to enable Django Signals.
- A custom badges backend that is compatible with django-storages backend for Amazon S3
Getting Started
Install using Tutor
See Installing extra xblocks and requirements
tutor config save # to ensure that tutor's root folder system has been created
# OPTION 1: install as a PyPi package
echo "cookiecutter-openedx-plugin>=0.1.3" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"
# OPTION 2: install as an editable requirement
echo "-e git+https://github.com/cookiecutter-openedx/cookiecutter-openedx-plugin.git" >> "$(tutor config printroot)/env/build/openedx/requirements/private.txt"
cat "$(tutor config printroot)/env/build/openedx/requirements/private.txt"
tutor images build openedx
tutor local quickstart
Install using Cookiecutter Github Actions Workflow
Add the following to your Cookiecutter Github Actions Build workflow
- name: Add cookiecutter-openedx-plugin
uses: openedx-actions/tutor-plugin-build-openedx-add-requirement
with:
pip-package: cookiecutter-openedx-plugin
pip-package-version: "0.1.3"
Documentation
Documentation is available here: Documentation
Support
To get community support, go to the official Open edX discussion forum: https://discuss.openedx.org.
Contributing
We welcome contributions! cookiecutter-openedx-plugin is part of the cookiecutter-openedx project. Pull requests are welcome in all repos belonging to this organization. You can also contact Lawrence McDaniel directly.
Getting Started With Local development
- Use the same virtual environment that you use for edx-platform
- Ensure that your Python interpreter to 3.8x
- install black: https://pypi.org/project/black/
- install flake8: https://flake8.pycqa.org/en/latest/
- install flake8-coding: https://pypi.org/project/flake8-coding/
# Run these from within your edx-platform virtual environment
python3 -m venv venv
source venv/bin/activate
cd /path/to/edx-platform
pip install -r requirements/edx/base.txt
pip install -r requirements/edx/coverage.txt
pip install -r requirements/edx/development.txt
pip install -r requirements/edx/pip-tools.txt
pip install -r requirements/edx/testing.txt
pip install -r requirements/edx/doc.txt
pip install -r requirements/edx/paver.txt
pip install pre-commit black flake8
pre-commit install
Local development good practices
- run
black
on modified code before committing. - run
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- run
pre-commit run --all-files
before pushing. see: https://pre-commit.com/
edx-platform dependencies
To avoid freaky version conflicts in prod it's a good idea to install all of the edx-platform requirements to your local dev virtual environment.
- requirements/edx/base.txt
- requirements/edx/develop.txt,
- requirements/edx/testing.txt
At a minimum this will give you the full benefit of your IDE's linter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cookiecutter-openedx-plugin-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1e84ee99b3d6759b258ec6907e844ed6e061986c488d55478f4a3a0baa52963 |
|
MD5 | 351f7659eb3dfc61f34b73d04124df6b |
|
BLAKE2b-256 | c983b26e9d01b4ee7949682638f706b40e61a9a9963a330ea754fe8fd7ded745 |
Hashes for cookiecutter_openedx_plugin-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55ad6d5fc7c8fc93da5f97e5368869e35f5322bc93994f311986a5cb2ce7cb55 |
|
MD5 | 088e525150eb97634677b554dd578b1a |
|
BLAKE2b-256 | aa0c8c346d06865d0e3a4a3c57aec4d0e0dfbc0a625d6a09762be6f6dc3b5356 |