Skip to content
4 changes: 2 additions & 2 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DB_PORT=5432

DJANGO_SETTINGS_MODULE=settings.develop
ALLOWED_HOSTS=localhost,example.com
SUBMISSIONS_API_URL=http://localhost/api
SUBMISSIONS_API_URL=http://django:8000/api

# Local domain definition
DOMAIN_NAME=localhost:80
Expand Down Expand Up @@ -56,7 +56,7 @@ AWS_SECRET_ACCESS_KEY=testsecret
AWS_STORAGE_BUCKET_NAME=public
AWS_STORAGE_PRIVATE_BUCKET_NAME=private
# NOTE! port 9000 here should match $MINIO_PORT
AWS_S3_ENDPOINT_URL=http://localhost:9000/
AWS_S3_ENDPOINT_URL=http://minio:9000/
AWS_QUERYSTRING_AUTH=False

# # S3 storage example
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ services:
/bin/sh -c "
set -x
while ! nc -z minio 9000; echo 'Waiting for minio to startup...' && sleep 0.1; sleep 3;
until (/usr/bin/mc config host add minio_docker http://minio:$MINIO_PORT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY) do echo '...waiting...' && sleep 1; done;
until (/usr/bin/mc config host add minio_docker http://minio:$MINIO_PORT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY) do echo '...waiting...' && sleep 3; done;
/usr/bin/mc mb minio_docker/$AWS_STORAGE_BUCKET_NAME;
/usr/bin/mc mb minio_docker/$AWS_STORAGE_PRIVATE_BUCKET_NAME;
/usr/bin/mc policy set download minio_docker/$AWS_STORAGE_BUCKET_NAME;
/usr/bin/mc anonymous set download minio_docker/$AWS_STORAGE_BUCKET_NAME;
exit 0;
"

Expand Down
19 changes: 19 additions & 0 deletions src/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,25 @@ <h2 class="subtitle"><h1> BETA </h1></h2>
{% endblock %}

{% block content %}
<div style="margin:auto;" class="segment-container ui segment full-width">
<div class="ui header">
<p>Announcement</p>
</div>
<div class="container-content">
<div class="center aligned column">
<h3 class="ui icon header">
<!-- <i class="trophy icon"></i> -->
</h3>
<div>
<p>There is a planned maintenance for storage servers connected to Codalab.lisn.fr and codabench.org in Paris-Saclay.</p>
<p style="color: red">Service will be interrupted from March, 28th 8:00 CET to approximately 15:00 CET.</p>
<p>Portal will be accessible read-only: NO submission can be processed. We apologize for inconvenience.</p>
<p style="font-weight: bold;">your Codalab Team</p>
</div>
</div>
</div>
</div>

<div class="home-wrap">
<front-page-competitions></front-page-competitions>

Expand Down
31 changes: 17 additions & 14 deletions src/tests/functional/test_competitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from tasks.models import Task
from ..utils import SeleniumTestCase

SHORT_WAIT = 0.1
LONG_WAIT = 2


class TestCompetitions(SeleniumTestCase):
def setUp(self):
Expand Down Expand Up @@ -64,16 +67,16 @@ def test_manual_competition_creation(self):
self.execute_script('$("select[selenium=\'type\']").dropdown("set selected", "scoring_program")')
self.find('input-file[selenium="file"] input').send_keys(os.path.join(self.test_files_dir, 'scoring_program.zip'))
self.find('i[selenium="upload"]').click()
sleep(LONG_WAIT)

sleep(2)
# Task Creation
self.find('div[data-tab="tasks"]').click()
self.find('div[selenium="create-task"]').click()
self.find('input[selenium="name2"]').send_keys('nAmE')
self.find('textarea[selenium="task-desc"]').send_keys('textbox')
self.find('div[data-tab="data"]').click()
self.find('input[id="scoring_program"]').send_keys('sco')
sleep(.5)
sleep(LONG_WAIT)
self.execute_script('$("div[selenium=\'scoring-program\'] a")[0].click()')
self.find('div[selenium="save-task"]').click()

Expand All @@ -87,43 +90,43 @@ def test_manual_competition_creation(self):
# Participation Tab
self.find('a[data-tab="participation"]').click()
self.execute_script('$("textarea[ref=\'terms\']")[0].EASY_MDE.value("pArTiCiPaTe")')
sleep(2)
sleep(LONG_WAIT)
self.find('input[selenium="auto-approve"]').click()

# Pages Tab
self.find('a[data-tab="pages"]').click()
self.find('i[class="add icon"]').click()
self.find('input[selenium="title"]').send_keys('Title')
self.execute_script('$("textarea[ref=\'content\']")[0].EASY_MDE.value("Testing123")')
sleep(1)
sleep(LONG_WAIT)
self.find('div[selenium="save1"]').click()
sleep(1)
sleep(LONG_WAIT)

# Phases Tab
self.find('a[data-tab="phases"]').click()
self.find('i[selenium="add-phase"]').click()
sleep(1)
sleep(LONG_WAIT)
self.find('form[selenium="phase-form"] input[name="name"]').send_keys('Name')
sleep(.1)
sleep(SHORT_WAIT)
self.find('input[name="start"]').click()
self.find('input[name="start"]').send_keys(2)
self.find('input[name="start"]').send_keys(Keys.ENTER)
self.find('input[name="end"]').send_keys(3)
self.find('input[name="end"]').send_keys(Keys.ENTER)
self.find('label[for="tasks"]').click()
sleep(.1)
sleep(SHORT_WAIT)
self.find("form[selenium='phase-form'] input.search").send_keys("Wheat")
sleep(.1)
sleep(SHORT_WAIT)
tasks = Task.objects.all()
import random
random_task = random.choice(tasks)
task = random_task.key
self.find(f"form[selenium='phase-form'] .menu .item[data-value='{task}']").click()
self.execute_script('$("textarea[ref=\'description\']")[0].EASY_MDE.value("Testing123")')
self.find('form[selenium="phase-form"] input[name="name"]').send_keys('Name')
sleep(1)
sleep(LONG_WAIT)
self.find('div[selenium="save2"]').click()
sleep(1)
sleep(LONG_WAIT)

# Leaderboard Tab
leaderboard_title = 'tItLe'
Expand All @@ -132,12 +135,12 @@ def test_manual_competition_creation(self):
self.find('input[selenium="title1"]').send_keys(leaderboard_title)
self.find('input[selenium="key"]').send_keys('kEy')
self.find('div[selenium="add-column"]').click()
sleep(1)
sleep(LONG_WAIT)
self.find('input[selenium="column-key"]').send_keys('cOlUmN kEy')
self.find('input[selenium="hidden"]').click()
self.find('div[selenium="save3"]').click()
sleep(2)
sleep(LONG_WAIT)
assert not Competition.objects.filter(title=competition_title).exists()
self.find('button[selenium="save4"]').click()
sleep(1)
sleep(LONG_WAIT)
assert Competition.objects.filter(title=competition_title).exists()