generated from adham-elarabawy/lean-python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 903 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.PHONY: create-env install format lint test clean remove-env
CONDA_ENV_NAME := llvim
PYTHON_VERSION := 3.10
create-env:
conda create --name $(CONDA_ENV_NAME) python=$(PYTHON_VERSION) -y
conda run -n $(CONDA_ENV_NAME) pip install -r requirements.txt
@echo "Conda environment '$(CONDA_ENV_NAME)' created and activated. Python version:"
@conda run -n $(CONDA_ENV_NAME) python --version
@echo "To activate this environment, use:"
@echo "conda activate $(CONDA_ENV_NAME)"
@echo "Please still run 'make install' to ensure installation of the required packages."
install:
pip install -r requirements.txt
python -m spacy download en_core_web_sm
format:
black .
isort .
lint:
flake8 .
pyright
test:
pytest
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
remove-env:
conda env remove --name $(CONDA_ENV_NAME) -y
all: create-env format lint test