* Adding the base of our API * Little file and lint adjustments * Adding the lint command to Makefile * Adding the Minesweeper logic for game creation * Adding some tests for the Minesweeper algorithm * Adding some tools command to Makefile like pre-commit and pip-tools * Adding test help text to Makefile * all new user is_staff=True, for development for now * Now we can get the data from specific game Adding game status Adding game status Fixing game models
41 lines
2.1 KiB
Makefile
41 lines
2.1 KiB
Makefile
all: help
|
||
|
||
help:
|
||
@echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||
@echo "ℹ️ Available commands ℹ️"
|
||
@echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||
@echo "⭐️ help : Show this message"
|
||
@echo "⭐️ clean : Removes all python cache and temporary files"
|
||
@echo "⭐️ run : Runs the application using docker-compose"
|
||
@echo "⭐️ lint : Lint the source using flake8 codestyle"
|
||
@echo "⭐️ test : Runs the tests using Docker"
|
||
@echo "⭐️ pre-commit-install : Install the pre-commit hook"
|
||
@echo "⭐️ pre-commit-run : Runs the standalone pre-commit routine for checking files"
|
||
@echo "⭐️ update-requirements : Using pip-compile(from pip-tools), update the requirements.txt with fixed version of used libraries"
|
||
@echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
|
||
|
||
clean:
|
||
@find . -name '*.pyc' -exec rm -f {} +
|
||
@find . -name '*.pyo' -exec rm -f {} +
|
||
@find . -name '*~' -exec rm -f {} +
|
||
@find . -name '__pycache__' -exec rm -fr {} +
|
||
|
||
|
||
run:
|
||
@docker-compose up
|
||
|
||
lint:
|
||
@flake8 .
|
||
|
||
test: clean
|
||
@docker-compose run --rm app-test python manage.py test
|
||
|
||
pre-commit-install:
|
||
@pre-commit install
|
||
|
||
pre-commit-run:
|
||
@pre-commit run --all-files
|
||
|
||
update-requirements:
|
||
@pip-compile requirements.txt
|