Skip to content

Commit 6f284b2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into release
2 parents 1208607 + ead8ffd commit 6f284b2

Some content is hidden

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

42 files changed

+5522
-5634
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ updates:
99
labels:
1010
- "[T] Dependencies"
1111
versioning-strategy: "increase-if-necessary"
12+
ignore:
13+
- dependency-name: "django-stubs"
14+
update-types: ["version-update:semver-patch"]
15+
- dependency-name: "ruff"
16+
update-types: ["version-update:semver-patch"]
1217
- package-ecosystem: "npm"
1318
directory: "/"
1419
schedule:

deployment/localsettings.template.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
DATABASES = {
66
'default': {
7-
'ENGINE': 'django.db.backends.postgresql', # postgresql', 'mysql', 'sqlite3' or 'oracle'.
8-
'NAME': 'evap', # Or path to database file if using sqlite3.
9-
'USER': 'evap', # Not used with sqlite3.
10-
'PASSWORD': 'evap', # Not used with sqlite3.
11-
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
12-
'PORT': '', # Set to empty string for default. Not used with sqlite3.
7+
'ENGINE': 'django.db.backends.postgresql',
8+
'NAME': 'evap',
9+
'USER': 'evap',
10+
'PASSWORD': 'evap',
11+
'HOST': '127.0.0.1', # Set to empty string for localhost.
12+
'PORT': '', # Set to empty string for default.
1313
'CONN_MAX_AGE': 600,
1414
}
1515
}

deployment/provision_vagrant_vm.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ cp /etc/skel/.bashrc /home/$USER/
4444
OWNER=$(stat -c %u "$MOUNTPOINT/evap")
4545
apt-get -q install -y bindfs
4646
mkdir -p "$REPO_FOLDER"
47-
bindfs --map="$OWNER/1042:@$OWNER/@1042" "$MOUNTPOINT" "$REPO_FOLDER" || exit 1
47+
# remount if REPO_FOLDER does not contain any files (meaning it is not mounted)
48+
if [[ -z $(ls -A "$REPO_FOLDER") ]]; then
49+
bindfs --map="$OWNER/1042:@$OWNER/@1042" "$MOUNTPOINT" "$REPO_FOLDER" || exit 1
50+
else
51+
echo "Skipped trying to mount $REPO_FOLDER - a mounted folder was already detected."
52+
fi
4853
echo "[[ -z \$(ls -A '$REPO_FOLDER') ]] && sudo bindfs --map='$OWNER/1042:@$OWNER/@1042' '$MOUNTPOINT' '$REPO_FOLDER' # remount iff folder empty" >> /home/$USER/.bashrc
4954

5055
# allow ssh login

evap/evaluation/templates/confirmation_text_modal.html

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

evap/evaluation/templatetags/evaluation_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
APPROVAL_STATES = {
4949
Evaluation.State.NEW: StateValues(
5050
0,
51-
"fas fa-circle icon-yellow",
51+
"fas fa-circle icon-blue",
5252
Evaluation.State.NEW,
5353
_("In preparation"),
5454
),
@@ -60,7 +60,7 @@
6060
),
6161
Evaluation.State.EDITOR_APPROVED: StateValues(
6262
1,
63-
"far fa-square-check icon-yellow",
63+
"far fa-square-check icon-blue",
6464
Evaluation.State.EDITOR_APPROVED,
6565
_("Approved by editor, awaiting manager review"),
6666
),

evap/evaluation/tests/tools.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,18 @@ def test_check_response_code_200(self):
126126
self.app.get(self.url, user=user, status=200)
127127

128128

129-
def submit_with_modal(page: webtest.TestResponse, form: webtest.Form, *, name: str, value: str) -> webtest.TestResponse:
129+
def submit_with_modal(
130+
page: webtest.TestResponse, form: webtest.Form, *, name: str, value: str, **kwargs
131+
) -> webtest.TestResponse:
130132
# Like form.submit, but looks for a modal instead of a submit button.
131133
assert page.forms[form.id] == form
132134
assert page.html.select_one(f"confirmation-modal[type=submit][name={name}][value={value}]")
133135
params = form.submit_fields() + [(name, value)]
134-
return form.response.goto(form.action, method=form.method, params=params)
136+
return form.response.goto(form.action, method=form.method, params=params, **kwargs)
135137

136138

137139
def get_form_data_from_instance(form_cls, instance, **kwargs):
138-
assert form_cls._meta.model == type(instance)
140+
assert form_cls._meta.model is type(instance)
139141
form = form_cls(instance=instance, **kwargs)
140142
return {field.html_name: field.value() for field in form}
141143

0 commit comments

Comments
 (0)