Skip to content

Commit 78e100c

Browse files
committed
Switched Dependabot to using UV, tried to switch Copier updates to checking GitHub repo token, added Info model to some of the pages.
1 parent 7594ebd commit 78e100c

45 files changed

Lines changed: 1146 additions & 800 deletions

Some content is hidden

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

.github/dependabot.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ updates:
77
labels:
88
- "part: github_actions"
99

10-
- package-ecosystem: "pip"
11-
directory: "/"
12-
schedule:
13-
interval: "monthly"
14-
labels:
15-
- "lang: python"
16-
- "part: dependencies"
10+
- updates:
11+
- package-ecosystem: "uv"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/copier.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
steps:
1515
- uses: actions-ext/copier-update@main
1616
with:
17-
token: ${{ secrets.WORKFLOW_TOKEN }}
17+
#token: ${{ secrets.WORKFLOW_TOKEN }}
18+
token: ${{ secrets.GITHUB_TOKEN }}

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/physics-workload.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ print-%:
121121
data: site school unit task
122122

123123
site:
124-
uv run manage.py loaddata site
124+
uv run manage.py loaddata site info
125125

126126
school: site
127127
uv run manage.py loaddata standard_load academic_group

app/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AcademicGroupAdmin(ModelAdmin):
2323
@admin.register(Unit)
2424
class UnitAdmin(ModelAdmin):
2525
"""
26-
Admin class for the Unit model.
26+
Admin class for the Module model.
2727
Uses the default settings, but here in case it needs expanding.
2828
"""
2929
pass

app/assets.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@
1212
attrs__async=True,
1313
)
1414
)
15+
16+
autosize_js: Dict[str, Any] = dict(
17+
autoexpand_js = Asset.js(
18+
attrs__src='/static/js/autosize.js',
19+
attrs__defer=True,
20+
)
21+
)

app/fixtures/info.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[
2+
{
3+
"model": "app.Info",
4+
"pk": 1,
5+
"fields": {
6+
"name": "Module",
7+
"page": "module",
8+
"text": "Modules/Units that are taught are listed here."
9+
}
10+
},
11+
{
12+
"model": "app.Info",
13+
"pk": 2,
14+
"fields": {
15+
"name": "Staff",
16+
"page": "staff",
17+
"text": "Academic staff with teaching responsibilities are listed here."
18+
}
19+
},
20+
{
21+
"model": "app.Info",
22+
"pk": 3,
23+
"fields": {
24+
"name": "Standard Load",
25+
"page": "standard_load",
26+
"text": "The equations and factors governing the load equations are set per year."
27+
}
28+
},
29+
{
30+
"model": "app.Info",
31+
"pk": 4,
32+
"fields": {
33+
"name": "Academic Group",
34+
"page": "academic_group",
35+
"text": "Academic Groups are listed here."
36+
}
37+
},
38+
{
39+
"model": "app.Info",
40+
"pk": 5,
41+
"fields": {
42+
"name": "Task",
43+
"page": "task",
44+
"text": "Roles or responsibilities that can be assigned to academic staff are listed here."
45+
}
46+
},
47+
{
48+
"model": "app.Info",
49+
"pk": 6,
50+
"fields": {
51+
"name": "About",
52+
"page": "about",
53+
"text": "This is a web app for assigning and balancing teaching workload for staff in the University of Southampton's Department of Physics."
54+
}
55+
}
56+
]

app/forms/standard_load.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def actions__submit__post_handler(form, request, **_) -> HttpResponse | None:
4646

4747
# Get the new standard load, and try to get the old from the DB if it exists
4848
standard_load_new: StandardLoad = form.instance
49-
standard_load_old: StandardLoad = StandardLoad.objects.get(pk=standard_load_new.pk)
49+
# We don't use this but let's ignore the warning for now
50+
standard_load_old: StandardLoad = StandardLoad.objects.get(pk=standard_load_new.pk) # noqa: F841
5051

5152
# We now have the 'old' in memory, and the 'new' in DB.
5253
# We need the 'new' in DB so that other models can see the updated values.

0 commit comments

Comments
 (0)