stores 0.1.2__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stores-0.1.2 → stores-0.1.3}/PKG-INFO +1 -1
- {stores-0.1.2 → stores-0.1.3}/pyproject.toml +1 -1
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/venv_utils.py +9 -1
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/test_remote_index.py +9 -0
- {stores-0.1.2 → stores-0.1.3}/uv.lock +1 -1
- {stores-0.1.2 → stores-0.1.3}/.gitignore +0 -0
- {stores-0.1.2 → stores-0.1.3}/.python-version +0 -0
- {stores-0.1.2 → stores-0.1.3}/LICENSE +0 -0
- {stores-0.1.2 → stores-0.1.3}/README.md +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/README.md +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/anthropic_api.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/google_gemini_auto_call.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/google_gemini_manual_call.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/langchain_w_tool_calling.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/langgraph_agent.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/litellm_w_tool_calling.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/llamaindex_agent.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/openai_agent.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/openai_chat_completions.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/examples/quickstarts/openai_responses.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/run_complex.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/run_remote_tool.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/__init__.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/constants.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/format.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/__init__.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/base_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/local_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/indexes/remote_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/parse.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/stores/utils.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/README.md +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index/hello/__init__.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index/tools.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index/tools.toml +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_custom_class/foo.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_custom_class/tools.toml +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_function_error/foo.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_function_error/tools.toml +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_w_deps/mock_index/__init__.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_w_deps/pyproject.toml +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_w_deps/requirements.txt +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/mock_index_w_deps/tools.toml +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_format/conftest.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_format/test_format.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/conftest.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/test_base_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/test_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/test_local_index.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_indexes/test_venv_utils.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_parse/conftest.py +0 -0
- {stores-0.1.2 → stores-0.1.3}/tests/test_parse/test_parse.py +0 -0
@@ -93,6 +93,7 @@ def init_venv_tools(index_folder: os.PathLike, env_var: dict | None = None):
|
|
93
93
|
tool_id=tool_id,
|
94
94
|
index_folder=index_folder,
|
95
95
|
venv=VENV_NAME,
|
96
|
+
env_var=env_var,
|
96
97
|
)
|
97
98
|
tool = parse_tool_signature(
|
98
99
|
signature_dict=tool_sig,
|
@@ -105,9 +106,15 @@ def init_venv_tools(index_folder: os.PathLike, env_var: dict | None = None):
|
|
105
106
|
|
106
107
|
|
107
108
|
# TODO: Sanitize tool_id, args, and kwargs
|
108
|
-
def get_tool_signature(
|
109
|
+
def get_tool_signature(
|
110
|
+
tool_id: str,
|
111
|
+
index_folder: os.PathLike,
|
112
|
+
venv: str = VENV_NAME,
|
113
|
+
env_var: dict | None = None,
|
114
|
+
):
|
109
115
|
module_name = ".".join(tool_id.split(".")[:-1])
|
110
116
|
tool_name = tool_id.split(".")[-1]
|
117
|
+
env_var = env_var or {}
|
111
118
|
|
112
119
|
runner = f"""
|
113
120
|
import pickle, sys, traceback, inspect, enum
|
@@ -197,6 +204,7 @@ except Exception as e:
|
|
197
204
|
[f"{venv}/bin/python", "-c", runner],
|
198
205
|
capture_output=True,
|
199
206
|
cwd=index_folder,
|
207
|
+
env=env_var,
|
200
208
|
)
|
201
209
|
try:
|
202
210
|
response = pickle.loads(result.stdout)
|
@@ -40,3 +40,12 @@ async def test_remote_index():
|
|
40
40
|
)
|
41
41
|
# Clean up index
|
42
42
|
shutil.rmtree(stores.indexes.remote_index.CACHE_DIR / "silanthro/send-gmail:0.2.0")
|
43
|
+
|
44
|
+
|
45
|
+
async def test_remote_index_2():
|
46
|
+
# Check that env_vars are set correctly
|
47
|
+
stores.indexes.RemoteIndex(
|
48
|
+
"silanthro/filesystem:0.2.0",
|
49
|
+
env_var={"ALLOWED_DIR": "./test"},
|
50
|
+
)
|
51
|
+
shutil.rmtree(stores.indexes.remote_index.CACHE_DIR / "silanthro/filesystem:0.2.0")
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|