Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
56464b8
tests | initial commit
aMahanna Apr 28, 2025
822fcda
fix: dir
aMahanna Apr 28, 2025
a835d8b
fix: lint
aMahanna Apr 28, 2025
e3d3c42
bring back `test_compile.py`
aMahanna Apr 28, 2025
f4cc9e8
update: compose.yml
aMahanna Apr 30, 2025
f920f7b
fix: ArangoGraphQAChain
aMahanna Apr 30, 2025
82896fb
new: `test_aql_generating_run`
aMahanna Apr 30, 2025
7a61902
fix: lint
aMahanna Apr 30, 2025
9e0eff7
type: ignore
aMahanna Apr 30, 2025
b8d16b8
update: tests
aMahanna May 5, 2025
4bec67c
grapgh integration and unit tests
lasyasn May 11, 2025
237a235
new: raise_on_write_operation
aMahanna May 12, 2025
3c3f6e6
rename: force_read_only_query
aMahanna May 12, 2025
3246b0c
fix: `AQL_WRITE_OPERATIONS`
aMahanna May 12, 2025
b859232
fix: lint
aMahanna May 12, 2025
c76b3c6
new: `from_existing_collection`
aMahanna May 12, 2025
16303f2
cleanup
aMahanna May 12, 2025
fa2f1f2
fix: docstring
aMahanna May 14, 2025
b361cd2
new: coverage flags
aMahanna May 14, 2025
9be4539
temp
aMahanna May 19, 2025
4494ee0
attempt: remove chmod
aMahanna May 19, 2025
9344bf6
Update README.md
aMahanna May 19, 2025
358394f
Merge branch 'tests' into test_lasya
lasyasn May 19, 2025
11cf59a
tests for graph(integration and unit- 98% each) and graph_qa(integrat…
lasyasn May 28, 2025
99c3a48
new: hybrid search
aMahanna May 30, 2025
dd70425
fix: docstrings
aMahanna May 30, 2025
61950e2
fix: lint
aMahanna May 30, 2025
9a87e74
Merge branch 'tests' into test_lasya
aMahanna May 30, 2025
84ae7e3
fix: lint PT1
aMahanna May 30, 2025
c493899
Merge branch 'main' into test_lasya
aMahanna May 30, 2025
4193eff
lint tests
SLasyaN Jun 2, 2025
518b83c
remove: AQL_WRITE_OPERATIONS
aMahanna Jun 2, 2025
0ba8ba8
lint changes
SLasyaN Jun 2, 2025
382471b
lint tests
SLasyaN Jun 8, 2025
b97c916
lint tests
SLasyaN Jun 8, 2025
6c0780d
lint tests
SLasyaN Jun 8, 2025
84875b7
lint tests
SLasyaN Jun 8, 2025
9744801
fix: lint
aMahanna Jun 9, 2025
b6f7716
Squashed commit of the following:
aMahanna Jun 9, 2025
e65310a
Revert "Squashed commit of the following:"
aMahanna Jun 9, 2025
e582174
comments addressed except .DS store file removal
SLasyaN Jun 9, 2025
4c02f05
update
SLasyaN Jun 9, 2025
545d6d7
rm: .DS_Store
aMahanna Jun 9, 2025
df9f87c
rename: file
aMahanna Jun 9, 2025
b98c745
fix: lint
aMahanna Jun 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/arangodb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ integration_test integration_tests: TEST_FILE = tests/integration_tests/

# unit tests are run with the --disable-socket flag to prevent network calls
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE) --cov-report=term-missing --cov=langchain_arangodb
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE) --cov-report=term-missing --cov=langchain_arangodb --cov-report=html

test_watch:
poetry run ptw --snapshot-update --now . -- -vv $(TEST_FILE)

# integration tests are run without the --disable-socket flag to allow network calls
integration_test integration_tests:
poetry run pytest $(TEST_FILE) --cov-report=term-missing --cov=langchain_arangodb
poetry run pytest $(TEST_FILE) --cov-report=term-missing --cov=langchain_arangodb --cov-report=html

######################
# LINTING AND FORMATTING
Expand Down
4 changes: 2 additions & 2 deletions libs/arangodb/langchain_arangodb/chains/graph_qa/arangodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
AQL_GENERATION_PROMPT,
AQL_QA_PROMPT,
)
from langchain_arangodb.graphs.arangodb_graph import ArangoGraph
from langchain_arangodb.graphs.graph_store import GraphStore

AQL_WRITE_OPERATIONS: List[str] = [
"INSERT",
Expand All @@ -45,7 +45,7 @@ class ArangoGraphQAChain(Chain):
See https://python.langchain.com/docs/security for more information.
"""

graph: ArangoGraph = Field(exclude=True)
graph: GraphStore = Field(exclude=True)
aql_generation_chain: Runnable[Dict[str, Any], Any]
aql_fix_chain: Runnable[Dict[str, Any], Any]
qa_chain: Runnable[Dict[str, Any], Any]
Expand Down
12 changes: 6 additions & 6 deletions libs/arangodb/langchain_arangodb/graphs/arangodb_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def get_arangodb_client(
Returns:
An arango.database.StandardDatabase.
"""
_url: str = url or os.environ.get("ARANGODB_URL", "http://localhost:8529") # type: ignore[assignment]
_dbname: str = dbname or os.environ.get("ARANGODB_DBNAME", "_system") # type: ignore[assignment]
_username: str = username or os.environ.get("ARANGODB_USERNAME", "root") # type: ignore[assignment]
_password: str = password or os.environ.get("ARANGODB_PASSWORD", "") # type: ignore[assignment]
_url: str = url or str(os.environ.get("ARANGODB_URL", "http://localhost:8529"))
_dbname: str = dbname or str(os.environ.get("ARANGODB_DBNAME", "_system"))
_username: str = username or str(os.environ.get("ARANGODB_USERNAME", "root"))
_password: str = password or str(os.environ.get("ARANGODB_PASSWORD", ""))

return ArangoClient(_url).db(_dbname, _username, _password, verify=True)

Expand Down Expand Up @@ -408,7 +408,7 @@ def embed_text(text: str) -> list[float]:

if capitalization_strategy == "none":
capitalization_fn = lambda x: x # noqa: E731
if capitalization_strategy == "lower":
elif capitalization_strategy == "lower":
capitalization_fn = str.lower
elif capitalization_strategy == "upper":
capitalization_fn = str.upper
Expand Down Expand Up @@ -500,7 +500,7 @@ def embed_text(text: str) -> list[float]:
# 2. Process Nodes
node_key_map = {}
for i, node in enumerate(document.nodes, 1):
node.id = capitalization_fn(str(node.id))
node.id = str(capitalization_fn(str(node.id)))
node_key = self._hash(node.id)
node_key_map[node.id] = node_key

Expand Down
Loading