Follow these steps to get the server running locally for contributing or development
First, clone this repository using the following command
git clone https://github.com/FRC-Team3484/open-scouting
Then, navigate to that directory and create a new python virtual environment
cd scouting
python3 -m venv .venv
Activate the virtual environment using the command for your system (Linux is used here) and install the required dependencies
source ./.venv/bin/activate
pip install -r scouting/requirements.txt
pip install -r scouting/requirements-dev.txt
Install the required npm
libraries
npm install
Copy the .env-template
file to a new file called .env
.
cp .env.development.template .env.development
You should add your TBA API key here, and credentials for sending emails
Next, create a django superuser and make and migrate the models
cd scouting
python manage.py createsuperuser
python manage.py makemigrations
python manage.py migrate
Now run the server using the following command, or run the Start server
task in your Visual Studio Code
python manage.py runserver
Now, navigate to the ./admin
page (usually http://127.0.0.1:8000/admin
), add view the User
models. Find the superuser you just created, scroll down, and fill out all the fields for the profile object to prevent any errors
Additionally, you should start the Tailwind CSS builder with the following command, or use the Build CSS
task in Visual Studio Code
npm run build:css
This project uses djlint
to lint the templates. You can run this using the following command
djlint scouting --reformat
This project uses ruff
to lint and format the python code.
You can run the following command to run the linter once
ruff check cardie --fix
For VS Code users, you can install the ruff
extension to get linting and formatting on save.