tutor-deck/Makefile
Muhammad Labeeb 150400383f
feat: update layout and texts
* change layout and text

* change layout and text

* docs: fix make runserver command

* change logo
2025-04-16 14:48:02 +05:00

44 lines
1.5 KiB
Makefile
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.DEFAULT_GOAL := help
.PHONY: docs
SRC_DIRS = ./tutordeck
BLACK_OPTS = --exclude templates ${SRC_DIRS}
runserver: ## Run a development server
tutor deck runserver --dev
scss: ## Compile SCSS files to CSS
sass ${SASS_OPTS} tutordeck/server/static/scss/:tutordeck/server/static/css/
scss-watch: ## Compile SCSS files to CSS and watch for changes
$(MAKE) scss SASS_OPTS="--watch"
# Warning: These checks are not necessarily run on every PR.
test: test-lint test-types test-format # Run some static checks.
test-format: ## Run code formatting tests
black --check --diff $(BLACK_OPTS)
test-lint: ## Run code linting tests
pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS}
test-types: ## Run type checks.
mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS}
format: ## Format code automatically
black $(BLACK_OPTS)
isort: ## Sort imports. This target is not mandatory because the output may be incompatible with black formatting. Provided for convenience purposes.
isort --skip=templates ${SRC_DIRS}
changelog-entry: ## Create a new changelog entry.
scriv create
changelog: ## Collect changelog entries in the CHANGELOG.md file.
scriv collect
ESCAPE = 
help: ## Print this help
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'