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: 1 addition & 1 deletion .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ codekit-config.json

# Django static
staticfiles/
static/hash.txt

.venv
release-notes-checklist
Expand Down
8 changes: 8 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release Notes
=============

Version 0.13.20
---------------

- Make static/hash.txt served again (#1259)
- Update actions/checkout digest to 692973e (#1263)
- adjust department names (#1253)
- Update eslint-config and friends (#1246)

Version 0.13.19 (Released July 12, 2024)
---------------

Expand Down
8 changes: 5 additions & 3 deletions bin/pre_compile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Syntax bin/compile <build-dir> <cache-dir>

echo "-----> Writing out SOURCE_VERSION ($SOURCE_VERSION) to $BUILD_DIR/frontends/mit-open/build/static"
mkdir -p $BUILD_DIR/frontends/mit-open/build/static
echo $SOURCE_VERSION >$BUILD_DIR/frontends/mit-open/build/static/hash.txt
STATIC_DIR="$BUILD_DIR/static"

echo "-----> Writing out SOURCE_VERSION ($SOURCE_VERSION) to $STATIC_DIR"
mkdir -p $STATIC_DIR
echo $SOURCE_VERSION >$STATIC_DIR/hash.txt
4 changes: 2 additions & 2 deletions channels/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def department_upserted(self, department, overwrite):
channel = None
elif department.school and (overwrite or not channel):
channel, _ = Channel.objects.update_or_create(
name=slugify(department.name),
search_filter=f"department={department.department_id}",
channel_type=ChannelType.department.name,
defaults={
"name": slugify(department.name),
"title": department.name,
"search_filter": f"department={department.department_id}",
},
)
ChannelDepartmentDetail.objects.update_or_create(
Expand Down
21 changes: 21 additions & 0 deletions channels/plugins_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,27 @@ def test_search_index_plugin_department_delete():
)


@pytest.mark.django_db()
@pytest.mark.parametrize("overwrite", [True, False])
def test_search_index_plugin_department_rename(overwrite):
"""The plugin function should update the channel title when the department name changes"""
channel = ChannelFactory.create(is_department=True)
department = channel.department_detail.department
old_title = channel.title
assert department is not None
new_name = "New Name"
department.name = new_name
department.save()
updated_channel, updated = ChannelPlugin().department_upserted(
department, overwrite
)
if updated:
assert updated_channel.title == new_name
else:
assert updated_channel.title == old_title
assert updated is overwrite


@pytest.mark.django_db()
@pytest.mark.parametrize("overwrite", [True, False])
def test_search_index_plugin_offeror_upserted(overwrite):
Expand Down
2 changes: 1 addition & 1 deletion frontends/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
"**/*.test.ts",
"**/*.test.tsx",
"**/src/setupJest.ts",
"jest-shared-setup.ts",
"**/jest-shared-setup.ts",
"**/test-utils/**",
"**/test-utils/**",
"**/webpack.config.js",
Expand Down
98 changes: 49 additions & 49 deletions frontends/api/src/generated/v1/api.ts

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions frontends/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@
"@typescript-eslint/eslint-plugin": "^7.0.0",
"cross-fetch": "^4.0.0",
"eslint": "8",
"eslint-config-mitodl": "^2.0.0",
"eslint-config-mitodl": "^2.1.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-mdx": "^3.0.0",
"eslint-plugin-mocha": "^10.4.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-testing-library": "^6.2.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.5.0",
Expand Down
8 changes: 4 additions & 4 deletions learning_resources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ class LearningResourceRelationTypes(TextChoices):
"11": "Urban Studies and Planning",
"12": "Earth, Atmospheric, and Planetary Sciences",
"14": "Economics",
"15": "Sloan School of Management",
"15": "Management",
"16": "Aeronautics and Astronautics",
"17": "Political Science",
"18": "Mathematics",
"20": "Biological Engineering",
"21A": "Anthropology",
"21G": "Global Studies and Languages",
"21G": "Global Languages",
"21H": "History",
"21L": "Literature",
"21M": "Music and Theater Arts",
Expand All @@ -181,8 +181,8 @@ class LearningResourceRelationTypes(TextChoices):
"EC": "Edgerton Center",
"ES": "Experimental Study Group",
"ESD": "Engineering Systems Division",
"HST": "Health Sciences and Technology",
"IDS": "Institute for Data, Systems, and Society",
"HST": "Medical Engineering and Science",
"IDS": "Data, Systems, and Society",
"MAS": "Media Arts and Sciences",
"PE": "Athletics, Physical Education and Recreation",
"RES": "Supplemental Resources",
Expand Down
2 changes: 1 addition & 1 deletion learning_resources/etl/openedx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def test_transform_course( # noqa: PLR0913
"value": "MITx+15.071x",
"department": {
"department_id": "15",
"name": "Sloan School of Management",
"name": "Management",
},
"listing_type": CourseNumberType.primary.value,
"primary": True,
Expand Down
Loading