Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # TODO: use a more efficient way to install these packages
  10. install_all:
  11. poetry install --all-extras
  12. poetry run pip install pinecone-text pinecone-client langchain-anthropic "unstructured[local-inference, all-docs]" ollama langchain_together==0.1.3 \
  13. langchain_cohere==0.1.5 deepgram-sdk==3.2.7 langchain-huggingface psutil clarifai==10.0.1 flask==2.3.3 twilio==8.5.0 fastapi-poe==0.0.16 discord==2.3.2 \
  14. slack-sdk==3.21.3 huggingface_hub==0.23.0 gitpython==3.1.38 yt_dlp==2023.11.14 PyGithub==1.59.1 feedparser==6.0.10 newspaper3k==0.2.8 listparser==0.19 \
  15. modal==0.56.4329 dropbox==11.36.2 boto3==1.34.20 youtube-transcript-api==0.6.1 pytube==15.0.0 beautifulsoup4==4.12.3
  16. install_es:
  17. poetry install --extras elasticsearch
  18. install_opensearch:
  19. poetry install --extras opensearch
  20. install_milvus:
  21. poetry install --extras milvus
  22. shell:
  23. poetry shell
  24. py_shell:
  25. poetry run python
  26. format:
  27. $(PYTHON) -m black .
  28. $(PYTHON) -m isort .
  29. clean:
  30. rm -rf dist build *.egg-info
  31. lint:
  32. poetry run ruff .
  33. build:
  34. poetry build
  35. publish:
  36. poetry publish
  37. # for example: make test file=tests/test_factory.py
  38. test:
  39. poetry run pytest $(file)
  40. coverage:
  41. poetry run pytest --cov=$(PROJECT_NAME) --cov-report=xml