Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cszsol committed Oct 2, 2024
1 parent 86ce5fc commit 2092fc1
Show file tree
Hide file tree
Showing 21 changed files with 8 additions and 29 deletions.
1 change: 0 additions & 1 deletion tests/agents/test_simple_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pathlib import Path

import pytest

from neuroagent.agents import AgentOutput, AgentStep, SimpleAgent


Expand Down
1 change: 0 additions & 1 deletion tests/agents/test_simple_chat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import pytest
from langchain_core.messages import HumanMessage, ToolMessage
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver

from neuroagent.agents import AgentOutput, AgentStep, SimpleChatAgent


Expand Down
7 changes: 3 additions & 4 deletions tests/app/database/test_threads.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"""Test of the thread router."""

import pytest
from sqlalchemy import MetaData, create_engine
from sqlalchemy.orm import Session
from sqlalchemy.sql.expression import Select

from neuroagent.app.config import Settings
from neuroagent.app.dependencies import get_language_model, get_settings
from neuroagent.app.main import app
from neuroagent.app.routers.database.schemas import GetThreadsOutput
from sqlalchemy import MetaData, create_engine
from sqlalchemy.orm import Session
from sqlalchemy.sql.expression import Select


def test_create_thread(patch_required_env, app_client, db_connection):
Expand Down
1 change: 0 additions & 1 deletion tests/app/database/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Test of the tool router."""

import pytest

from neuroagent.app.config import Settings
from neuroagent.app.dependencies import get_language_model, get_settings
from neuroagent.app.main import app
Expand Down
3 changes: 1 addition & 2 deletions tests/app/test_config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Test config"""

import pytest
from pydantic import ValidationError

from neuroagent.app.config import Settings
from pydantic import ValidationError


def test_required(monkeypatch, patch_required_env):
Expand Down
1 change: 0 additions & 1 deletion tests/app/test_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from langchain_openai import ChatOpenAI
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver

from neuroagent.agents import SimpleAgent, SimpleChatAgent
from neuroagent.app.dependencies import (
Settings,
Expand Down
1 change: 0 additions & 1 deletion tests/app/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from unittest.mock import patch

from fastapi.testclient import TestClient

from neuroagent.app.dependencies import get_settings
from neuroagent.app.main import app

Expand Down
1 change: 0 additions & 1 deletion tests/app/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest
from fastapi.requests import Request
from fastapi.responses import Response

from neuroagent.app.config import Settings
from neuroagent.app.middleware import strip_path_prefix

Expand Down
7 changes: 3 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
from httpx import AsyncClient
from langchain_core.language_models.fake_chat_models import GenericFakeChatModel
from langchain_core.messages import AIMessage
from sqlalchemy import MetaData, create_engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import Session

from neuroagent.app.config import Settings
from neuroagent.app.dependencies import get_kg_token, get_settings
from neuroagent.app.main import app
from neuroagent.tools import GetMorphoTool
from sqlalchemy import MetaData, create_engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import Session


@pytest.fixture(name="app_client")
Expand Down
1 change: 0 additions & 1 deletion tests/test_cell_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

import pytest

from neuroagent.cell_types import CellTypesMeta, get_celltypes_descendants

CELL_TYPES_FILE = Path(__file__).parent / "data" / "kg_cell_types_hierarchy_test.json"
Expand Down
1 change: 0 additions & 1 deletion tests/test_resolving.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest
from httpx import AsyncClient

from neuroagent.resolving import (
es_resolve,
escape_punctuation,
Expand Down
1 change: 0 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import pytest
from httpx import AsyncClient

from neuroagent.schemas import KGMetadata
from neuroagent.utils import (
RegionMeta,
Expand Down
3 changes: 1 addition & 2 deletions tests/tools/test_base_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
from langchain_core.messages import AIMessage, HumanMessage
from langchain_core.tools import ToolException
from langgraph.prebuilt import create_react_agent
from pydantic import BaseModel

from neuroagent.tools.base_tool import BasicTool
from pydantic import BaseModel


class input_for_test(BaseModel):
Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_electrophys_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools import ElectrophysFeatureTool
from neuroagent.tools.electrophys_tool import (
CALCULATED_FEATURES,
Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_get_me_model_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools.get_me_model_tool import GetMEModelTool, MEModelOutput


Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_get_morpho_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools import GetMorphoTool
from neuroagent.tools.get_morpho_tool import KnowledgeGraphOutput

Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_kg_morpho_features_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools import KGMorphoFeatureTool
from neuroagent.tools.kg_morpho_features_tool import (
FeatRangeInput,
Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_literature_search_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import httpx
import pytest

from neuroagent.tools import LiteratureSearchTool
from neuroagent.tools.literature_search_tool import ParagraphMetadata

Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_morphology_features_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools import MorphologyFeatureTool
from neuroagent.tools.morphology_features_tool import MorphologyFeatureOutput

Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_resolve_br_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest
from httpx import AsyncClient

from neuroagent.tools import ResolveBrainRegionTool
from neuroagent.tools.resolve_brain_region_tool import (
BRResolveOutput,
Expand Down
1 change: 0 additions & 1 deletion tests/tools/test_traces_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import httpx
import pytest
from langchain_core.tools import ToolException

from neuroagent.tools import GetTracesTool
from neuroagent.tools.traces_tool import TracesOutput

Expand Down

0 comments on commit 2092fc1

Please sign in to comment.