diff options
author | Aditya <bluenerd@protonmail.com> | 2025-02-10 22:20:49 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2025-02-10 22:20:49 +0530 |
commit | 93ee9c739c9dbe6ce281f544d428df807d476964 (patch) | |
tree | a56f69d0c4e38f467655bae5e1e991953c1010f2 /Makefile |
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fd3f40b --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +SHELL :=/bin/bash + +.PHONY: clean check setup +.DEFAULT_GOAL=help +VENV_DIR = .venv +PYTHON_VERSION = python3.11 + +check: # Ruff check + @ruff check . + @echo "✅ Check complete!" + +fix: # Fix auto-fixable linting issues + @ruff check app.py --fix + +clean: # Clean temporary files + @rm -rf __pycache__ .pytest_cache + @find . -name '*.pyc' -exec rm -r {} + + @find . -name '__pycache__' -exec rm -r {} + + @rm -rf build dist + @find . -name '*.egg-info' -type d -exec rm -r {} + + +run: # Run the application + @streamlit run app.py + +setup: # Initial project setup + @echo "Creating virtual env at: $(VENV_DIR)"s + @$(PYTHON_VERSION) -m venv $(VENV_DIR) + @echo "Installing dependencies..." + @source $(VENV_DIR)/bin/activate && pip install -r requirements/requirements-dev.txt && pip install -r requirements/requirements.txt + @echo -e "\n✅ Done.\n🎉 Run the following commands to get started:\n\n ➡️ source $(VENV_DIR)/bin/activate\n ➡️ make run\n" + + +help: # Show this help + @egrep -h '\s#\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' |