Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .coveragerc

This file was deleted.

3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# Files that should be git-ignored, but are hand-edited or otherwise valued,
# and so should not be destroyed by "make clean".
# start-noclean
requirements/private.txt
requirements/edx/private.in
requirements/edx/private.txt
lms/envs/private.py
cms/envs/private.py
# end-noclean
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ lms/envs/minimal.yml @feanil
lms/envs/production.py @feanil @kdmccormick
cms/envs/production.py @feanil @kdmccormick

# Ensure that this file is only used when strictly necessary
requirements/edx/github.in @feanil @kdmccormick

# Review GitHub Actions workflow changes (incl. Dependabot PRs).
# Replaces the deprecated `reviewers:` key in dependabot.yml.
/.github/workflows/ @openedx/wg-maintenance-openedx-platform-oncall
12 changes: 10 additions & 2 deletions .github/workflows/check-consistent-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ jobs:
git fetch origin "$BASE_SHA"

# The ^"? is because git may quote weird file paths
if git diff --name-only "$BASE_SHA" | grep -P '^"?((requirements/)|(scripts/.*?/requirements/))'; then
#
# This still watches requirements/ because requirements/edx-sandbox
# (its own uv project) and the requirements/edx/*.txt compatibility
# exports still live there. A planned follow-up will remove the
# requirements/ folder entirely (see public-engineering#543), at
# which point this pattern will need updating again.
if git diff --name-only "$BASE_SHA" | grep -P '^"?((requirements/)|(scripts/.*?/requirements/)|(scripts/[^/]+/pyproject\.toml)|(scripts/[^/]+/uv\.lock)|(pyproject\.toml)|(uv\.lock))'; then
Comment thread
irfanuddinahmad marked this conversation as resolved.
Comment thread
irfanuddinahmad marked this conversation as resolved.
echo "RELEVANT=true" >> "$GITHUB_ENV"
fi

- uses: actions/setup-python@v6
- name: Install uv
if: ${{ env.RELEVANT == 'true' }}
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: '3.12'

- name: "Recompile requirements"
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/check_python_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,22 @@ jobs:

strategy:
matrix:
python-version: ["3.12"]
python-version:
- "3.12"

steps:
- name: Checkout Repository
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install repo-tools
run: pip install edx-repo-tools[find_dependencies]

- name: Install setuptool
run: pip install setuptools

- name: Run Python script
run: |
find_python_dependencies \
--req-file requirements/edx/base.txt \
--req-file requirements/edx/testing.txt \
uvx --from 'edx-repo-tools[find_dependencies]' find_python_dependencies \
--req-file uv.lock \
--ignore https://github.com/mitodl/edx-sga \
--ignore https://github.com/open-craft/xblock-poll
21 changes: 4 additions & 17 deletions .github/workflows/ci-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,15 @@ jobs:

steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev

- name: Install pip
run: make pre-requirements

- name: Get pip cache dir
id: pip-cache-dir
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-
enable-cache: true
Comment thread
farhan marked this conversation as resolved.
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: make dev-requirements
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/compile-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
with:
ref: "${{ inputs.branch }}"

- name: Set up Python environment
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: "3.12"

- name: Run make compile-requirements
Expand All @@ -48,7 +49,13 @@ jobs:
with:
branch: "${{ github.triggering_actor }}/compile-python-deps"
branch-suffix: short-commit-hash
add-paths: requirements
add-paths: |
requirements
scripts/**/pyproject.toml
scripts/**/uv.lock
scripts/**/requirements*
Comment thread
irfanuddinahmad marked this conversation as resolved.
pyproject.toml
uv.lock
commit-message: |
feat: Recompile Python dependencies

Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,14 @@ jobs:
- name: Install Required System Packages
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb

- name: Setup Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v6
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Install Required Python Dependencies
run: |
make base-requirements
run: make base-requirements

- name: Install npm
run: npm ci
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/lint-imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,14 @@ jobs:
- name: Check out branch
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev

- name: Install pip
run: make pre-requirements

- name: Get pip cache dir
id: pip-cache-dir
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-
enable-cache: true
python-version: "3.12"

- name: Install python dependencies
run: make dev-requirements
Expand Down
41 changes: 15 additions & 26 deletions .github/workflows/migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
os: [ubuntu-24.04]
python-version:
- "3.12"
# 'pinned' is used to install the latest patch version of Django
# within the global constraint i.e. Django==4.2.8 in current case
# because we have global constraint of Django<4.2
# 'pinned' installs whatever Django version `testing` resolves to under the
# global `Django<6.0` constraint (currently 5.2.x). To test another supported
# version instead, use a value matching a real `djangoNN` dependency-group in
# pyproject.toml (e.g. "42" for the `django42` group), synced below.
django-version: ["pinned"]
mongo-version:
- "7"
Expand Down Expand Up @@ -73,40 +74,28 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v7

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install system Packages
run: |
sudo apt-get update
make ubuntu-requirements

- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-
enable-cache: true
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
make dev-requirements
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
pip install "django~=${{ matrix.django-version }}.0"
pip check # fail if this test-reqs/Django combination is broken
if [[ "${{ matrix.django-version }}" == "pinned" ]]; then
Comment thread
farhan marked this conversation as resolved.
make dev-requirements
else
uv sync --no-default-groups --group testing --group "django${{ matrix.django-version }}" --frozen
fi

- name: list installed package versions
run: |
sudo pip freeze
uv tree

- name: Run Tests
env:
Expand All @@ -115,9 +104,9 @@ jobs:
STUDIO_CFG: lms/envs/minimal.yml
run: |
echo "Running the LMS migrations."
./manage.py lms migrate
uv run ./manage.py lms migrate
echo "Running the CMS migrations."
./manage.py cms migrate
uv run ./manage.py cms migrate

# This job aggregates test results. It's the required check for branch protection.
# https://github.com/marketplace/actions/alls-green#why
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/pylint-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,22 @@ jobs:
- name: Install required system packages
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev

- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
python-version: 3.12

- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v6
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-
enable-cache: true
python-version: "3.12"

- name: Install required Python dependencies
run: |
# dev-requirements is needed because the linter will otherwise
# trip over some dev-only things like django-debug-toolbar
# (import debug_toolbar) that aren't in testing.txt.
# (import debug_toolbar) that aren't in the testing group.
make dev-requirements
# After all requirements are installed, check that they're consistent with each other
pip check

- name: Run quality tests
run: |
pylint ${{ matrix.path }}
uv run pylint ${{ matrix.path }}

# This job aggregates test results. It's the required check for branch protection.
# https://github.com/marketplace/actions/alls-green#why
Expand Down
Loading
Loading