WYK Online Judge
An online judge with tasks and contests.
Judge backend: wykoj/wykoj-judge
Live Version: https://wykoj.jonowo.dev
UI based on HKOI Online Judge.
Installation
- Clone repo with
git clone https://github.com/jonowo/wykoj
. - Compile (and minify)
wykoj/scss/style.scss
towykoj/static/style.min.css
. (Settings are configured for the VS Code Live SASS Compiler extension.) - Install/Upgrade dependencies:
pip install -Ur requirements.txt
. - Initialize database:
python init_db.py
. (You will be asked to install the appropriate database driver.)- An admin user with username
admin
and passwordadminadmin
will be created. (Please change username and password upon first login.)
- An admin user with username
- Create a (private) GitHub repo to store test cases. It will be used as a submodule.
- Run
git submodule add [repo link] wykoj/test_cases
# - Run
git submodule init && git submodule update
- Create a webhook for just the push event #
- Payload URL:
[your domain]/github/push
- Content type:
application/json
- Secret:
SECRET_KEY
from above - Events:
push
only
- Payload URL:
- Run
- Create
config.json
with the following keys: *TEST_CASES_GITHUB
- Test cases GitHub repo URL.JUDGE_HOST
- Domain of judging backend, e.g.https://example.com
(without trailing slash).SECRET_KEY
- A URL-safe secret key, can be generated withsecrets.token_hex(16)
.DB_URI
- A database URI including login credentials.
- Run
hypercorn -b 0.0.0.0:3000 "wykoj:create_app()"
.
Access the online judge at http://localhost:3000.
Note
If you are part of the WYKOJ Team:
*: Ask me for config.json
.
#: You have access to wyk-stem-team/wykoj-test-cases
, skip this step.
View the Internal Deployment Guide.
Formatting
yapf -ri . && isort .
Issues
Multiple submissions from the same user to the same task are marked first_solve=True
.
Drop first_solve
and solves
columns and compute first solve instead.
Or use locks when saving submissions instead.
Roadmap
- Spinning Ame animation on submission page if pending
- Recommended tasks (unsolved tasks ordered by solved descending)
- Including previous subtask in subtask
- Batch user creation
- Chess rating leaderboard
- Lichess games
- Stats in user page and contests page
- Task stats page (hide link during contest, contest redirect)
- Custom page creation (admin)
- Advanced filtering form footer for submissions page
- Categorization for tasks
- Groups and assignments