-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partners/astradb: Add dotenv to langchain-astradb integration tests (#…
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# astra db | ||
ASTRA_DB_API_ENDPOINT=https://your_astra_db_id-your_region.apps.astra.datastax.com | ||
ASTRA_DB_APPLICATION_TOKEN=AstraCS:your_astra_db_application_token | ||
# ASTRA_DB_KEYSPACE=your_astra_db_namespace | ||
# ASTRA_DB_SKIP_COLLECTION_DELETIONS=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Getting the absolute path of the current file's directory | ||
import os | ||
|
||
ABS_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
# Getting the absolute path of the project's root directory | ||
PROJECT_DIR = os.path.abspath(os.path.join(ABS_PATH, os.pardir, os.pardir)) | ||
|
||
|
||
# Loading the .env file if it exists | ||
def _load_env() -> None: | ||
dotenv_path = os.path.join(PROJECT_DIR, "tests", "integration_tests", ".env") | ||
if os.path.exists(dotenv_path): | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv(dotenv_path) | ||
|
||
|
||
_load_env() |