Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

chores: run lint and format (#284)

Deshraj Yadav05a4eef6ae55
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8b0cccde9..c9e280f57 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,6 +23,6 @@ jobs:
- name: Install dependencies
run: poetry install --all-extras
- name: Lint with ruff
- run: poetry run ruff embedchain examples
+ run: make ci_lint
- name: Test with pytest
- run: poetry run pytest
+ run: make ci_test
diff --git a/Makefile b/Makefile
index f0a500900..b4b5bef92 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ PIP := $(PYTHON) -m pip
PROJECT_NAME := embedchain
# Targets
-.PHONY: install format lint clean test
+.PHONY: install format lint clean test ci_lint ci_test
install:
$(PIP) install --upgrade pip
@@ -22,3 +22,9 @@ clean:
test:
$(PYTHON) -m pytest
+
+ci_lint:
+ poetry run ruff .
+
+ci_test:
+ poetry run pytest
diff --git a/embedchain/__init__.py b/embedchain/__init__.py
index ac195c547..6dbd651b7 100644
--- a/embedchain/__init__.py
+++ b/embedchain/__init__.py
@@ -2,9 +2,7 @@ import importlib.metadata
__version__ = importlib.metadata.version(__package__ or __name__)
-from .embedchain import (
- App, # noqa: F401
- OpenSourceApp, # noqa: F401
- PersonApp, # noqa: F401
- PersonOpenSourceApp, # noqa: F401
-)
+from .embedchain import App # noqa: F401
+from .embedchain import OpenSourceApp # noqa: F401
+from .embedchain import PersonApp # noqa: F401
+from .embedchain import PersonOpenSourceApp # noqa: F401
diff --git a/embedchain/config/InitConfig.py b/embedchain/config/InitConfig.py
index 59666df80..d4ed6f097 100644
--- a/embedchain/config/InitConfig.py
+++ b/embedchain/config/InitConfig.py
@@ -1,6 +1,8 @@
import logging
import os
+
from chromadb.utils import embedding_functions
+
from embedchain.config.BaseConfig import BaseConfig
diff --git a/embedchain/embedchain.py b/embedchain/embedchain.py
index e20bd1435..ae61418f8 100644
--- a/embedchain/embedchain.py
+++ b/embedchain/embedchain.py
@@ -9,7 +9,8 @@ from langchain.docstore.document import Document
from langchain.memory import ConversationBufferMemory
from embedchain.config import AddConfig, ChatConfig, InitConfig, QueryConfig
-from embedchain.config.QueryConfig import CODE_DOCS_PAGE_PROMPT_TEMPLATE, DEFAULT_PROMPT
+from embedchain.config.QueryConfig import (CODE_DOCS_PAGE_PROMPT_TEMPLATE,
+ DEFAULT_PROMPT)
from embedchain.data_formatter import DataFormatter
gpt4all_model = None
diff --git a/embedchain/vectordb/chroma_db.py b/embedchain/vectordb/chroma_db.py
index 2e1d3fdb8..8ae25a9da 100644
--- a/embedchain/vectordb/chroma_db.py
+++ b/embedchain/vectordb/chroma_db.py
@@ -1,8 +1,6 @@
import logging
-import os
import chromadb
-from chromadb.utils import embedding_functions
from embedchain.vectordb.base_vector_db import BaseVectorDB
diff --git a/setup.py b/setup.py
index 653f23750..bdaae3631 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
-import setuptools
-
import importlib.metadata
+import setuptools
+
version = importlib.metadata.version(__package__ or __name__)
with open("README.md", "r", encoding="utf-8") as fh: