Files
Braden MacDonald 3fa779479e
Some checks failed
Pylint Checks / pylint xmodule (push) Has been cancelled
Quality checks / Quality Others (20, ubuntu-24.04, 3.11) (push) Has been cancelled
Semgrep code quality / Semgrep analysis (ubuntu-latest, 3.11) (push) Has been cancelled
ShellCheck / shellcheck (ubuntu) (push) Has been cancelled
static assets check for lms and cms / static-assets-check (7.0, 20, 10.7.x, ubuntu-24.04, 3.11) (push) Has been cancelled
unit-tests / xmodule-with-cms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / xmodule-with-lms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / cms-1(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / cms-2(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / common-with-cms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / common-with-lms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-1(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-2(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-3(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-4(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-5(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-6(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-1-with-cms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-1-with-lms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-2-with-cms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-2-with-lms(py=3.11,dj=pinned,mongo=7.0) (push) Has been cancelled
ShellCheck / shellcheck (macos) (push) Has been cancelled
Javascript tests / JS (20, ubuntu-latest, 3.11) (push) Has been cancelled
Pylint Checks / pylint cms (push) Has been cancelled
Lint Python Imports / Lint Python Imports (push) Has been cancelled
Lockfile Version check / version-check (push) Has been cancelled
Check Django Migrations / check migrations (pinned, 7, 8, ubuntu-24.04, 3.11) (push) Has been cancelled
Pylint Checks / pylint common (push) Has been cancelled
units-test-scripts-common / test (3.12) (push) Has been cancelled
units-test-scripts-user-retirement / test (3.12) (push) Has been cancelled
Verify Dunder __init__.py Files / Verify __init__.py Files (push) Has been cancelled
Pylint Checks / pylint lms-1 (push) Has been cancelled
Pylint Checks / pylint lms-2 (push) Has been cancelled
Pylint Checks / pylint openedx-1 (push) Has been cancelled
Pylint Checks / pylint openedx-2 (push) Has been cancelled
unit-tests / cms-1(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / cms-2(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / common-with-cms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / common-with-lms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-1(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-2(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-3(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-4(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-5(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / lms-6(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-1-with-cms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-1-with-lms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-2-with-cms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / openedx-2-with-lms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / xmodule-with-cms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / xmodule-with-lms(py=3.12,dj=pinned,mongo=7.0) (push) Has been cancelled
unit-tests / collect-and-verify (push) Has been cancelled
Pylint Checks / Pylint checks successful (push) Has been cancelled
Check Django Migrations / Migrations checks successful (push) Has been cancelled
unit-tests / Unit tests successful (push) Has been cancelled
unit-tests / compile-warnings-report (push) Has been cancelled
unit-tests / merge-artifacts (push) Has been cancelled
unit-tests / coverage (3.11) (push) Has been cancelled
feat: update openedx-core: new catalog models + backfill migration (#38023)
* feat: use new version of openedx-core
* feat: Use openedx_catalog app, backfill it with all known courses
* feat: properly set "created" timestamp on course runs during backfill
* fix: better normalization of language codes
* feat: keep courses in sync with CourseRun/CatalogCourse
* feat: delete CourseRun/CatalogCourse when deleting a course
* refactor: course_id -> course_key, run -> run_code, display_name -> title
* fix: don't use SplitModulestoreCourseIndex for getting list of all courses
2026-03-09 17:24:02 -07:00
..
2026-03-02 20:02:10 -05:00
2018-04-13 14:10:40 -04:00
2026-03-02 20:02:10 -05:00

Requirements/dependencies
#########################

These directories specify the Python (and system) dependencies for the LMS and Studio.

- ``edx`` contains the normal Python requirements files
- ``edx-sandbox`` contains the requirements files for Codejail
- ``constraints.txt`` is shared between the two

(In a normal `OEP-18`_-compliant repository, the ``*.in`` and ``*.txt`` files would be
directly in the requirements directory.)

.. _OEP-18: https://github.com/openedx/open-edx-proposals/blob/master/oeps/oep-0018-bp-python-dependencies.rst

While the ``*.in`` files are intended to be updated manually, the ``*.txt`` files should only be manipulated using Makefile targets in a Linux environment (to match our build and deploy systems). For developers on Mac, this can be achieved by using the GitHub workflows or by running Make targets from inside devstack's lms-shell or another Linux environment.

If you don't have write permissions to openedx/edx-platform, you'll need to run these workflows on a fork.

Workflows and Makefile targets
******************************

Add a dependency
================

To add a Python dependency, specify it in the appropriate ``requirements/edx/*.in`` file, push that up to a branch, and then use the `compile-python-requirements.yml workflow <https://github.com/openedx/edx-platform/actions/workflows/compile-python-requirements.yml>`_ to run ``make compile-requirements`` against your branch. This will ensure the lockfiles are updated with any transitive dependencies and will ping you on a PR for updating your branch.

Upgrade just one dependency
===========================

Want to upgrade just *one* dependency without pulling in other upgrades? You can `run the upgrade-one-python-dependency.yml workflow <https://github.com/openedx/edx-platform/actions/workflows/upgrade-one-python-dependency.yml>`_ to have a pull request made against a branch of your choice.

Or, if you need to do it locally, you can use the ``upgrade-package`` make target directly. For example, you could run ``make upgrade-package package=ecommerce``.

If your dependency is pinned in constraints.txt, you'll need to enter an explicit version number in the appropriate field when running the workflow; this will include an update to the constraint file in the resulting PR.

Downgrade a dependency
======================

If you instead need to surgically *downgrade* a dependency:

1. Add an exact-match or max-version constraint to ``constraints.txt`` with a comment explaining why (and ideally a ticket or issue link). Here's what it might look like::

     # frobulator 2.x has breaking API changes; see https://github.com/openedx/edx-platform/issue/1234567 for fixing it
     frobulator<2.0.0

2. After pushing that up to a branch, use the `compile-python-requirements.yml workflow <https://github.com/openedx/edx-platform/actions/workflows/compile-python-requirements.yml>`_ to run ``make compile-requirements`` against your branch.

Upgrade all dependencies
========================

 You can use the `upgrade-requirements Github Workflow <https://github.com/openedx/edx-platform/actions/workflows/upgrade-python-requirements.yml>`_ to make a PR that upgrades as many packages as possible to newer versions. This is a wrapper around ``make upgrade`` and is run on a schedule to keep dependencies up to date.

Inconsistent dependencies
*************************

You might be directed to this section if a PR check for consistent dependencies has failed.

Did you run ``make upgrade`` or ``make compile-requirements`` on a Mac directly?
================================================================================

Some packages have different dependencies on Mac vs. Linux. Usually this is not relevant in production (they generally have to do with desktop integrations of developer tools) but this does cause "churn" and make it harder to review PRs when dependencies are alternatingly recompiled on Mac and Linux. As edx-platform runs on Linux, we want to ensure that dependencies are compiled for that platform.

Solutions for Mac users:

- Use the workflow described in `Upgrading just one dependency`_.
- You can run ``make lms-shell`` in devstack to get a Linux environment for more complicated operations.

Did you hand-edit the .txt files?
=================================

Hand-editing the .txt requirements files often leads to dependency conflicts, failed deployments, or outages. It's easy to forget to update all the locations where a requirement appears, and it's often not feasible to track down all of the transitive dependencies of the package you want to upgrade.

Luckily, we have simple runbooks for upgrading or downgrading a single package, which are the most common cases:

- `Upgrading just one dependency`_
- `Downgrading a dependency`_

Is there an unpinned git dependency?
====================================

If the diff relates to a dependency that is installed from git rather than from PyPI (such as being a transitive dependency of anything in github.in), check whether any of the dependencies in github.in has failed to pin a specific commit. We want to have as few of these dependencies as possible, as they're a maintenance and performance problem, and there are important instructions at the top of that file for how to manage them.

Help, I didn't change any dependencies, and this is still failing!
==================================================================

It's possible that someone introduced an inconsistency on the master branch, in which case please submit a new PR off of master after running ``make compile-requirements`` (but see notes above for Mac users). Or perhaps your branch was made while there was such an inconsistency, in which case please rebase onto master or merge down from master to your branch.