From 6de954c6c5cddaca45cf9b9e6cef6bac658d9ca4 Mon Sep 17 00:00:00 2001 From: Obada Haddad Date: Thu, 28 May 2026 14:32:34 +0200 Subject: [PATCH 1/4] docs: seperate Developers and Administrators tab --- .../Automating-with-Selenium.md | 73 ------------------- documentation/zensical.toml | 14 ++-- 2 files changed, 8 insertions(+), 79 deletions(-) delete mode 100644 documentation/docs/Developers_and_Administrators/Automating-with-Selenium.md diff --git a/documentation/docs/Developers_and_Administrators/Automating-with-Selenium.md b/documentation/docs/Developers_and_Administrators/Automating-with-Selenium.md deleted file mode 100644 index 76482641d..000000000 --- a/documentation/docs/Developers_and_Administrators/Automating-with-Selenium.md +++ /dev/null @@ -1,73 +0,0 @@ - -## What and Why -It's useful to test various parts of the system with lots of data or many intricate actions. The selenium tests do this generally and are used as a guide for this tutorial. One problem is that Selenium needs to launch an instance of a browser to control. Our tests do this inside a docker container and uses a test database that doesn't persist as it cleans up after itself. We need to be able to control a live codabench session that is running. To do that we install a driver locally which is normally only inside the selenium docker container during tests. It is specific to your browser so keep that in mind. - -## Virtualenv -You'll need a python virtual env as you don't want to be inside Django or you won't be able to launch a browser. - -### Virtualenv -I used 3.8. -```bash -python3 -m venv codabench -source ./codabench/bin/activate -``` - -### Pyenv -```bash -pyenv install 3.8 -pyenv virtualenv 3.8 codabench -pyenv activate codabench -``` - -## Requirements -We have a couple extra things like `webdriver-manager` for getting a driver programmatically and `selenium` needs to be upgraded to use modern client interface. -```bash -pip install -r requitements.txt -pip install -r requitements.dev.txt -pip install webdriver-manager -pip install --upgrade selenium -``` - -## Automate competition creation -[Main Selenium Docs](https://selenium-python.readthedocs.io/) -[Install](https://selenium-python.readthedocs.io/installation.html) -[Getting Started](https://selenium-python.readthedocs.io/getting-started.html) - -```python -import os, time -from selenium import webdriver -from selenium.webdriver.common.by import By -from selenium.webdriver.chrome.service import Service -from webdriver_manager.chrome import ChromeDriverManager - -# Use `ChromeDriverManager` to ensure the `chromedriver` is installed and in PATH -service = Service(ChromeDriverManager().install()) -driver = webdriver.Chrome(service=service) - -# ... now use `driver` to control the local Chrome instance -driver.get("http://localhost/accounts/login") - -# Use CSS selectors to find the input fields and button -username_input = driver.find_element(By.CSS_SELECTOR, 'input[name="username"]') -password_input = driver.find_element(By.CSS_SELECTOR, 'input[name="password"]') -submit_button = driver.find_element(By.CSS_SELECTOR, '.submit.button') - -# Type the credentials into the fields -username_input.send_keys('bbearce') -password_input.send_keys('testtest') - -# Click the submit button -submit_button.click() - -comp_path = "/home/bbearce/Documents/codabench/src/tests/functional/test_files/competition_v2_multi_task.zip" -def upload_competition(competition_zip_path): - driver.get("http://localhost/competitions/upload") - file_input = driver.find_element(By.CSS_SELECTOR, 'input[ref="file_input"]') - file_input.send_keys(os.path.join(competition_zip_path)) - - -for i in range(30): - upload_competition(comp_path) - time.sleep(5) # tune for your system - -``` \ No newline at end of file diff --git a/documentation/zensical.toml b/documentation/zensical.toml index 9382bb149..ef374ae7f 100644 --- a/documentation/zensical.toml +++ b/documentation/zensical.toml @@ -37,19 +37,21 @@ nav = [ {"Server Status" = "Organizers/Running_a_benchmark/Server-status-page.md"} ]} ]}, - {"Developers and Administrators" = [ - {"Codabench Basic Installation Guide" = "Developers_and_Administrators/Codabench-Installation.md"}, - {"How to Deploy a Server" = "Developers_and_Administrators/How-to-deploy-Codabench-on-your-server.md"}, - {"Administrative Procedures" = "Developers_and_Administrators/Administrator-procedures.md"}, + {"Developers" = [ {"Codabench Docker Architecture" = "Developers_and_Administrators/Codabench-Architecture.md"}, {"Submission Docker Container Layout" = "Developers_and_Administrators/Submission-Docker-Container-Layout.md"}, - {"Backups - Automating Creation and Restoring" = "Developers_and_Administrators/Creating-and-Restoring-from-Backup.md"}, {"Submission Process Overview" = "Developers_and_Administrators/Submission-Process-Overview.md"}, {"Robot Submissions" = "Developers_and_Administrators/Robot-submissions.md"}, {"Adding Tests" = "Developers_and_Administrators/Adding-e2e-tests.md"}, {"Running Tests" = "Developers_and_Administrators/Running-tests.md"}, - {"Automation" = "Developers_and_Administrators/Automating-with-Selenium.md"}, {"Manual Validation" = "Developers_and_Administrators/Manual-validation.md"}, + + ]}, + {"Administrators" = [ + {"Codabench Basic Installation Guide" = "Developers_and_Administrators/Codabench-Installation.md"}, + {"How to Deploy a Server" = "Developers_and_Administrators/How-to-deploy-Codabench-on-your-server.md"}, + {"Administrative Procedures" = "Developers_and_Administrators/Administrator-procedures.md"}, + {"Backups - Automating Creation and Restoring" = "Developers_and_Administrators/Creating-and-Restoring-from-Backup.md"}, {"Validation and deployement of pull requests" = "Developers_and_Administrators/Validation-and-deployment-of-pull-requests.md"}, {" Upgrading Codabench" = [ "Developers_and_Administrators/Upgrading_Codabench/index.md", From 2f88b20ac2d81c841ee164eba0e6a2930a9bb499 Mon Sep 17 00:00:00 2001 From: Obada Haddad Date: Thu, 28 May 2026 14:49:16 +0200 Subject: [PATCH 2/4] add index compatibility; update Codalab into Codabench in FAQ --- documentation/docs/Project_CodaBench_FAQ.md | 4 ++-- documentation/zensical.toml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/docs/Project_CodaBench_FAQ.md b/documentation/docs/Project_CodaBench_FAQ.md index 40f5ad780..e6e7f0fb8 100644 --- a/documentation/docs/Project_CodaBench_FAQ.md +++ b/documentation/docs/Project_CodaBench_FAQ.md @@ -5,8 +5,8 @@ Codabench benchmarks are aimed at researchers, scientists and other professionals who want to track algorithm performance via benchmarks or have participants participate in a competition to find the best solution to a problem. We run a free public instance at [https://www.codabench.org/](https://www.codabench.org/) and the raw code is on [Github](https://github.com/codalab/codabench). -### Can CodaLab competitions be privately hosted? -Yes, you can host your own CodaLab instance on a private or hosted server (e.g. Azure, GCP or AWS). For more information, see [how to deploy Codabench on your server](Developers_and_Administrators/How-to-deploy-Codabench-on-your-server.md) and [local installation](Developers_and_Administrators/Codabench-Installation.md) guide. However, most benchmark organizers do NOT need to run their own instance. If you run a computationally demanding competition, you can hook up your own [compute workers](Organizers/Running_a_benchmark/Compute-Worker-Management---Setup.md) in the backend very easily. +### Can Codabench be privately hosted? +Yes, you can host your own Codabench instance on a private or hosted server (e.g. Azure, GCP or AWS). For more information, see [how to deploy Codabench on your server](Developers_and_Administrators/How-to-deploy-Codabench-on-your-server.md) and [local installation](Developers_and_Administrators/Codabench-Installation.md) guide. However, most benchmark organizers do NOT need to run their own instance. If you run a computationally demanding competition, you can hook up your own [compute workers](Organizers/Running_a_benchmark/Compute-Worker-Management---Setup.md) in the backend very easily. ### How to change my username? diff --git a/documentation/zensical.toml b/documentation/zensical.toml index ef374ae7f..dac4ed824 100644 --- a/documentation/zensical.toml +++ b/documentation/zensical.toml @@ -98,6 +98,7 @@ features = [ "navigation.expand", "navigation.instant", "navigation.instant.progress", + "navigation.indexes", ] font = false # Palette toggle for automatic mode From f8a838b1b716dbbb104466e4b753fe2a31c11e20 Mon Sep 17 00:00:00 2001 From: Obada Haddad Date: Thu, 28 May 2026 14:54:25 +0200 Subject: [PATCH 3/4] add glightbox support to be able to zoom on pictures --- documentation/zensical.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/zensical.toml b/documentation/zensical.toml index dac4ed824..bcea84633 100644 --- a/documentation/zensical.toml +++ b/documentation/zensical.toml @@ -157,6 +157,7 @@ configurations = [ ]} ] [project.markdown_extensions.pymdownx.smartsymbols] +[project.markdown_extensions.zensical.extensions.glightbox] # Extras [project.extra] footer_links = [ From 9ca7f727a09690be023a1ad5cf34592b5b559a05 Mon Sep 17 00:00:00 2001 From: Obada Haddad Date: Thu, 28 May 2026 16:40:40 +0200 Subject: [PATCH 4/4] move robot submission to Participant tab --- documentation/zensical.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/zensical.toml b/documentation/zensical.toml index bcea84633..77b19b19f 100644 --- a/documentation/zensical.toml +++ b/documentation/zensical.toml @@ -7,6 +7,7 @@ nav = [ {"Home" = "index.md"}, {"Participants" = [ {"Participating in a Competition" = "Participants/User_Participating-in-a-Competition.md"}, + {"Robot Submissions" = "Developers_and_Administrators/Robot-submissions.md"}, {"List of Current Benchmarks and Competitions" = "https://www.codabench.org/competitions/public/?page=1"} ]}, {"Organizers" = [ @@ -41,7 +42,6 @@ nav = [ {"Codabench Docker Architecture" = "Developers_and_Administrators/Codabench-Architecture.md"}, {"Submission Docker Container Layout" = "Developers_and_Administrators/Submission-Docker-Container-Layout.md"}, {"Submission Process Overview" = "Developers_and_Administrators/Submission-Process-Overview.md"}, - {"Robot Submissions" = "Developers_and_Administrators/Robot-submissions.md"}, {"Adding Tests" = "Developers_and_Administrators/Adding-e2e-tests.md"}, {"Running Tests" = "Developers_and_Administrators/Running-tests.md"}, {"Manual Validation" = "Developers_and_Administrators/Manual-validation.md"},