Skip to content

Commit

Permalink
chores: run lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
deshraj committed Jul 16, 2023
1 parent ac68986 commit ed83c2e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 lint
- name: Test with pytest
run: poetry run pytest
run: make test
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Variables
PYTHON := python3
PYTHON := python
PIP := $(PYTHON) -m pip
PROJECT_NAME := embedchain

Expand All @@ -11,14 +11,14 @@ install:
$(PIP) install -e .[dev]

format:
$(PYTHON) -m black .
$(PYTHON) -m isort .
black .
isort .

lint:
$(PYTHON) -m ruff .
ruff .

clean:
rm -rf dist build *.egg-info

test:
$(PYTHON) -m pytest
pytest
10 changes: 4 additions & 6 deletions embedchain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

__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
2 changes: 2 additions & 0 deletions embedchain/config/InitConfig.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import logging
import os

from chromadb.utils import embedding_functions

from embedchain.config.BaseConfig import BaseConfig


Expand Down
3 changes: 2 additions & 1 deletion embedchain/embedchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
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
Expand Down
2 changes: 0 additions & 2 deletions embedchain/vectordb/chroma_db.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import logging
import os

import chromadb
from chromadb.utils import embedding_functions

from embedchain.vectordb.base_vector_db import BaseVectorDB

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit ed83c2e

Please sign in to comment.