Makefile 617 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Variables
  2. PYTHON := python3
  3. PIP := $(PYTHON) -m pip
  4. PROJECT_NAME := embedchain
  5. # Targets
  6. .PHONY: install format lint clean test ci_lint ci_test coverage
  7. install:
  8. poetry install
  9. install_es:
  10. poetry install --extras elasticsearch
  11. install_opensearch:
  12. poetry install --extras opensearch
  13. shell:
  14. poetry shell
  15. py_shell:
  16. poetry run python
  17. format:
  18. $(PYTHON) -m black .
  19. $(PYTHON) -m isort .
  20. lint:
  21. $(PYTHON) -m ruff .
  22. clean:
  23. rm -rf dist build *.egg-info
  24. test:
  25. $(PYTHON) -m pytest
  26. ci_lint:
  27. poetry run ruff .
  28. ci_test:
  29. poetry run pytest
  30. coverage:
  31. poetry run pytest --cov=$(PROJECT_NAME) --cov-report=xml