Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b5d8d91
version bump (#2076)
ObadaS Dec 8, 2025
9eb15b8
banned user functionality added
ihsaan-ullah Dec 8, 2025
6310616
middleware updated to return different responses for normal page visi…
ihsaan-ullah Dec 9, 2025
10abb4c
comment removed
ihsaan-ullah Dec 9, 2025
c19da2d
docs updated for ban users
ihsaan-ullah Dec 9, 2025
6c9639a
Merge pull request #2078 from codalab/ban_users
ObadaS Dec 9, 2025
a1de8c2
fix to run result sbmission(with copy to predictions dir)
ihsaan-ullah Jun 17, 2025
c4892cb
chahub cleanup
ihsaan-ullah Jun 23, 2025
a26b10d
ompute worker code reverted
ihsaan-ullah Jun 23, 2025
89a3d62
fixed migration
ihsaan-ullah Jun 23, 2025
1405c50
removed chahub app, updated UserManager
ihsaan-ullah Jun 23, 2025
c16947c
compute worker spaces removed
ihsaan-ullah Dec 9, 2025
a5f708c
added new migrations (makemigrations --merge)
Dec 10, 2025
6900d4a
Merge pull request #1893 from codalab/chahub_cleanup
ObadaS Dec 10, 2025
7b83d34
Changed domain name setting to not show example.com but the actual do…
Aug 8, 2025
c0d66d9
Merge pull request #1965 from codalab/domainNameFix
ihsaan-ullah Dec 10, 2025
2376921
Submission delete API bug fixed. More restrictions added
ihsaan-ullah Jun 28, 2025
7b68de9
tests updated and fixed
ihsaan-ullah Jun 29, 2025
f1c9ddd
missing condition added, new test added for missing condition
ihsaan-ullah Jun 30, 2025
8d9b59c
Merge pull request #1900 from codalab/submission_deletion
ObadaS Dec 10, 2025
bd99085
phase creation from ui with starting kit/public data bug fixed
ihsaan-ullah Jul 7, 2025
90cfc91
Merge pull request #1915 from codalab/public_data
ObadaS Dec 10, 2025
d277af0
datasets api delete tests added
ihsaan-ullah Oct 13, 2025
2511954
Merge pull request #2033 from codalab/dataset_api
ObadaS Dec 10, 2025
a1699fa
added CONTACT_EMAIL to env, and used it in the code where needed
ihsaan-ullah Nov 11, 2025
492316f
Merge pull request #2060 from codalab/email_updates
ObadaS Dec 10, 2025
9924e09
change old wiki link to docs.codabench.org links
Dec 10, 2025
6d3766f
more old wiki link replacements
Dec 10, 2025
4b7a5b0
change http to https for the documentation links
Dec 10, 2025
45a98fc
fix missing documentation link
Dec 10, 2025
3cce6ff
replaced by in multiple files
ihsaan-ullah Dec 11, 2025
3036a5a
Merge pull request #2080 from codalab/wikiMigration
ObadaS Dec 11, 2025
6692f7d
Initial Playwright integration (#2042)
ObadaS Dec 11, 2025
9ef9a96
Uncomment partners logos in home.html
Didayolo Dec 10, 2024
e18833f
remaining references of chahub removed
ihsaan-ullah Dec 15, 2025
ce8b1bd
Merge pull request #1700 from codalab/partners-logos-new
ObadaS Dec 15, 2025
c24d5b7
Colored JSON logs; Made run argument prettier for compute worker
Oct 10, 2025
aca97c1
ruff formatting, remove useless jupyter code
Dec 12, 2025
837225f
add more descriptive comments about colors choices
Dec 12, 2025
a084263
Merge branch 'prettyJsonRun' into 'develop'
wlln Dec 16, 2025
b8ad0f9
Merge pull request #2086 from codalab/chahub_cleanup_2
ObadaS Dec 18, 2025
24d9a95
removed and from docs
ihsaan-ullah Dec 23, 2025
eb87bfb
Merge pull request #2093 from codalab/docs_updates
ObadaS Dec 23, 2025
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
75 changes: 47 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ version: 2
jobs:
test:
machine:
image: ubuntu-2204:2024.01.2
image: ubuntu-2404:2025.09.1
resource_class: large
steps:
- checkout

- run:
# NOTE: To connect to this, use an SSH tunnel in front, like so..
#
Expand All @@ -22,54 +22,73 @@ jobs:
# x11vnc -forever -nopw
background: true

- run:
- run:
name: "Setup: Copy environment variables"
command: cp .env_circleci .env


- run:
name: "Setup: Create directories for MinIO (cannot be made by docker for some reason)"
command: |
sudo mkdir -p var/minio/public
sudo mkdir -p var/minio/private
mkdir -p var/minio/public
mkdir -p var/minio/private

- run:
name: "Docker: Build containers and collect static files"
name: "Setup: Prepare the playwright environment"
command: |
docker compose -f docker-compose.yml -f docker-compose.selenium.yml up -d
docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django python manage.py collectstatic --noinput

- run:
name: "Lint: Check code style with flake8"
command: docker-compose exec django flake8 src/


- run:
cd tests
apt update && apt upgrade -y
curl -LsSf https://astral.sh/uv/install.sh | sh
$HOME/.local/bin/uv sync --frozen
$HOME/.local/bin/uv run playwright install
- run:
name: "Docker: Pull required images"
# not available without "not e2e" tests as they pull ahead of time
command: |
docker pull codalab/codalab-legacy:py37
docker pull codalab/codalab-legacy:py3
docker pull vergilgxw/autotable:v2
docker pull codalab/codalab-legacy:py37
docker pull codalab/codalab-legacy:py3
docker pull vergilgxw/autotable:v2
background: true

- run:
name: "Docker: Build containers and collect static files"
command: |
docker compose up -d
docker compose exec django python manage.py collectstatic --noinput
docker compose exec django python manage.py migrate
docker compose exec django python ./manage.py createsuperuser --no-input

- run:
name: "Get compute worker, site worker and django logs"
command: |
mkdir dockerLogs
docker compose logs -f site_worker compute_worker django > dockerLogs/django_workers.log
background: true

- run:
name: "Lint: Check code style with flake8"
command: docker compose exec django flake8 src/

- run:
name: "Tests: Run unit/integration tests (excluding e2e)"
command: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/ -m "not e2e"
command: docker compose exec django py.test src/ -m "not e2e"

# We give the name of the test files manually because we need test_auth.py to be run before the others for state.json file to be created
# CI="true" to skip some tests that fail in the CI for now
- run:
name: "Tests: Run end-to-end (E2E) tests"
command: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/tests/functional/ -m e2e
no_output_timeout: 60m
command: |
cd tests && CI="true" $HOME/.local/bin/uv run pytest test_auth.py test_account_creation.py test_competition.py test_submission.py
no_output_timeout: 30m

# Example to run specific set of tests (for debugging individual tests from a batch of tests)
# - run:
# name: e2e tests - competitions
# command: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/tests/functional/test_competitions.py -m e2e
# no_output_timeout: 60m


# name: "Tests: Run end-to-end (E2E) tests"
# command: cd tests && $HOME/.local/bin/uv run pytest test_auth.py test_competition.py
# no_output_timeout: 30m
- store_artifacts:
path: tests/test-results
- store_artifacts:
path: artifacts/
path: dockerLogs/

workflows:
version: 2
Expand Down
6 changes: 6 additions & 0 deletions .env_circleci
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ AWS_STORAGE_PRIVATE_BUCKET_NAME=private
# NOTE! port 9000 here should match $MINIO_PORT
AWS_S3_ENDPOINT_URL=http://172.17.0.1:9000/
AWS_QUERYSTRING_AUTH=False
DJANGO_SUPERUSER_PASSWORD=codabench
DJANGO_SUPERUSER_EMAIL=test@test.com
DJANGO_SUPERUSER_USERNAME=codabench
DOMAIN_NAME=localhost:80
TLS_EMAIL=your@email.com
SUBMISSIONS_API_URL=http://django:8000/api
2 changes: 2 additions & 0 deletions .env_sample
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ SELENIUM_HOSTNAME=selenium
#DEFAULT_FROM_EMAIL="Codabench <noreply@example.com>"
#SERVER_EMAIL=noreply@example.com

# Contact Email
CONTACT_EMAIL=info@codabench.org

# -----------------------------------------------------------------------------
# Storage
Expand Down
15 changes: 7 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
## 1. Being a Codabench user.

- Create a user account on https://codalab.lisn.fr and on https://codabench.org.
- Register on https://codabench.org to this existing competition (IRIS-tuto) https://www.codabench.org/competitions/1115/ and make a submission (from https://github.com/codalab/competition-examples/tree/master/codabench/iris): sample_result_submission and sample_code_submission. See https://github.com/codalab/codabench/wiki/User_Participating-in-a-Competition
- Create your own private competition (from https://github.com/codalab/competition-examples/tree/master/codabench/ ). See https://github.com/codalab/codabench/wiki/Getting-started-with-Codabench
- Register on https://codabench.org to this existing competition (IRIS-tuto) https://www.codabench.org/competitions/1115/ and make a submission (from https://github.com/codalab/competition-examples/tree/master/codabench/iris): sample_result_submission and sample_code_submission. See https://docs.codabench.org/latest/Participants/User_Participating-in-a-Competition/
- Create your own private competition (from https://github.com/codalab/competition-examples/tree/master/codabench/ ). See https://docs.codabench.org/latest/Organizers/Benchmark_Creation/Getting-started-with-Codabench/

## 2. Setting a local instance of Codabench.

- Follow the tutorial in codabench wiki: https://github.com/codalab/codabench/wiki/Codabench-Installation. According to your hosting OS, you might have to tune your environment file a bit. Try without enabling the SSL protocol (doing so, you don't need a domain name for the server). Try using the embedded Minio storage solution instead of a private cloud storage.
- If needed, you can also look into https://github.com/codalab/codabench/wiki/How-to-deploy-Codabench-on-your-server
- Follow the tutorial in codabench docs: https://docs.codabench.org/latest/Developers_and_Administrators/Codabench-Installation/. According to your hosting OS, you might have to tune your environment file a bit. Try without enabling the SSL protocol (doing so, you don't need a domain name for the server). Try using the embedded Minio storage solution instead of a private cloud storage.
- If needed, you can also look into https://docs.codabench.org/latest/Developers_and_Administrators/How-to-deploy-Codabench-on-your-server/

## 3. Using one's local instance

- Create your own competition and play with it. You can look at the output logs of each different docker container.
- Setting you as an admin of your platform (https://github.com/codalab/codabench/wiki/Administrator-procedures#give-superuser-privileges-to-an-user) and visit the Django Admin menu: https://github.com/codalab/codabench/wiki/Administrator-procedures#give-superuser-privileges-to-an-user

- Setting you as an admin of your platform (https://docs.codabench.org/latest/Developers_and_Administrators/Administrator-procedures/#give-superuser-privileges-to-a-user) and visit the Django Admin menu: https://docs.codabench.org/latest/Developers_and_Administrators/Administrator-procedures/#give-superuser-privileges-to-a-user
## 4. Setting an autonomous computer-worker on your PC

- Configure and launch the docker container: https://github.com/codalab/codabench/wiki/Compute-Worker-Management---Setup
- Create a private queue on your new own competition on the production server codabench.org: https://github.com/codalab/codabench/wiki/Queue-Management#create-queue
- Configure and launch the docker container: https://docs.codabench.org/latest/Organizers/Running_a_benchmark/Compute-Worker-Management---Setup/
- Create a private queue on your new own competition on the production server codabench.org: https://docs.codabench.org/latest/Organizers/Running_a_benchmark/Queue-Management/#create-queue
- Assign your own compute-worker to this private queue instead of the default queue.
63 changes: 63 additions & 0 deletions .github/workflows/tests.yml.DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: build_and_test
on: [push]
jobs:
build:
name: Build necessary services
# runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: "Setup: Copy environment variables"
run: cp .env_circleci .env
- name: "Setup: Create directories for MinIO (cannot be made by docker for some reason)"
run: |
mkdir -p var/minio/public
mkdir -p var/minio/private
- name: "Setup: Prepare the playwright environment"
run: |
cd playwrightPython
curl -LsSf https://astral.sh/uv/install.sh | sh
$HOME/.local/bin/uv sync
$HOME/.local/bin/uv run playwright install
- name: "Docker: Build containers and collect static files"
run: |
docker compose -f docker-compose.yml -f docker-compose.selenium.yml up -d
docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django python manage.py collectstatic --noinput
docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django python manage.py migrate
docker compose -f docker-compose.yml exec django python ./manage.py createsuperuser --no-input
- name: "Docker: Pull required images"
run: |
docker pull codalab/codalab-legacy:py37
docker pull codalab/codalab-legacy:py3
linter:
name: Flake8 linter
runs-on: self-hosted
needs: [build]
steps:
- name: "Lint: Check code style with flake8"
run: docker compose exec django flake8 src/
unit_tests:
name: Unit test with Selenium
runs-on: self-hosted
needs: [linter,build]
steps:
- name: "Tests: Run unit/integration tests (excluding e2e)"
run: docker compose -f docker-compose.yml -f docker-compose.selenium.yml exec django py.test src/ -m "not e2e"
e2e:
name: End to End tests with Playwright
runs-on: self-hosted
needs: [linter,build]
steps:
- name: "Tests: Run end-to-end (E2E) tests"
run: cd playwrightPython && $HOME/.local/bin/uv run pytest test_auth.py test_account_creation.py test_competition.py test_submission.py
cleanup:
name: Cleanup
runs-on: self-hosted
if: ${{ always() }}
needs: [unit_tests,e2e,linter]
steps:
- name: Cleanup
run: |
docker compose -f docker-compose.yml -f docker-compose.selenium.yml down --rmi all
rm -rf ${{ github.workspace }}/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To see Codabench in action, visit [codabench.org](https://www.codabench.org/).

## Documentation

- [Codabench Wiki](https://github.com/codalab/codabench/wiki)
- [Codabench Docs](https://docs.codabench.org)


## Quick installation (for Linux)
Expand All @@ -30,7 +30,7 @@ You can now login as username "admin" with password "admin" at http://localhost/

If you ever need to reset the database, use the script `./reset_db.sh`

For more information about installation, checkout [Codabench Basic Installation Guide](https://github.com/codalab/codabench/wiki/Codabench-Installation) and [How to Deploy Server](https://github.com/codalab/codabench/wiki/How-to-deploy-Codabench-on-your-server).
For more information about installation, checkout [Codabench Basic Installation Guide](https://docs.codabench.org/latest/Developers_and_Administrators/Codabench-Installation/) and [How to Deploy Server](https://docs.codabench.org/latest/Developers_and_Administrators/How-to-deploy-Codabench-on-your-server/).


## License
Expand Down
6 changes: 4 additions & 2 deletions compute_worker/compute_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
from celery import signals
import logging
logger = logging.getLogger(__name__)
from logs_loguru import configure_logging
from logs_loguru import configure_logging,colorize_run_args
import json


# -----------------------------------------------
# Celery + Rabbit MQ
Expand Down Expand Up @@ -115,7 +117,7 @@ class ExecutionTimeLimitExceeded(Exception):
# -----------------------------------------------------------------------------
@shared_task(name="compute_worker_run")
def run_wrapper(run_args):
logger.info(f"Received run arguments: {run_args}")
logger.info(f"Received run arguments: \n {colorize_run_args(json.dumps(run_args))}")
run = Run(run_args)

try:
Expand Down
18 changes: 0 additions & 18 deletions docker-compose.selenium.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/example_scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ These scripts have been built solely to improve users' understanding of the API
and expressly not as utility scripts. They can serve as starting places, but they
ought not be solely relied upon for automation.

They exist here for easy testing of robot submissions outlined [here](https://github.com/codalab/competitions-v2/wiki/Robot-submissions).
They exist here for easy testing of robot submissions outlined [here](https://docs.codabench.org/latest/Developers_and_Administrators/Robot-submissions/).
12 changes: 6 additions & 6 deletions documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Welcome to the Codabench Documentation.

You can access the documentation generated from this folder [here](https://codalab.org/codabench/latest/)

If you want to contribute to the wiki, you can create a Pull Request modifying the files you want (located in `docs/`) while adding a quick explanation on what you have changed and why.
If you want to contribute to the docs, you can create a Pull Request modifying the files you want (located in `docs/`) while adding a quick explanation on what you have changed and why.


When creating a Pull Request to modify the core code of Codabench, you can also include the wiki modification by modifying the relevant files. Once the Pull Request is merged, the wiki will automatically be updated with your changes (`dev` tag when it's merged into develop, and the `latest` version of the wiki once it's merged in master)
When creating a Pull Request to modify the core code of Codabench, you can also include the docs modification by modifying the relevant files. Once the Pull Request is merged, the docs will automatically be updated with your changes (`dev` tag when it's merged into develop, and the `latest` version of the docs once it's merged in master)

## How to build
To build the wiki locally, you will have to first install [uv](https://github.com/astral-sh/uv)
To build the docs locally, you will have to first install [uv](https://github.com/astral-sh/uv)

Once that is done, you can run the following commands (while inside this folder):

Expand All @@ -18,12 +18,12 @@ uv sync # You only need to run this once, it will download all the necessary pyt
PDF=1 uv run mkdocs serve -a localhost:8888 # This will build the site and serve it on localhost:8888
```

Open [localhost:8888](http://localhost:8888/) in your browser and you will see the wiki. Every changes you make will rebuild the documentation.
Open [localhost:8888](http://localhost:8888/) in your browser and you will see the docs. Every changes you make will rebuild the documentation.
You can remove the `PDF=1` environement variable if you want to speed up the build process, but you will not generate the related PDF.


### Versioning
We use the [mike](https://github.com/jimporter/mike) plugin to preserve multiple version of the wiki.
We use the [mike](https://github.com/jimporter/mike) plugin to preserve multiple version of the docs.

To use it, you can run the following command:
```bash
Expand All @@ -36,4 +36,4 @@ Check the official Github page of the plugin for more information on how it work
Images and assets are saved in the `_attachments` folder closest to the documentation file that calls for the image. If an image is used in multiple different places, then it should be put in `_attachements` folder in the `docs/` root directory.

## Github workflow
We have Github workflows set up to automatically rebuild the wiki when the `develop` branch receives changes, and when a new tag is created for the `master` branch.
We have Github workflows set up to automatically rebuild the docs when the `develop` branch receives changes, and when a new tag is created for the `master` branch.
2 changes: 1 addition & 1 deletion documentation/docs/Contribute/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Setting up a local instance of Codabench

- Follow the tutorial in codabench [wiki](../Developers_and_Administrators/Codabench-Installation.md). According to your hosting OS, you might have to tune your environment file a bit. Try without enabling the SSL protocol (doing so, you don't need a domain name for the server). Try using the embedded Minio storage solution instead of a private cloud storage.
- Follow the tutorial in codabench [Docs](../Developers_and_Administrators/Codabench-Installation.md). According to your hosting OS, you might have to tune your environment file a bit. Try without enabling the SSL protocol (doing so, you don't need a domain name for the server). Try using the embedded Minio storage solution instead of a private cloud storage.
- If needed, you can also look into [How to deploy Codabench on your server](../Developers_and_Administrators/How-to-deploy-Codabench-on-your-server.md)

### Using your local instance
Expand Down
Loading