Skip to content

Commit 06c8056

Browse files
rtibblesbotclaude
andcommitted
fix: commit yamlfmt formatting and ruff config fixes
- Apply yamlfmt reformatting to 7 workflow files - Add E501 to ruff ignore list (ruff format doesn't enforce line length as strictly as the linter) - Add time component to exclude-newer for full ISO 8601 compliance - Apply ruff-format to auto-generated constant files - Update uv.lock and js/package.json version Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 16d8ee6 commit 06c8056

16 files changed

Lines changed: 47 additions & 207 deletions

.github/workflows/call-contributor-issue-comment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Handle contributor comment on GitHub issue
2-
32
on:
43
issue_comment:
54
types: [created]
6-
75
jobs:
86
call-workflow:
97
uses: learningequality/.github/.github/workflows/contributor-issue-comment.yml@main

.github/workflows/call-contributor-pr-reply.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Send reply on a new contributor pull request
22
on:
33
pull_request_target:
44
types: [opened]
5-
65
jobs:
76
call-workflow:
87
name: Call shared workflow
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Manage issue header
2-
32
on:
43
issues:
54
types: [opened, reopened, labeled, unlabeled]
6-
75
jobs:
86
call-workflow:
97
name: Call shared workflow
108
uses: learningequality/.github/.github/workflows/manage-issue-header.yml@main
119
secrets:
12-
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
13-
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
10+
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
11+
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}

.github/workflows/call-update-pr-spreadsheet.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Update community pull requests spreadsheet
2-
32
on:
43
pull_request_target:
54
types: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed]
6-
75
jobs:
86
call-workflow:
97
name: Call shared workflow
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Community Contribution Label
2-
32
on:
43
issues:
54
types: [assigned, unassigned]
6-
75
jobs:
86
call-label-action:
97
uses: learningequality/.github/.github/workflows/community-contribution-label.yml@main
108
secrets:
11-
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
12-
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
9+
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
10+
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}

.github/workflows/finalized_specs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Finalized specs
2-
32
on:
43
push:
54
branches:
6-
- main
5+
- main
76
pull_request:
8-
97
jobs:
108
change_check:
119
name: Check if file changed
@@ -21,12 +19,12 @@ jobs:
2119
- id: changes
2220
# Set outputs using the command.
2321
run: |
24-
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
22+
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"
2523
unit_test:
2624
name: Error if finalized spec modified
2725
needs: change_check
2826
if: ${{ needs.change_check.outputs.modified }}
2927
runs-on: ubuntu-latest
3028
steps:
31-
- name: Fail if specs modified
32-
run: exit 1
29+
- name: Fail if specs modified
30+
run: exit 1

.github/workflows/unassign-inactive.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: "Unassign Inactive Contributors"
22
run-name: Unassign Inactive Contributors
3-
43
on:
54
schedule:
65
- cron: "1 0 * * 1" # Every Monday at 00:01 UTC
76
workflow_dispatch:
8-
97
jobs:
108
unassign-inactive:
119
uses: learningequality/.github/.github/workflows/unassign-inactive-issues.yaml@main

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
"scripts": {
2828
"test": "echo \"Error: no test specified\" && exit 1"
2929
},
30-
"version": "0.2.16"
30+
"version": "0.2.17.dev7+g16d8ee641.d20260401"
3131
}

le_utils/constants/completion_criteria.py

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -39,68 +39,28 @@
3939
"model": {
4040
"type": "string",
4141
"$exportConstants": "completion_criteria",
42-
"enum": [
43-
"time",
44-
"approx_time",
45-
"pages",
46-
"mastery",
47-
"reference",
48-
"determined_by_resource",
49-
],
42+
"enum": ["time", "approx_time", "pages", "mastery", "reference", "determined_by_resource"],
5043
},
5144
"mastery_criteria": {"$ref": "/schemas/mastery_criteria"},
5245
},
53-
"properties": {
54-
"model": {"$ref": "#/definitions/model"},
55-
"learner_managed": {"type": "boolean"},
56-
"threshold": True,
57-
},
46+
"properties": {"model": {"$ref": "#/definitions/model"}, "learner_managed": {"type": "boolean"}, "threshold": True},
5847
"required": ["model"],
5948
"anyOf": [
6049
{
6150
"properties": {
62-
"model": {
63-
"anyOf": [
64-
{"const": "time"},
65-
{"const": "approx_time"},
66-
{"const": "pages"},
67-
]
68-
},
51+
"model": {"anyOf": [{"const": "time"}, {"const": "approx_time"}, {"const": "pages"}]},
6952
"threshold": {"type": "number", "exclusiveMinimum": 0},
7053
},
7154
"required": ["threshold"],
7255
},
7356
{
7457
"properties": {
7558
"model": {"const": "pages"},
76-
"threshold": {
77-
"type": "string",
78-
"pattern": "^(100|[1-9][0-9]?)%$",
79-
"description": "A percentage",
80-
"minLength": 2,
81-
"maxLength": 4,
82-
},
83-
},
84-
"required": ["threshold"],
85-
},
86-
{
87-
"properties": {
88-
"model": {"const": "mastery"},
89-
"threshold": {"$ref": "#/definitions/mastery_criteria"},
59+
"threshold": {"type": "string", "pattern": "^(100|[1-9][0-9]?)%$", "description": "A percentage", "minLength": 2, "maxLength": 4},
9060
},
9161
"required": ["threshold"],
9262
},
93-
{
94-
"properties": {
95-
"model": {
96-
"anyOf": [
97-
{"const": "reference"},
98-
{"const": "determined_by_resource"},
99-
]
100-
},
101-
"threshold": {"type": "null"},
102-
},
103-
"required": [],
104-
},
63+
{"properties": {"model": {"const": "mastery"}, "threshold": {"$ref": "#/definitions/mastery_criteria"}}, "required": ["threshold"]},
64+
{"properties": {"model": {"anyOf": [{"const": "reference"}, {"const": "determined_by_resource"}]}, "threshold": {"type": "null"}}, "required": []},
10565
],
10666
}

le_utils/constants/embed_content_request.py

Lines changed: 13 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
"description": "Language code from https://github.com/learningequality/le-utils/blob/main/le_utils/resources/languagelookup.json",
2727
"pattern": "^[a-z]{2,3}(?:-[a-zA-Z]+)*$",
2828
},
29-
"url": {
30-
"type": "string",
31-
"pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$",
32-
},
29+
"url": {"type": "string", "pattern": "^(https?:\\/\\/(?:storage\\.cloud\\.google\\.com|localhost(?::[0-9]+)?)\\/[a-z0-9-._~!$&'()*+,;=:@%\\/\\?]+)$"},
3330
"preset": {
3431
"type": "string",
3532
"description": "Presets from https://github.com/learningequality/le-utils/blob/main/le_utils/constants/format_presets.py",
@@ -70,73 +67,30 @@
7067
"file": {
7168
"type": "object",
7269
"additionalProperties": False,
73-
"properties": {
74-
"url": {"$ref": "#/definitions/url"},
75-
"preset": {"$ref": "#/definitions/preset"},
76-
"language": {"$ref": "#/definitions/language"},
77-
},
70+
"properties": {"url": {"$ref": "#/definitions/url"}, "preset": {"$ref": "#/definitions/preset"}, "language": {"$ref": "#/definitions/language"}},
7871
"required": ["url", "preset"],
7972
},
8073
"resource": {
8174
"type": "object",
8275
"description": "The key textual metadata and data for a content resource",
8376
"additionalProperties": False,
8477
"properties": {
85-
"id": {
86-
"$ref": "#/definitions/uuid",
87-
"description": "The UUID of the content resource",
88-
},
89-
"channel_id": {
90-
"$ref": "#/definitions/uuid",
91-
"description": "The UUID of the channel that the content resource belongs to",
92-
},
93-
"title": {
94-
"type": "string",
95-
"description": "The title of the content resource",
96-
},
97-
"description": {
98-
"type": "string",
99-
"description": "The description of the content resource",
100-
},
101-
"text": {
102-
"type": "string",
103-
"description": "Optional textual content to include in the embedding",
104-
},
78+
"id": {"$ref": "#/definitions/uuid", "description": "The UUID of the content resource"},
79+
"channel_id": {"$ref": "#/definitions/uuid", "description": "The UUID of the channel that the content resource belongs to"},
80+
"title": {"type": "string", "description": "The title of the content resource"},
81+
"description": {"type": "string", "description": "The description of the content resource"},
82+
"text": {"type": "string", "description": "Optional textual content to include in the embedding"},
10583
"language": {"$ref": "#/definitions/language"},
106-
"files": {
107-
"type": "array",
108-
"description": "A list of files associated with the content resource",
109-
"items": {"$ref": "#/definitions/file"},
110-
},
111-
"content_id": {
112-
"$ref": "#/definitions/uuid",
113-
"description": "The UUID of the content resource(s)",
114-
},
115-
"channel_version": {
116-
"type": "integer",
117-
"description": "The version number of the channel that the content resource belongs to",
118-
},
84+
"files": {"type": "array", "description": "A list of files associated with the content resource", "items": {"$ref": "#/definitions/file"}},
85+
"content_id": {"$ref": "#/definitions/uuid", "description": "The UUID of the content resource(s)"},
86+
"channel_version": {"type": "integer", "description": "The version number of the channel that the content resource belongs to"},
11987
},
120-
"required": [
121-
"id",
122-
"channel_id",
123-
"title",
124-
"description",
125-
"content_id",
126-
"channel_version",
127-
],
88+
"required": ["id", "channel_id", "title", "description", "content_id", "channel_version"],
12889
},
12990
},
13091
"properties": {
131-
"resources": {
132-
"type": "array",
133-
"description": "A list of content resources to embed",
134-
"items": {"$ref": "#/definitions/resource"},
135-
},
136-
"metadata": {
137-
"type": "object",
138-
"description": "The metadata of the channel for logging purposes",
139-
},
92+
"resources": {"type": "array", "description": "A list of content resources to embed", "items": {"$ref": "#/definitions/resource"}},
93+
"metadata": {"type": "object", "description": "The metadata of the channel for logging purposes"},
14094
},
14195
"required": ["resources"],
14296
}

0 commit comments

Comments
 (0)