Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

vscubing/vscubing-backend

Repository files navigation

LEGACY: vscubing api (replaced by vscubing-next)

RESTful api for vscubing.com powered with Django Rest Framework

Badges

MIT License

Tech Stack

Django, Django Rest Framework

Authors

Run Locally

  • Clone the project !!!WITH SUBMODULES!!!
git clone --recurse-submodules git@github.com:vscubing/vscubing-backend.git -b dev
cd vscubing-backend

If you have already cloned the project without --recurse-submodules, run git submodule update --init --recursive to clone the submodules.

  • Build twsearch
cd vendor/twsearch
make build
cd ../../
  • Create venv (on linux)
python3 -m venv venv
  • Activate venv (on linux)
source venv/bin/activate
# using fish shell: `source venv/bin/activate.fish`
  • Install requirements
pip install -r requirements.txt
  • Add and populate .env (refer to .example-env)

  • Run migrations

python3 manage.py migrate
  • To create fake data for test use, utilize this command
python3 manage.py generate_full_data

There are some parms that can be used

how many users to generate --users_qty int

disciplines names to generate --discipline_names str str str

amount of scrumbles to create new contests (after initial generation) --tnoodle_scrambles_qty int

how many moves each new contest scramble with have --tnoodle_scrambles_moves_qty int

how many moves past contests' scrambles and current contest's scramble have --scrambles_moves_qty int

how many past contests to generate --contest_qty int

Example

python3 manage.py generate_full_data --users_qty 15 --discipline_names 3by3 2by2 --tnoodle_scrambles_qty 20 --contest_qty 5 --tnoodle_scrambles_moves_qty 8 --scrambles_moves_qty 10
  • Start the server
python3 manage.py runserver
  • (Optional) Start celery worker and beat
celery -A vscubing.celery worker --loglevel=info
celery -A vscubing.celery beat --loglevel=info

Contributing

Contributions are always welcome!

Support

For support, email savytskyi.work@gmail.com

About

RESTful api for vscubing.com powerd with Django Rest Framework

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages