Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .assets-revision
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
# is a git revision (branch name like `main`, a tag, or a specific commit
# sha). Override at runtime with the ASSETS_REVISION env var.
repo: ChilleD/WebHarbor
revision: 54882a6a66a17a3e43455057e7c9e0d103cd8b81
# Pinned to HF PR #37 (adds kaggle.tar.gz on top of a main that already includes
# the current 16 sites) so this reviewer PR builds end-to-end before the assets PR
# is merged. Maintainer: once https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/37
# is rebased onto HF main and merged, bump this to the merged commit SHA.
revision: refs/pr/37
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ COPY control_server.py /opt/control_server.py
COPY site_runner.py /opt/site_runner.py
RUN chmod +x /opt/websyn_start.sh

EXPOSE 8101 40000-40015
EXPOSE 8101 40000-40016

CMD ["/opt/websyn_start.sh"]
2 changes: 1 addition & 1 deletion control_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'allrecipes', 'amazon', 'apple', 'arxiv', 'bbc_news', 'booking',
'github', 'google_flights', 'google_map', 'google_search',
'huggingface', 'wolfram_alpha', 'cambridge_dictionary',
'coursera', 'espn', 'merriam_webster',
'coursera', 'espn', 'merriam_webster', 'kaggle',
]
BASE_PORT = 40000
WEBSYN_DIR = '/opt/WebSyn'
Expand Down
45 changes: 45 additions & 0 deletions sites/kaggle/_health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""kaggle mirror health check."""
from healthcheck import random_user


def run(p):
p.assert_get('home', '/', must_contain='Kaggle')
p.assert_get('competitions', '/competitions', must_contain='Competitions')
p.assert_get('search fraud', '/search?q=fraud', must_contain='fraud')
p.assert_get(
'competition detail',
'/competitions/credit-default-risk-2026',
must_contain='ROC AUC',
)
p.assert_get('dataset detail', '/datasets/credit-card-fraud-transactions',
must_contain='About this Dataset')
p.assert_get('rankings', '/rankings', must_contain='Rankings')

user = random_user()
html = p.assert_get('register page', '/register')
token = p.csrf(html)
if not token:
p.check('register csrf', False, 'no csrf')
return
p.assert_post('register submit', '/register', {
'csrf_token': token,
'username': user['username'],
'email': user['email'],
'password': user['password'],
'confirm': user['password'],
}, accept_status=(200, 302, 303))

p.get('/logout')

html = p.assert_get('login page', '/login')
token = p.csrf(html)
if not token:
p.check('login csrf', False, 'no csrf')
return
p.assert_post('login submit', '/login', {
'csrf_token': token,
'email': user['email'],
'password': user['password'],
}, accept_status=(200, 302, 303))

p.assert_get('account page', '/account', accept_status=(200, 302))
Loading