Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from typing import Dict

LIB_DIRS = ["libs/oci"]
LIB_DIRS = ["libs/oci", "libs/oracledb"]

if __name__ == "__main__":
files = sys.argv[1:]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(
:param wallet_password: password of wallet, not required for TLS connections
:param metadata: metadata used in document
:param parameter: bind variable to use in query
"""
""" # noqa: E501
# Mandatory required arguments.
self.query = query
self.user = user
Expand Down
2 changes: 1 addition & 1 deletion libs/oracledb/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-oracledb"
version = "0.1.0"
version = "1.0.1"
description = "An integration package connecting Oracle Database and LangChain"
authors = []
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"""
import sys

import oracledb
import pytest

from langchain_oracledb.document_loaders.oracleai import (
OracleDocLoader,
OracleTextSplitter,
Expand All @@ -24,14 +27,17 @@
passwd = ""
v_dsn = ""

try:
oracledb.connect(user=uname, password=passwd, dsn=v_dsn)
except Exception as e:
pytest.skip(
allow_module_level=True,
reason=f"Database connection failed: {e}, skipping tests.",
)


### Test loader #####
def test_loader_test() -> None:
try:
import oracledb
except ImportError:
return

try:
# oracle connection
connection = oracledb.connect(user=uname, password=passwd, dsn=v_dsn)
Expand Down Expand Up @@ -131,11 +137,6 @@ def test_loader_test() -> None:

### Test splitter ####
def test_splitter_test() -> None:
try:
import oracledb
except ImportError:
return

try:
# oracle connection
connection = oracledb.connect(user=uname, password=passwd, dsn=v_dsn)
Expand Down Expand Up @@ -311,11 +312,6 @@ def test_splitter_test() -> None:

#### Test summary ####
def test_summary_test() -> None:
try:
import oracledb
except ImportError:
return

try:
# oracle connection
connection = oracledb.connect(user=uname, password=passwd, dsn=v_dsn)
Expand Down
10 changes: 10 additions & 0 deletions libs/oracledb/tests/integration_tests/test_placeholder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2025 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/

import pytest


@pytest.mark.compile
def test_placeholder() -> None:
"""Makes sure no errors raised when no tests selected."""
pass
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
password = ""
dsn = ""

try:
oracledb.connect(user=username, password=password, dsn=dsn)
except Exception as e:
pytest.skip(
allow_module_level=True,
reason=f"Database connection failed: {e}, skipping tests.",
)


############################
####### table_exists #######
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_oracle_loader_load(mock_query: MagicMock) -> None:
query="Test query",
user="Test user",
password="Test password",
connection_string="Test connection string",
dsn="Test connection string",
metadata=["FIELD1"],
)

Expand Down