Skip to content
Closed
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
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ help:
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

install: # Install base requirements to run project
pip install -r requirements.txt
pip3 install -r requirements.txt

dev-install: # Install developer requirements + base requirements
pip install -r test-requirements.txt
pip3 install -r test-requirements.txt

setup: # Set up the project database
python manage.py migrate ${local_config}
python3 manage.py migrate ${local_config}

build-db: # Build database
echo "from data.v2.build import build_all; build_all()" | python manage.py shell ${local_config}
Expand All @@ -26,25 +26,25 @@ wipe-sqlite-db: # Delete's the project database
rm -rf db.sqlite3

serve: # Run the project locally
python manage.py runserver ${local_config}
python3 manage.py runserver ${local_config}

test: # Run tests
python manage.py test ${local_config}
python3 manage.py test ${local_config}

clean: # Remove any pyc files
find . -type f -name '*.pyc' -delete

migrate: # Run any outstanding migrations
python manage.py migrate ${local_config}
python3 manage.py migrate ${local_config}

make-migrations: # Create migrations files if schema has changed
python manage.py makemigrations ${local_config}
python3 manage.py makemigrations ${local_config}

shell: # Load a shell
python manage.py shell ${local_config}
python3 manage.py shell ${local_config}

openapi-generate:
python manage.py spectacular --color --file openapi.yml ${local_config}
python3 manage.py spectacular --color --file openapi.yml ${local_config}

docker-up: # (Docker) Create services/volumes/networks
docker compose up -d
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ A RESTful API for Pokémon - [pokeapi.co](https://pokeapi.co)

- Download this source code into a working directory, be sure to use the flag `--recurse-submodules` to clone also our submodules.

- Python version 3.12 or older will work only

- Install the requirements using pip:

```sh
Expand Down