Skip to content

Commit dfffcb6

Browse files
authored
Merge pull request #4635 from learningequality/unstable
Bulk Edit Release
2 parents a9f5cd3 + 16a3d4f commit dfffcb6

File tree

371 files changed

+15178
-32986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+15178
-32986
lines changed

.github/ISSUE_TEMPLATE/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
blank_issues_enabled: false
2+
contact_links:
3+
- name: Studio GitHub Discussions
4+
url: https://github.com/learningequality/studio/discussions
5+
about: Please ask general questions about contributing to Studio or report development server issues here.
6+
- name: Learning Equality Community Forum
7+
url: https://community.learningequality.org/
8+
about: Ask and answer questions about Learning Equality's products and tools, share your experiences using Kolibri, and connect with users around the world.

.github/dependabot.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,30 @@ updates:
77
- package-ecosystem: "pip"
88
directory: "/"
99
schedule:
10-
interval: "daily"
10+
interval: "weekly"
11+
day: "wednesday"
1112
time: "00:00"
1213

1314
# Maintain dependencies for Javascript
1415
- package-ecosystem: "npm"
1516
directory: "/"
1617
schedule:
17-
interval: "daily"
18+
interval: "weekly"
19+
day: "wednesday"
1820
time: "00:00"
21+
groups:
22+
babel:
23+
patterns:
24+
- "@babel/*"
1925

2026
# Maintain dependencies for Github Actions
2127
- package-ecosystem: "github-actions"
2228
directory: "/"
2329
schedule:
24-
interval: "daily"
30+
interval: "weekly"
31+
day: "wednesday"
2532
time: "00:00"
33+
groups:
34+
github:
35+
patterns:
36+
- "actions/*"

.github/workflows/containerbuild.yml

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Container Build
2+
3+
on:
4+
push:
5+
branches:
6+
- unstable
7+
- hotfixes
8+
- master
9+
tags:
10+
- 'v*'
11+
pull_request:
12+
13+
jobs:
14+
pre_postgres:
15+
name: Path match check - postgres
16+
runs-on: ubuntu-latest
17+
# Map a step output to a job output
18+
outputs:
19+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
20+
steps:
21+
- id: skip_check
22+
uses: fkirc/skip-duplicate-actions@master
23+
with:
24+
skip_after_successful_duplicate: false
25+
github_token: ${{ github.token }}
26+
paths: '["docker/Dockerfile.postgres.dev", ".github/workflows/containerbuild.yml"]'
27+
28+
build_and_push_postgres:
29+
name: Postgres - build and push Docker image to GitHub Container Registry
30+
needs: pre_postgres
31+
if: ${{ needs.pre_postgres.outputs.should_skip != 'true' }}
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout codebase
35+
uses: actions/checkout@v4
36+
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v3
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v3
42+
43+
- name: Log in to Docker Hub
44+
if: github.event_name != 'pull_request'
45+
uses: docker/login-action@v3
46+
with:
47+
registry: ghcr.io
48+
username: ${{ github.actor }}
49+
password: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Extract metadata (tags, labels) for Docker
52+
id: meta
53+
uses: docker/metadata-action@v5
54+
with:
55+
images: ghcr.io/learningequality/postgres
56+
env:
57+
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
58+
59+
- name: Build and push Docker image
60+
uses: docker/build-push-action@v5
61+
with:
62+
context: ./docker
63+
file: ./docker/Dockerfile.postgres.dev
64+
platforms: linux/amd64,linux/arm64
65+
push: ${{ github.event_name != 'pull_request' }}
66+
tags: ${{ steps.meta.outputs.tags }}
67+
labels: ${{ steps.meta.outputs.labels }}
68+
annotations: ${{ steps.meta.outputs.annotations }}
69+
70+
pre_nginx:
71+
name: Path match check - nginx
72+
runs-on: ubuntu-latest
73+
# Map a step output to a job output
74+
outputs:
75+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
76+
steps:
77+
- id: skip_check
78+
uses: fkirc/skip-duplicate-actions@master
79+
with:
80+
skip_after_successful_duplicate: false
81+
github_token: ${{ github.token }}
82+
paths: '["k8s/images/nginx/*", ".github/workflows/containerbuild.yml"]'
83+
84+
build_nginx:
85+
name: nginx - test build of nginx Docker image
86+
needs: pre_nginx
87+
if: ${{ needs.pre_nginx.outputs.should_skip != 'true' }}
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Checkout codebase
91+
uses: actions/checkout@v4
92+
93+
- name: Set up QEMU
94+
uses: docker/setup-qemu-action@v3
95+
96+
- name: Set up Docker Buildx
97+
uses: docker/setup-buildx-action@v3
98+
99+
- name: Build Docker image
100+
uses: docker/build-push-action@v5
101+
with:
102+
context: ./
103+
file: ./k8s/images/nginx/Dockerfile
104+
platforms: linux/amd64
105+
push: false

.github/workflows/deploytest.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
- name: Use Node.js
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: '16.x'
3535
- name: Cache Node.js modules
36-
uses: actions/cache@v3
36+
uses: actions/cache@v4
3737
with:
3838
path: '**/node_modules'
3939
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
@@ -52,12 +52,12 @@ jobs:
5252
runs-on: ubuntu-latest
5353
steps:
5454
- uses: actions/checkout@v4
55-
- name: Set up Python 3.9
56-
uses: actions/setup-python@v4
55+
- name: Set up Python 3.10
56+
uses: actions/setup-python@v5
5757
with:
58-
python-version: 3.9
58+
python-version: '3.10'
5959
- name: pip cache
60-
uses: actions/cache@v3
60+
uses: actions/cache@v4
6161
with:
6262
path: ~/.cache/pip
6363
key: ${{ runner.os }}-pyprod-${{ hashFiles('requirements.txt') }}
@@ -69,11 +69,11 @@ jobs:
6969
pip install pip-tools
7070
pip-sync requirements.txt
7171
- name: Use Node.js
72-
uses: actions/setup-node@v3
72+
uses: actions/setup-node@v4
7373
with:
7474
node-version: '16.x'
7575
- name: Cache Node.js modules
76-
uses: actions/cache@v3
76+
uses: actions/cache@v4
7777
with:
7878
path: '**/node_modules'
7979
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}

.github/workflows/frontendlint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
- name: Use Node.js
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: '16.x'
3535
- name: Cache Node.js modules
36-
uses: actions/cache@v3
36+
uses: actions/cache@v4
3737
with:
3838
path: '**/node_modules'
3939
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
@@ -49,7 +49,7 @@ jobs:
4949
if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository
5050
id: git-check
5151
run: echo ::set-output name=modified::$(git diff-index --name-only HEAD)
52-
- uses: tibdex/github-app-token@v1
52+
- uses: tibdex/github-app-token@v2
5353
if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository && steps.git-check.outputs.modified != ''
5454
id: generate-token
5555
with:

.github/workflows/frontendtest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
- name: Use Node.js
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: '16.x'
3535
- name: Cache Node.js modules
36-
uses: actions/cache@v3
36+
uses: actions/cache@v4
3737
with:
3838
path: '**/node_modules'
3939
key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Send a slack notification when a contributor comments on issue
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
contributor_issue_comment:
9+
name: Contributor issue comment
10+
11+
if: >-
12+
${{
13+
!github.event.issue.pull_request &&
14+
github.event.comment.author_association != 'MEMBER' &&
15+
github.event.comment.author_association != 'OWNER'
16+
}}
17+
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Escape title double quotes
21+
id: escape_title
22+
env:
23+
ISSUE_TITLE: ${{ github.event.issue.title }}
24+
run: echo "ISSUE_TITLE=${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_OUTPUT"
25+
26+
- name: Send message to Slack channel
27+
env:
28+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
29+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
30+
uses: slackapi/slack-github-action@v1.27.0
31+
with:
32+
payload: |
33+
{
34+
"text": "*[Studio] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|${{ steps.escape_title.outputs.ISSUE_TITLE }} by ${{ github.event.comment.user.login }}>*"
35+
}

.github/workflows/pythontest.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ jobs:
7070
-v /tmp/minio_data:/data \
7171
-v /tmp/minio_config:/root/.minio \
7272
minio/minio server /data
73-
- name: Set up Python 3.9
74-
uses: actions/setup-python@v4
73+
- name: Set up Python 3.10
74+
uses: actions/setup-python@v5
7575
with:
76-
python-version: 3.9
76+
python-version: '3.10'
7777
- name: pip cache
78-
uses: actions/cache@v3
78+
uses: actions/cache@v4
7979
with:
8080
path: ~/.cache/pip
8181
key: ${{ runner.os }}-pytest-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ webpack-stats\.json
128128
storybook-static/
129129

130130
# i18n
131-
/contentcuration/locale/CSV_FILES/*
131+
/contentcuration/locale/**/LC_MESSAGES/*.csv
132132

133133
# pyenv
134134
.python-version

.readthedocs.yml

-15
This file was deleted.

CONTRIBUTING.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- Also update README.md (duplicate) -->
2+
## How can I contribute?
3+
4+
1. 📙 **Skim through the [Developer documentation](./docs/_index.md)** to understand where to refer later on.
5+
2. 💻 **Follow the [Local development instructions](./docs/local_dev_docker.md) to set up your development server.**
6+
3. 🔍 **Search for issues tagged as [help wanted](https://github.com/learningequality/studio/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+no%3Aassignee) or [good first issue](https://github.com/learningequality/studio/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee).**
7+
4. 🗣️ **Ask us for an assignment in the comments of an issue you've chosen.** Please request assignment of a reasonable amount of issues at a time. Once you finish your current issue or two, you are welcome to ask for more.
8+
9+
**❓ Where to ask questions**
10+
11+
- For anything development related, refer to the [Developer documentation](./docs/_index.md) at first. Some answers may already be there.
12+
- For questions related to a specific issue or assignment requests, use the corresponding issue's comments section.
13+
- Visit [GitHub Discussions](https://github.com/learningequality/studio/discussions) to ask about anything related to contributing or to troubleshoot development server issues.
14+
15+
**👥 How to connect**
16+
17+
- We encourage you to visit [GitHub Discussions](https://github.com/learningequality/studio/discussions) to connect with the Learning Equality team as well as with other contributors.
18+
- If you'd like to contribute on a regular basis, we are happy to invite you to our open-source community Slack channel. Get in touch with us at info@learningequality.org to receive an invitation.
19+
20+
---
21+
22+
🕖 Please allow us a few days to reply to your comments. If you don't hear from us within a week, reach out via [GitHub Discussions](https://github.com/learningequality/studio/discussions).
23+
24+
As soon as you open a pull request, it may take us a week or two to review it as we're a small team. We appreciate your contribution and will provide feedback.
25+
26+
---
27+
28+
*Thank you for your interest in contributing! Learning Equality was founded by volunteers dedicated to helping make educational materials more accessible to those in need, and every contribution makes a difference.*

Makefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ migrate:
3838
# 4) Remove the management command from this `deploy-migrate` recipe
3939
# 5) Repeat!
4040
deploy-migrate:
41-
echo "Nothing to do here!"
41+
python contentcuration/manage.py rectify_incorrect_contentnode_source_fields
4242

4343
contentnodegc:
4444
python contentcuration/manage.py garbage_collect
@@ -136,7 +136,9 @@ dummyusers:
136136
hascaptions:
137137
python contentcuration/manage.py set_orm_based_has_captions
138138

139-
export COMPOSE_PROJECT_NAME=studio_$(shell git rev-parse --abbrev-ref HEAD)
139+
BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9_-]/-/g')
140+
141+
export COMPOSE_PROJECT_NAME=studio_$(BRANCH_NAME)
140142

141143
purge-postgres: .docker/pgpass
142144
-PGPASSFILE=.docker/pgpass dropdb -U learningequality "kolibri-studio" --port 5432 -h localhost

0 commit comments

Comments
 (0)