Skip to content
Merged
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
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ If you want to check all files, not just the modified ones, you can run::

pre-commit run --all-files

Creating mock data (for development)
~~~~~~~~~~~~~~~~~~~~~~~

To quickly populate your development environment with sample data, you can use the following commands::

./easy_toolbox.py populate-sample-data

This creates a contest with a sample problem package and 10 users, each with 3 submissions.

To remove all the data created by the above command (and any data created by the mass_create_tool)::

./easy_toolbox.py wipe-sample-data

Manual installation (deprecated)
~~~~~~~~~~~~~~~~~~~

Expand Down
11 changes: 11 additions & 0 deletions easy_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@
"Run Ruff, a linter and formatter. You can add `--fix` to automatically fix some errors.",
"{exec} -w /sio2/oioioi web bash -c 'ruff check . {extra_args} ; echo ; ruff format .'",
),
(
"populate-sample-data",
"Create a contest with the sample problem package and 10 users, with 3 submissions each.",
"{exec} web python manage.py mass_create_tool -cn demo -cc -pp test_full_package.tgz -u 10 -sf sum-correct.cpp sum-various-results.cpp -spu 3 -v 0",
),
(
"wipe-sample-data",
"Wipe all contests, problems, users and submissions created with `populate-sample-data`.",
"{exec} web python manage.py mass_create_tool --wipe",
"Warning: This will wipe all data created using the mass_create_tool. Are you sure you want to proceed?"
)
]

longest_command_arg = max([len(command[0]) for command in RAW_COMMANDS])
Expand Down