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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Migrate to ruff formatter (replaces black)
fdf3066e3346c925faaf8fdc3746698588d77dad
9 changes: 3 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# Automatically update versions for pip and npm

# Automatically update versions for uv and GitHub Actions
version: 2
updates:

# Maintain dependencies for Python
- package-ecosystem: "pip"
# Maintain dependencies for uv
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
time: "00:00"
cooldown:
default-days: 7

# Maintain dependencies for Github Actions
- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/call-contributor-issue-comment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Handle contributor comment on GitHub issue

on:
issue_comment:
types: [created]

jobs:
call-workflow:
uses: learningequality/.github/.github/workflows/contributor-issue-comment.yml@main
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/call-contributor-pr-reply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Send reply on a new contributor pull request
on:
pull_request_target:
types: [opened]

jobs:
call-workflow:
name: Call shared workflow
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/call-manage-issue-header.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Manage issue header

on:
issues:
types: [opened, reopened, labeled, unlabeled]

jobs:
call-workflow:
name: Call shared workflow
uses: learningequality/.github/.github/workflows/manage-issue-header.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
2 changes: 0 additions & 2 deletions .github/workflows/call-update-pr-spreadsheet.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Update community pull requests spreadsheet

on:
pull_request_target:
types: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed]

jobs:
call-workflow:
name: Call shared workflow
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/community-contribution-labeling.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Community Contribution Label

on:
issues:
types: [assigned, unassigned]

jobs:
call-label-action:
uses: learningequality/.github/.github/workflows/community-contribution-label.yml@main
secrets:
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
10 changes: 4 additions & 6 deletions .github/workflows/finalized_specs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Finalized specs

on:
push:
branches:
- main
- main
pull_request:

jobs:
change_check:
name: Check if file changed
Expand All @@ -21,12 +19,12 @@ jobs:
- id: changes
# Set outputs using the command.
run: |
echo "modified=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep spec/labels-v1.json$ | xargs)" >> $GITHUB_OUTPUT
echo "modified=$(git diff --name-only --diff-filter=ACMRT "${{ github.event.pull_request.base.sha }}" "${{ github.sha }}" | grep spec/labels-v1.json$ | xargs)" >> "$GITHUB_OUTPUT"
unit_test:
name: Error if finalized spec modified
needs: change_check
if: ${{ needs.change_check.outputs.modified }}
runs-on: ubuntu-latest
steps:
- name: Fail if specs modified
run: exit 1
- name: Fail if specs modified
run: exit 1
24 changes: 8 additions & 16 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
name: Publish npmjs Package

on:
release:
types: [published]

permissions:
id-token: write # Required for npm trusted publishing (OIDC)
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: '24'
registry-url: https://registry.npmjs.org/
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.9
- name: Cache pip
uses: actions/cache@v5
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-py3.9-${{ hashFiles('.github/workflows/npm-publish.yml') }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- run: make release-npm
enable-cache: true
cache-python: true
- name: Build and publish
run: make release-npm
16 changes: 9 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Linting

on:
push:
branches:
- main
- main
pull_request:

jobs:
pre_job:
name: Path match check
Expand All @@ -24,7 +22,11 @@ jobs:
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- run: pip install setuptools
- uses: pre-commit/action@v3.0.1
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-python: true
- uses: j178/prek-action@v2
32 changes: 13 additions & 19 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
# This workflow will upload a Python Package using pypa/gh-action-pypi-publish when a release is created

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel pre-commit
- name: Build distribution
run: make dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-python: true
- name: Build distribution
run: make dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
79 changes: 25 additions & 54 deletions .github/workflows/pythontest.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Python tests

on:
push:
branches:
- main
- main
pull_request:

jobs:
pre_job:
name: Path match check
Expand All @@ -18,7 +16,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths: '["**.py", ".github/workflows/pythontest.yml", "requirements-test.txt", "tox.ini"]'
paths: '["**.py", ".github/workflows/pythontest.yml", "pyproject.toml", "uv.lock"]'
unit_test:
name: Python unit tests
needs: pre_job
Expand All @@ -28,34 +26,19 @@ jobs:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v6
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !startsWith(runner.os, 'windows') }}
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}

- uses: actions/checkout@v6
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
with:
fetch-depth: 0
- name: Set up uv
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-python: true
- name: Run tests
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: uv run --python ${{ matrix.python-version }} --group test pytest
unit_test_eol_python:
name: Python unit tests for EOL Python versions
needs: pre_job
Expand All @@ -67,25 +50,13 @@ jobs:
container:
image: python:${{ matrix.python-version }}-buster
steps:
- uses: actions/checkout@v6
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
- name: Cache pip
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
- name: Install tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: |
python -m pip install --upgrade pip
pip install tox
- name: tox env cache
if: ${{ needs.pre_job.outputs.should_skip != 'true' && !startsWith(runner.os, 'windows') }}
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
- name: Test with tox
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
run: tox -e py${{ matrix.python-version }}
- uses: actions/checkout@v6
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
- name: Install dependencies and run tests
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
env:
PYTHONPATH: ${{ github.workspace }}
run: |
python -m pip install --upgrade pip
pip install "pytest>=6.2.5,<8" "jsonschema==3.2.0"
pytest
2 changes: 0 additions & 2 deletions .github/workflows/unassign-inactive.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: "Unassign Inactive Contributors"
run-name: Unassign Inactive Contributors

on:
schedule:
- cron: "1 0 * * 1" # Every Monday at 00:01 UTC
workflow_dispatch:

jobs:
unassign-inactive:
uses: learningequality/.github/.github/workflows/unassign-inactive-issues.yaml@main
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ celerybeat-schedule

# virtualenv
venv/
.venv/
venv2/
ENV/

Expand Down
Loading
Loading