Skip to content

Commit dd43dc5

Browse files
committed
Fabfile tweaks
1 parent e7b101b commit dd43dc5

10 files changed

Lines changed: 216 additions & 159 deletions

File tree

Pipfile.lock

Lines changed: 40 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/config_data/docking/docking.challenge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Example Docking Challenge
2-
#key: example_docking
32
start_at: 2022-08-12 04:00:00
43
end_at: 2023-09-05 22:00:00
54
repo_url: https://github.com

app/core/models/admin_managed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ def save_score(self, submission_run, score_type, value):
202202
self.evaluationscore_set.create(
203203
submission_run=submission_run, score_type=score_type, value=float(value)
204204
)
205+
print("EVAL SCORE COUNT:", self.evaluationscore_set.count())
206+
print("Evaluation scores:", self.evaluationscore_set.all())
205207

206208
def __str__(self):
207209
return f"{self.name}, is public? {self.is_public}"

app/referee/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ def run_eval_or_batch(
281281
models.Prediction.load_evaluation_output(
282282
challenge, obj, output_type, value
283283
)
284+
obj.clear_old_scores()
284285

285286
if is_batch:
286287
obj.batchup()
@@ -301,7 +302,6 @@ def run_eval_or_batch(
301302
):
302303
obj.append(log_message)
303304

304-
obj.clear_old_scores()
305305
obj.status = models.Status.SUCCESS
306306
except CancelledException:
307307
obj.status = models.Status.CANCELLED
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -e
2+
3+
sudo mv /home/ec2-user/deploy_files/set_staging.sh /var/app/current/
4+
5+
sudo -i -u webapp << 'EOF'
6+
source /var/app/current/.venv/bin/activate
7+
8+
source /var/app/current/set_staging.sh
9+
10+
cd /var/app/current/
11+
12+
python manage.py createsuperuser --no-input
13+
14+
python manage.py sample_data --delete
15+
EOF
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash -e
22

3-
DEPLOY_FILES_DIR="/home/ec2-user/deploy_files"
3+
# DEPLOY_FILES_DIR="/home/ec2-user/deploy_files"
44

5-
sudo mv $DEPLOY_FILES_DIR/env /opt/env/env
5+
# sudo mv $DEPLOY_FILES_DIR/env /opt/env/env
66

77
#sudo pkill -HUP gunicorn
88

deploy_files/setup_djangoapp.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash -e
22

3-
sudo mv /home/ec2-user/deploy_files/set_staging.sh /var/app/current/
3+
if [ ! -e /var/app/current/set_staging.sh ]
4+
then
5+
echo "set_staging.sh must be created before running this command"
6+
fi
47

58
sudo -i -u webapp << 'EOF'
69
source /var/app/current/.venv/bin/activate
@@ -15,7 +18,4 @@ python manage.py makemigrations
1518
1619
python manage.py migrate --no-input
1720
18-
python manage.py createsuperuser --no-input
19-
20-
python manage.py sample_data --delete
2121
EOF

ever_given/Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ name = "pypi"
66
[packages]
77
ever-given = {editable = true, path = "."}
88
docker = "*"
9+
build = "*"
910

1011
[requires]
1112
python_version = "3.8"

0 commit comments

Comments
 (0)