edx-cookiecutters #################
This repository holds most of the Open edX public cookiecutters.
Available cookiecutters
cookiecutter-django-ida for creating new independently deployable apps (IDAs).
cookiecutter-django-app for creating reusable Django packages (installable apps).
cookiecutter-python-library for creating a Python package that follows Open edX standards.
cookiecutter-xblock for creating an XBlock repository and a Dockerfile for building and running your XBlock in the xblock-sdk workbench.
Using the cookiecutters
.. code-block:: bash
git clone git@github.com:openedx/edx-cookiecutters.git cd edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters
These instructions assume you have cloned this repository and are currently in its head dir. You will need a virtualenv for running the cookiecutter. You can discard it once the cookiecutter has made your new repo.
.. code-block:: bash
make requirements # from inside edx-cookiecutter repo
# Replace <OUTPUT-DIRECTORY> with the base directory; your new directory will go inside.
# Replace <COOKIECUTTER-NAME> with one of the available cookiecutters documented above.
cookiecutter -o <OUTPUT-DIRECTORY> <COOKIECUTTER-NAME>
README.rst
..github/workflows/upgrade-python-requirements.yml
and add team_reviewers
and the email_address
of the team/person.docs/decisions/0001-purpose-of-this-repo.rst
ADR.Updating cookiecutters
If you find anything that is outdated in the cookiecutters in this repository, please create a PR with updates.
Note: Some of the cookiecutters in this repository use the layered cookiecutter approach. If you are modifying these, please see Local Debugging of the layered cookiecutters
_ section below.
.. _Local Debugging of the layered cookiecutters: #local-debugging-of-the-layered-cookiecutters
.. code-block:: bash
git clone git@github.com:openedx/edx-cookiecutters.git cd edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters
workon edx-cookiecutters
git checkout master git pull
make requirements
make validate
git checkout -b
vim …
pytest ./path/to/new/tests
make validate
git commit … git push
If you are updating above cookiecutters, please see 0003-layered-cookiecutter ADR <./docs/decisions/0003-layered-cookiecutter.rst>
_ and How-to modify layered cookiecutters <./docs/how_tos/modifying_layered_cookiecutter.rst>
_.
To ensure that the layered cookiecutters pull from your local code, instead of GitHub, run cookiecutter like:
.. code-block:: bash
make cookiecutter-<TEMPLATE-NAME>
eg:
.. code-block:: bash
make cookiecutter-django-app
make cookiecutter-django-ida
make cookiecutter-python-library
make cookiecutter-xblock
Decisions
See 0003-layered-cookiecutter ADR <./docs/decisions/0003-layered-cookiecutter.rst>
_ for details on layering cookiecutters to share boilerplate files.
Community
Contributions are very welcome. Tests can be run with tox
_. Please ensure the coverage at least stays the same before you submit a pull request.
The code in this repository is licensed under the Apache Software License 2.0 unless
otherwise noted. Please see LICENSE.txt
_ for details.
Please do not report security issues in public. Please email security@openedx.org.
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 <https://openedx.org/getting-help>
__ page.
.. _Slack invitation: https://openedx.org/slack .. _community Slack workspace: https://openedx.slack.com/ .. _tox: https://tox.readthedocs.io/en/latest/