diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 7abc2140..149044c8 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -9,11 +9,14 @@ permissions: jobs: - container-push: + test: name: Run tests runs-on: ubuntu-latest + container: + image: python:3.12 + steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.gitignore b/.gitignore index 4d089211..ef901963 100644 --- a/.gitignore +++ b/.gitignore @@ -6,11 +6,11 @@ env/ *.parquet templates/values/version.jsonnet trustgraph-base/trustgraph/base_version.py +trustgraph-cli/trustgraph/cli_version.py trustgraph-bedrock/trustgraph/bedrock_version.py trustgraph-embeddings-hf/trustgraph/embeddings_hf_version.py trustgraph-flow/trustgraph/flow_version.py trustgraph-ocr/trustgraph/ocr_version.py trustgraph-parquet/trustgraph/parquet_version.py trustgraph-vertexai/trustgraph/vertexai_version.py -trustgraph-cli/trustgraph/ vertexai/ \ No newline at end of file diff --git a/Makefile b/Makefile index c9d192cd..0bb33085 100644 --- a/Makefile +++ b/Makefile @@ -21,15 +21,15 @@ wheels: packages: update-package-versions rm -rf dist/ - cd trustgraph && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-base && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-flow && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-vertexai && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-bedrock && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-embeddings-hf && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-cli && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-ocr && python3 setup.py sdist --dist-dir ../dist/ - cd trustgraph-mcp && python3 setup.py sdist --dist-dir ../dist/ + cd trustgraph && python -m build --sdist --outdir ../dist/ + cd trustgraph-base && python -m build --sdist --outdir ../dist/ + cd trustgraph-flow && python -m build --sdist --outdir ../dist/ + cd trustgraph-vertexai && python -m build --sdist --outdir ../dist/ + cd trustgraph-bedrock && python -m build --sdist --outdir ../dist/ + cd trustgraph-embeddings-hf && python -m build --sdist --outdir ../dist/ + cd trustgraph-cli && python -m build --sdist --outdir ../dist/ + cd trustgraph-ocr && python -m build --sdist --outdir ../dist/ + cd trustgraph-mcp && python -m build --sdist --outdir ../dist/ pypi-upload: twine upload dist/*-${VERSION}.* @@ -124,7 +124,7 @@ JSONNET_FLAGS=-J templates -J . update-templates: update-dcs -JSON_TO_YAML=python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' +JSON_TO_YAML=python -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' update-dcs: set-version for graph in ${GRAPHS}; do \ diff --git a/containers/Containerfile.base b/containers/Containerfile.base index 4d28b26d..067b4c2c 100644 --- a/containers/Containerfile.base +++ b/containers/Containerfile.base @@ -11,7 +11,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN dnf install -y python3.12 && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp && \ + pip3 install --no-cache-dir build wheel aiohttp && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ dnf clean all diff --git a/containers/Containerfile.bedrock b/containers/Containerfile.bedrock index 2885080d..a35d12ad 100644 --- a/containers/Containerfile.bedrock +++ b/containers/Containerfile.bedrock @@ -11,7 +11,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN dnf install -y python3.12 && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp && \ + pip3 install --no-cache-dir build wheel aiohttp && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ dnf clean all diff --git a/containers/Containerfile.flow b/containers/Containerfile.flow index d4015c8c..2ffa17d3 100644 --- a/containers/Containerfile.flow +++ b/containers/Containerfile.flow @@ -11,7 +11,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN dnf install -y python3.12 && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp rdflib && \ + pip3 install --no-cache-dir build wheel aiohttp rdflib && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ dnf clean all diff --git a/containers/Containerfile.hf b/containers/Containerfile.hf index dcc91632..b76179ff 100644 --- a/containers/Containerfile.hf +++ b/containers/Containerfile.hf @@ -11,7 +11,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN dnf install -y python3.12 && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp && \ + pip3 install --no-cache-dir build wheel aiohttp && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ dnf clean all diff --git a/containers/Containerfile.mcp b/containers/Containerfile.mcp index 79f479d5..2377a663 100644 --- a/containers/Containerfile.mcp +++ b/containers/Containerfile.mcp @@ -26,6 +26,8 @@ COPY trustgraph-mcp/ /root/build/trustgraph-mcp/ WORKDIR /root/build/ +RUN pip3 install --no-cache-dir build wheel + RUN pip3 wheel -w /root/wheels/ --no-deps ./trustgraph-mcp/ RUN ls /root/wheels diff --git a/containers/Containerfile.ocr b/containers/Containerfile.ocr index 43b66463..bb1f3ae2 100644 --- a/containers/Containerfile.ocr +++ b/containers/Containerfile.ocr @@ -12,7 +12,7 @@ RUN dnf install -y python3.12 && \ dnf install -y tesseract poppler-utils && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp && \ + pip3 install --no-cache-dir build wheel aiohttp && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ dnf clean all diff --git a/containers/Containerfile.vertexai b/containers/Containerfile.vertexai index 9d7028c0..9a4bd15f 100644 --- a/containers/Containerfile.vertexai +++ b/containers/Containerfile.vertexai @@ -11,7 +11,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN dnf install -y python3.12 && \ alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ python -m ensurepip --upgrade && \ - pip3 install --no-cache-dir wheel aiohttp && \ + pip3 install --no-cache-dir build wheel aiohttp && \ pip3 install --no-cache-dir pulsar-client==3.7.0 && \ pip3 install --no-cache-dir google-cloud-aiplatform && \ dnf clean all diff --git a/trustgraph-base/pyproject.toml b/trustgraph-base/pyproject.toml new file mode 100644 index 00000000..7f902289 --- /dev/null +++ b/trustgraph-base/pyproject.toml @@ -0,0 +1,28 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-base" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "pulsar-client", + "prometheus-client", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.base_version.__version__"} \ No newline at end of file diff --git a/trustgraph-base/setup.py b/trustgraph-base/setup.py deleted file mode 100644 index 60d8b6c8..00000000 --- a/trustgraph-base/setup.py +++ /dev/null @@ -1,42 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/base_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-base", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "pulsar-client", - "prometheus-client", - ], - scripts=[ - ] -) diff --git a/trustgraph-bedrock/pyproject.toml b/trustgraph-bedrock/pyproject.toml new file mode 100644 index 00000000..27bdc575 --- /dev/null +++ b/trustgraph-bedrock/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-bedrock" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "pulsar-client", + "prometheus-client", + "boto3", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +text-completion-bedrock = "trustgraph.model.text_completion.bedrock:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.bedrock_version.__version__"} \ No newline at end of file diff --git a/trustgraph-bedrock/scripts/text-completion-bedrock b/trustgraph-bedrock/scripts/text-completion-bedrock deleted file mode 100755 index 55c26314..00000000 --- a/trustgraph-bedrock/scripts/text-completion-bedrock +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.bedrock import run - -run() - diff --git a/trustgraph-bedrock/setup.py b/trustgraph-bedrock/setup.py deleted file mode 100644 index 2f4541b4..00000000 --- a/trustgraph-bedrock/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/bedrock_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-bedrock", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "pulsar-client", - "prometheus-client", - "boto3", - ], - scripts=[ - "scripts/text-completion-bedrock", - ] -) diff --git a/trustgraph-cli/pyproject.toml b/trustgraph-cli/pyproject.toml new file mode 100644 index 00000000..6d11ed3e --- /dev/null +++ b/trustgraph-cli/pyproject.toml @@ -0,0 +1,85 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-cli" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "requests", + "pulsar-client", + "aiohttp", + "rdflib", + "tabulate", + "msgpack", + "websockets", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +tg-add-library-document = "trustgraph.cli.add_library_document:main" +tg-delete-flow-class = "trustgraph.cli.delete_flow_class:main" +tg-delete-mcp-tool = "trustgraph.cli.delete_mcp_tool:main" +tg-delete-kg-core = "trustgraph.cli.delete_kg_core:main" +tg-delete-tool = "trustgraph.cli.delete_tool:main" +tg-dump-msgpack = "trustgraph.cli.dump_msgpack:main" +tg-get-flow-class = "trustgraph.cli.get_flow_class:main" +tg-get-kg-core = "trustgraph.cli.get_kg_core:main" +tg-graph-to-turtle = "trustgraph.cli.graph_to_turtle:main" +tg-init-trustgraph = "trustgraph.cli.init_trustgraph:main" +tg-invoke-agent = "trustgraph.cli.invoke_agent:main" +tg-invoke-document-rag = "trustgraph.cli.invoke_document_rag:main" +tg-invoke-graph-rag = "trustgraph.cli.invoke_graph_rag:main" +tg-invoke-llm = "trustgraph.cli.invoke_llm:main" +tg-invoke-mcp-tool = "trustgraph.cli.invoke_mcp_tool:main" +tg-invoke-prompt = "trustgraph.cli.invoke_prompt:main" +tg-load-doc-embeds = "trustgraph.cli.load_doc_embeds:main" +tg-load-kg-core = "trustgraph.cli.load_kg_core:main" +tg-load-pdf = "trustgraph.cli.load_pdf:main" +tg-load-sample-documents = "trustgraph.cli.load_sample_documents:main" +tg-load-text = "trustgraph.cli.load_text:main" +tg-load-turtle = "trustgraph.cli.load_turtle:main" +tg-put-flow-class = "trustgraph.cli.put_flow_class:main" +tg-put-kg-core = "trustgraph.cli.put_kg_core:main" +tg-remove-library-document = "trustgraph.cli.remove_library_document:main" +tg-save-doc-embeds = "trustgraph.cli.save_doc_embeds:main" +tg-set-mcp-tool = "trustgraph.cli.set_mcp_tool:main" +tg-set-prompt = "trustgraph.cli.set_prompt:main" +tg-set-token-costs = "trustgraph.cli.set_token_costs:main" +tg-set-tool = "trustgraph.cli.set_tool:main" +tg-show-config = "trustgraph.cli.show_config:main" +tg-show-flow-classes = "trustgraph.cli.show_flow_classes:main" +tg-show-flow-state = "trustgraph.cli.show_flow_state:main" +tg-show-flows = "trustgraph.cli.show_flows:main" +tg-show-graph = "trustgraph.cli.show_graph:main" +tg-show-kg-cores = "trustgraph.cli.show_kg_cores:main" +tg-show-library-documents = "trustgraph.cli.show_library_documents:main" +tg-show-library-processing = "trustgraph.cli.show_library_processing:main" +tg-show-mcp-tools = "trustgraph.cli.show_mcp_tools:main" +tg-show-processor-state = "trustgraph.cli.show_processor_state:main" +tg-show-prompts = "trustgraph.cli.show_prompts:main" +tg-show-token-costs = "trustgraph.cli.show_token_costs:main" +tg-show-token-rate = "trustgraph.cli.show_token_rate:main" +tg-show-tools = "trustgraph.cli.show_tools:main" +tg-start-flow = "trustgraph.cli.start_flow:main" +tg-unload-kg-core = "trustgraph.cli.unload_kg_core:main" +tg-start-library-processing = "trustgraph.cli.start_library_processing:main" +tg-stop-flow = "trustgraph.cli.stop_flow:main" +tg-stop-library-processing = "trustgraph.cli.stop_library_processing:main" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.cli_version.__version__"} \ No newline at end of file diff --git a/trustgraph-cli/setup.py b/trustgraph-cli/setup.py deleted file mode 100644 index 51b14d6f..00000000 --- a/trustgraph-cli/setup.py +++ /dev/null @@ -1,97 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/cli_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-cli", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "requests", - "pulsar-client", - "aiohttp", - "rdflib", - "tabulate", - "msgpack", - "websockets", - ], - scripts=[ - "scripts/tg-add-library-document", - "scripts/tg-delete-flow-class", - "scripts/tg-delete-mcp-tool", - "scripts/tg-delete-kg-core", - "scripts/tg-delete-tool", - "scripts/tg-dump-msgpack", - "scripts/tg-get-flow-class", - "scripts/tg-get-kg-core", - "scripts/tg-graph-to-turtle", - "scripts/tg-init-trustgraph", - "scripts/tg-invoke-agent", - "scripts/tg-invoke-document-rag", - "scripts/tg-invoke-graph-rag", - "scripts/tg-invoke-llm", - "scripts/tg-invoke-mcp-tool", - "scripts/tg-invoke-prompt", - "scripts/tg-load-doc-embeds", - "scripts/tg-load-kg-core", - "scripts/tg-load-pdf", - "scripts/tg-load-sample-documents", - "scripts/tg-load-text", - "scripts/tg-load-turtle", - "scripts/tg-put-flow-class", - "scripts/tg-put-kg-core", - "scripts/tg-remove-library-document", - "scripts/tg-save-doc-embeds", - "scripts/tg-set-mcp-tool", - "scripts/tg-set-prompt", - "scripts/tg-set-token-costs", - "scripts/tg-set-tool", - "scripts/tg-show-config", - "scripts/tg-show-flow-classes", - "scripts/tg-show-flow-state", - "scripts/tg-show-flows", - "scripts/tg-show-graph", - "scripts/tg-show-kg-cores", - "scripts/tg-show-library-documents", - "scripts/tg-show-library-processing", - "scripts/tg-show-mcp-tools", - "scripts/tg-show-processor-state", - "scripts/tg-show-prompts", - "scripts/tg-show-token-costs", - "scripts/tg-show-token-rate", - "scripts/tg-show-tools", - "scripts/tg-start-flow", - "scripts/tg-unload-kg-core", - "scripts/tg-start-library-processing", - "scripts/tg-stop-flow", - "scripts/tg-stop-library-processing", - ] -) diff --git a/trustgraph-cli/trustgraph/cli/__init__.py b/trustgraph-cli/trustgraph/cli/__init__.py new file mode 100644 index 00000000..8f7e2819 --- /dev/null +++ b/trustgraph-cli/trustgraph/cli/__init__.py @@ -0,0 +1 @@ +# TrustGraph CLI modules \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-add-library-document b/trustgraph-cli/trustgraph/cli/add_library_document.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-add-library-document rename to trustgraph-cli/trustgraph/cli/add_library_document.py index 16e8712b..3273e63d --- a/trustgraph-cli/scripts/tg-add-library-document +++ b/trustgraph-cli/trustgraph/cli/add_library_document.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Loads a document into the library """ @@ -202,5 +200,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-delete-flow-class b/trustgraph-cli/trustgraph/cli/delete_flow_class.py old mode 100755 new mode 100644 similarity index 95% rename from trustgraph-cli/scripts/tg-delete-flow-class rename to trustgraph-cli/trustgraph/cli/delete_flow_class.py index 8ca7adb5..ba0a5a9c --- a/trustgraph-cli/scripts/tg-delete-flow-class +++ b/trustgraph-cli/trustgraph/cli/delete_flow_class.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Deletes a flow class """ @@ -49,5 +47,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-delete-kg-core b/trustgraph-cli/trustgraph/cli/delete_kg_core.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-delete-kg-core rename to trustgraph-cli/trustgraph/cli/delete_kg_core.py index c9b635aa..0d042070 --- a/trustgraph-cli/scripts/tg-delete-kg-core +++ b/trustgraph-cli/trustgraph/cli/delete_kg_core.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Deletes a flow class """ @@ -57,5 +55,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-delete-mcp-tool b/trustgraph-cli/trustgraph/cli/delete_mcp_tool.py similarity index 98% rename from trustgraph-cli/scripts/tg-delete-mcp-tool rename to trustgraph-cli/trustgraph/cli/delete_mcp_tool.py index 11aa1a9e..a3ae7e77 100644 --- a/trustgraph-cli/scripts/tg-delete-mcp-tool +++ b/trustgraph-cli/trustgraph/cli/delete_mcp_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Deletes MCP (Model Control Protocol) tools from the TrustGraph system. Removes MCP tool configurations by ID from the 'mcp' configuration group. @@ -91,4 +89,5 @@ def main(): print("Exception:", e, flush=True) -main() +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-delete-tool b/trustgraph-cli/trustgraph/cli/delete_tool.py similarity index 98% rename from trustgraph-cli/scripts/tg-delete-tool rename to trustgraph-cli/trustgraph/cli/delete_tool.py index 63b73815..961c9aa8 100644 --- a/trustgraph-cli/scripts/tg-delete-tool +++ b/trustgraph-cli/trustgraph/cli/delete_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Deletes tools from the TrustGraph system. Removes tool configurations by ID from the agent configuration @@ -96,5 +94,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-dump-msgpack b/trustgraph-cli/trustgraph/cli/dump_msgpack.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-dump-msgpack rename to trustgraph-cli/trustgraph/cli/dump_msgpack.py index f3b24d73..e3d257e6 --- a/trustgraph-cli/scripts/tg-dump-msgpack +++ b/trustgraph-cli/trustgraph/cli/dump_msgpack.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ This utility reads a knowledge core in msgpack format and outputs its contents in JSON form to standard output. This is useful only as a @@ -89,5 +87,5 @@ def main(): else: dump(**vars(args)) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-get-flow-class b/trustgraph-cli/trustgraph/cli/get_flow_class.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-get-flow-class rename to trustgraph-cli/trustgraph/cli/get_flow_class.py index abe88cba..5479e507 --- a/trustgraph-cli/scripts/tg-get-flow-class +++ b/trustgraph-cli/trustgraph/cli/get_flow_class.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Outputs a flow class definition in JSON format. """ @@ -52,5 +50,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-get-kg-core b/trustgraph-cli/trustgraph/cli/get_kg_core.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-get-kg-core rename to trustgraph-cli/trustgraph/cli/get_kg_core.py index 6eb52bde..6e0a8bc0 --- a/trustgraph-cli/scripts/tg-get-kg-core +++ b/trustgraph-cli/trustgraph/cli/get_kg_core.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uses the knowledge service to fetch a knowledge core which is saved to a local file in msgpack format. @@ -157,5 +155,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-graph-to-turtle b/trustgraph-cli/trustgraph/cli/graph_to_turtle.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-graph-to-turtle rename to trustgraph-cli/trustgraph/cli/graph_to_turtle.py index 6a504f8d..1d34e39f --- a/trustgraph-cli/scripts/tg-graph-to-turtle +++ b/trustgraph-cli/trustgraph/cli/graph_to_turtle.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Connects to the graph query service and dumps all graph edges in Turtle format. @@ -102,5 +100,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-init-pulsar-manager b/trustgraph-cli/trustgraph/cli/init_pulsar_manager.py old mode 100755 new mode 100644 similarity index 100% rename from trustgraph-cli/scripts/tg-init-pulsar-manager rename to trustgraph-cli/trustgraph/cli/init_pulsar_manager.py diff --git a/trustgraph-cli/scripts/tg-init-trustgraph b/trustgraph-cli/trustgraph/cli/init_trustgraph.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-init-trustgraph rename to trustgraph-cli/trustgraph/cli/init_trustgraph.py index 84c34b61..bed56a73 --- a/trustgraph-cli/scripts/tg-init-trustgraph +++ b/trustgraph-cli/trustgraph/cli/init_trustgraph.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Initialises Pulsar with Trustgraph tenant / namespaces & policy. """ @@ -237,5 +235,5 @@ def main(): time.sleep(2) print("Will retry...", flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-agent b/trustgraph-cli/trustgraph/cli/invoke_agent.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-invoke-agent rename to trustgraph-cli/trustgraph/cli/invoke_agent.py index 32408164..4b861919 --- a/trustgraph-cli/scripts/tg-invoke-agent +++ b/trustgraph-cli/trustgraph/cli/invoke_agent.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uses the agent service to answer a question """ @@ -169,5 +167,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-document-rag b/trustgraph-cli/trustgraph/cli/invoke_document_rag.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-invoke-document-rag rename to trustgraph-cli/trustgraph/cli/invoke_document_rag.py index 7600988b..8f8c627c --- a/trustgraph-cli/scripts/tg-invoke-document-rag +++ b/trustgraph-cli/trustgraph/cli/invoke_document_rag.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uses the DocumentRAG service to answer a question """ @@ -84,5 +82,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-graph-rag b/trustgraph-cli/trustgraph/cli/invoke_graph_rag.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-invoke-graph-rag rename to trustgraph-cli/trustgraph/cli/invoke_graph_rag.py index 0c2311fc..cf7c64be --- a/trustgraph-cli/scripts/tg-invoke-graph-rag +++ b/trustgraph-cli/trustgraph/cli/invoke_graph_rag.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uses the GraphRAG service to answer a question """ @@ -113,5 +111,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-llm b/trustgraph-cli/trustgraph/cli/invoke_llm.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-invoke-llm rename to trustgraph-cli/trustgraph/cli/invoke_llm.py index d0f88510..d29286fb --- a/trustgraph-cli/scripts/tg-invoke-llm +++ b/trustgraph-cli/trustgraph/cli/invoke_llm.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Invokes the text completion service by specifying an LLM system prompt and user prompt. Both arguments are required. @@ -66,5 +64,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-mcp-tool b/trustgraph-cli/trustgraph/cli/invoke_mcp_tool.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-invoke-mcp-tool rename to trustgraph-cli/trustgraph/cli/invoke_mcp_tool.py index e5fb148f..c5700c5c --- a/trustgraph-cli/scripts/tg-invoke-mcp-tool +++ b/trustgraph-cli/trustgraph/cli/invoke_mcp_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Invokes MCP (Model Control Protocol) tools through the TrustGraph API. Allows calling MCP tools by specifying the tool name and providing @@ -76,5 +74,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-invoke-prompt b/trustgraph-cli/trustgraph/cli/invoke_prompt.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-invoke-prompt rename to trustgraph-cli/trustgraph/cli/invoke_prompt.py index d8cc71e8..630a9281 --- a/trustgraph-cli/scripts/tg-invoke-prompt +++ b/trustgraph-cli/trustgraph/cli/invoke_prompt.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Invokes the LLM prompt service by specifying the prompt template to use and values for the variables in the prompt template. The @@ -86,5 +84,5 @@ specified multiple times''', print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-load-doc-embeds b/trustgraph-cli/trustgraph/cli/load_doc_embeds.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-load-doc-embeds rename to trustgraph-cli/trustgraph/cli/load_doc_embeds.py index c89f620c..7e7f4865 --- a/trustgraph-cli/scripts/tg-load-doc-embeds +++ b/trustgraph-cli/trustgraph/cli/load_doc_embeds.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ This utility takes a document embeddings core and loads it into a running TrustGraph through the API. The document embeddings core should be in msgpack diff --git a/trustgraph-cli/scripts/tg-load-kg-core b/trustgraph-cli/trustgraph/cli/load_kg_core.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-load-kg-core rename to trustgraph-cli/trustgraph/cli/load_kg_core.py index b50cec82..f19e8eb0 --- a/trustgraph-cli/scripts/tg-load-kg-core +++ b/trustgraph-cli/trustgraph/cli/load_kg_core.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Starts a load operation on a knowledge core which is already stored by the knowledge manager. You could load a core with tg-put-kg-core and then @@ -76,5 +74,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-load-pdf b/trustgraph-cli/trustgraph/cli/load_pdf.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-load-pdf rename to trustgraph-cli/trustgraph/cli/load_pdf.py index 93771379..d305cb4b --- a/trustgraph-cli/scripts/tg-load-pdf +++ b/trustgraph-cli/trustgraph/cli/load_pdf.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Loads a PDF document into TrustGraph processing by directing to the pdf-decoder queue. @@ -198,5 +196,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-load-sample-documents b/trustgraph-cli/trustgraph/cli/load_sample_documents.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-load-sample-documents rename to trustgraph-cli/trustgraph/cli/load_sample_documents.py index 880fb9e8..fd6751be --- a/trustgraph-cli/scripts/tg-load-sample-documents +++ b/trustgraph-cli/trustgraph/cli/load_sample_documents.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Loads a PDF document into the library """ @@ -737,5 +735,5 @@ def main(): print("Exception:", e, flush=True) raise e -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-load-text b/trustgraph-cli/trustgraph/cli/load_text.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-load-text rename to trustgraph-cli/trustgraph/cli/load_text.py index e1752324..594d1c04 --- a/trustgraph-cli/scripts/tg-load-text +++ b/trustgraph-cli/trustgraph/cli/load_text.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Loads a text document into TrustGraph processing by directing to a text loader queue. @@ -203,6 +201,5 @@ def main(): print("Exception:", e, flush=True) -main() - - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-load-turtle b/trustgraph-cli/trustgraph/cli/load_turtle.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-load-turtle rename to trustgraph-cli/trustgraph/cli/load_turtle.py index f10fd760..c357c5d9 --- a/trustgraph-cli/scripts/tg-load-turtle +++ b/trustgraph-cli/trustgraph/cli/load_turtle.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Loads triples into the knowledge graph. """ @@ -157,5 +155,5 @@ def main(): time.sleep(10) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-put-flow-class b/trustgraph-cli/trustgraph/cli/put_flow_class.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-put-flow-class rename to trustgraph-cli/trustgraph/cli/put_flow_class.py index 74c29bf3..5b4bc44b --- a/trustgraph-cli/scripts/tg-put-flow-class +++ b/trustgraph-cli/trustgraph/cli/put_flow_class.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uploads a flow class definition. You can take the output of tg-get-flow-class and load it back in using this utility. @@ -55,5 +53,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-put-kg-core b/trustgraph-cli/trustgraph/cli/put_kg_core.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-put-kg-core rename to trustgraph-cli/trustgraph/cli/put_kg_core.py index 1184d6f7..6374e2f6 --- a/trustgraph-cli/scripts/tg-put-kg-core +++ b/trustgraph-cli/trustgraph/cli/put_kg_core.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Uses the agent service to answer a question """ @@ -179,5 +177,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-remove-library-document b/trustgraph-cli/trustgraph/cli/remove_library_document.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-remove-library-document rename to trustgraph-cli/trustgraph/cli/remove_library_document.py index 74f7ef27..f6e6813c --- a/trustgraph-cli/scripts/tg-remove-library-document +++ b/trustgraph-cli/trustgraph/cli/remove_library_document.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Remove a document from the library """ @@ -55,5 +53,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-save-doc-embeds b/trustgraph-cli/trustgraph/cli/save_doc_embeds.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-save-doc-embeds rename to trustgraph-cli/trustgraph/cli/save_doc_embeds.py index 9e86ce6b..8fdd335d --- a/trustgraph-cli/scripts/tg-save-doc-embeds +++ b/trustgraph-cli/trustgraph/cli/save_doc_embeds.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ This utility connects to a running TrustGraph through the API and creates a document embeddings core from the data streaming through the processing diff --git a/trustgraph-cli/scripts/tg-set-mcp-tool b/trustgraph-cli/trustgraph/cli/set_mcp_tool.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-set-mcp-tool rename to trustgraph-cli/trustgraph/cli/set_mcp_tool.py index 26991d60..b48c6d86 --- a/trustgraph-cli/scripts/tg-set-mcp-tool +++ b/trustgraph-cli/trustgraph/cli/set_mcp_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Configures and registers MCP (Model Context Protocol) tools in the TrustGraph system. @@ -107,5 +105,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-set-prompt b/trustgraph-cli/trustgraph/cli/set_prompt.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-set-prompt rename to trustgraph-cli/trustgraph/cli/set_prompt.py index c19326e5..f287a9cc --- a/trustgraph-cli/scripts/tg-set-prompt +++ b/trustgraph-cli/trustgraph/cli/set_prompt.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Sets a prompt template. """ @@ -139,5 +137,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-set-token-costs b/trustgraph-cli/trustgraph/cli/set_token_costs.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-set-token-costs rename to trustgraph-cli/trustgraph/cli/set_token_costs.py index 0c250fc2..87a4e264 --- a/trustgraph-cli/scripts/tg-set-token-costs +++ b/trustgraph-cli/trustgraph/cli/set_token_costs.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Sets a model's token costs. """ @@ -107,5 +105,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-set-tool b/trustgraph-cli/trustgraph/cli/set_tool.py old mode 100755 new mode 100644 similarity index 99% rename from trustgraph-cli/scripts/tg-set-tool rename to trustgraph-cli/trustgraph/cli/set_tool.py index a4c17527..ca86c9be --- a/trustgraph-cli/scripts/tg-set-tool +++ b/trustgraph-cli/trustgraph/cli/set_tool.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Configures and registers tools in the TrustGraph system. @@ -222,5 +220,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-config b/trustgraph-cli/trustgraph/cli/show_config.py old mode 100755 new mode 100644 similarity index 95% rename from trustgraph-cli/scripts/tg-show-config rename to trustgraph-cli/trustgraph/cli/show_config.py index efbd34a0..03b2636a --- a/trustgraph-cli/scripts/tg-show-config +++ b/trustgraph-cli/trustgraph/cli/show_config.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dumps out the current configuration """ @@ -45,5 +43,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-flow-classes b/trustgraph-cli/trustgraph/cli/show_flow_classes.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-flow-classes rename to trustgraph-cli/trustgraph/cli/show_flow_classes.py index f0d2c510..4cf6fc2f --- a/trustgraph-cli/scripts/tg-show-flow-classes +++ b/trustgraph-cli/trustgraph/cli/show_flow_classes.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Shows all defined flow classes. """ @@ -65,5 +63,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-flow-state b/trustgraph-cli/trustgraph/cli/show_flow_state.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-show-flow-state rename to trustgraph-cli/trustgraph/cli/show_flow_state.py index 0c430959..ca6d2b1d --- a/trustgraph-cli/scripts/tg-show-flow-state +++ b/trustgraph-cli/trustgraph/cli/show_flow_state.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dump out a flow's processor states """ @@ -89,5 +87,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-flows b/trustgraph-cli/trustgraph/cli/show_flows.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-show-flows rename to trustgraph-cli/trustgraph/cli/show_flows.py index edc55516..a405d830 --- a/trustgraph-cli/scripts/tg-show-flows +++ b/trustgraph-cli/trustgraph/cli/show_flows.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Shows configured flows. """ @@ -110,5 +108,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-graph b/trustgraph-cli/trustgraph/cli/show_graph.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-graph rename to trustgraph-cli/trustgraph/cli/show_graph.py index bfe68de6..232ebb34 --- a/trustgraph-cli/scripts/tg-show-graph +++ b/trustgraph-cli/trustgraph/cli/show_graph.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Connects to the graph query service and dumps all graph edges. """ @@ -70,5 +68,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-kg-cores b/trustgraph-cli/trustgraph/cli/show_kg_cores.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-show-kg-cores rename to trustgraph-cli/trustgraph/cli/show_kg_cores.py index cd908485..e3cf9eb4 --- a/trustgraph-cli/scripts/tg-show-kg-cores +++ b/trustgraph-cli/trustgraph/cli/show_kg_cores.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Shows knowledge cores """ @@ -55,5 +53,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-library-documents b/trustgraph-cli/trustgraph/cli/show_library_documents.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-library-documents rename to trustgraph-cli/trustgraph/cli/show_library_documents.py index 47062efc..b086238d --- a/trustgraph-cli/scripts/tg-show-library-documents +++ b/trustgraph-cli/trustgraph/cli/show_library_documents.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Shows all loaded library documents """ @@ -72,5 +70,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-library-processing b/trustgraph-cli/trustgraph/cli/show_library_processing.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-library-processing rename to trustgraph-cli/trustgraph/cli/show_library_processing.py index 9390afe2..51dbe865 --- a/trustgraph-cli/scripts/tg-show-library-processing +++ b/trustgraph-cli/trustgraph/cli/show_library_processing.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ """ @@ -71,5 +69,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-mcp-tools b/trustgraph-cli/trustgraph/cli/show_mcp_tools.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-mcp-tools rename to trustgraph-cli/trustgraph/cli/show_mcp_tools.py index 587aeee7..c22b69ed --- a/trustgraph-cli/scripts/tg-show-mcp-tools +++ b/trustgraph-cli/trustgraph/cli/show_mcp_tools.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Displays the current MCP (Model Context Protocol) tool configuration """ @@ -65,5 +63,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-processor-state b/trustgraph-cli/trustgraph/cli/show_processor_state.py old mode 100755 new mode 100644 similarity index 96% rename from trustgraph-cli/scripts/tg-show-processor-state rename to trustgraph-cli/trustgraph/cli/show_processor_state.py index e66b1cc2..b4ae4a16 --- a/trustgraph-cli/scripts/tg-show-processor-state +++ b/trustgraph-cli/trustgraph/cli/show_processor_state.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dump out TrustGraph processor states. """ @@ -51,5 +49,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-prompts b/trustgraph-cli/trustgraph/cli/show_prompts.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-prompts rename to trustgraph-cli/trustgraph/cli/show_prompts.py index 98a8445e..4c2ca4d7 --- a/trustgraph-cli/scripts/tg-show-prompts +++ b/trustgraph-cli/trustgraph/cli/show_prompts.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dumps out the current prompts """ @@ -92,5 +90,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-token-costs b/trustgraph-cli/trustgraph/cli/show_token_costs.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-show-token-costs rename to trustgraph-cli/trustgraph/cli/show_token_costs.py index 1ebad213..2f889eef --- a/trustgraph-cli/scripts/tg-show-token-costs +++ b/trustgraph-cli/trustgraph/cli/show_token_costs.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dumps out token cost configuration """ @@ -75,5 +73,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-token-rate b/trustgraph-cli/trustgraph/cli/show_token_rate.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-show-token-rate rename to trustgraph-cli/trustgraph/cli/show_token_rate.py index 800569e5..04e7dd6a --- a/trustgraph-cli/scripts/tg-show-token-rate +++ b/trustgraph-cli/trustgraph/cli/show_token_rate.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Dump out a stream of token rates, input, output and total. This is averaged across the time since tg-show-token-rate is started. @@ -105,5 +103,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-show-tools b/trustgraph-cli/trustgraph/cli/show_tools.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-show-tools rename to trustgraph-cli/trustgraph/cli/show_tools.py index fa48f2e1..2a596238 --- a/trustgraph-cli/scripts/tg-show-tools +++ b/trustgraph-cli/trustgraph/cli/show_tools.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Displays the current agent tool configurations @@ -89,5 +87,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-start-flow b/trustgraph-cli/trustgraph/cli/start_flow.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-start-flow rename to trustgraph-cli/trustgraph/cli/start_flow.py index beb5de7e..36048474 --- a/trustgraph-cli/scripts/tg-start-flow +++ b/trustgraph-cli/trustgraph/cli/start_flow.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Starts a processing flow using a defined flow class """ @@ -68,5 +66,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-start-library-processing b/trustgraph-cli/trustgraph/cli/start_library_processing.py old mode 100755 new mode 100644 similarity index 98% rename from trustgraph-cli/scripts/tg-start-library-processing rename to trustgraph-cli/trustgraph/cli/start_library_processing.py index aa59606b..3619628c --- a/trustgraph-cli/scripts/tg-start-library-processing +++ b/trustgraph-cli/trustgraph/cli/start_library_processing.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Submits a library document for processing """ @@ -99,5 +97,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-stop-flow b/trustgraph-cli/trustgraph/cli/stop_flow.py old mode 100755 new mode 100644 similarity index 95% rename from trustgraph-cli/scripts/tg-stop-flow rename to trustgraph-cli/trustgraph/cli/stop_flow.py index e92f611c..a5107579 --- a/trustgraph-cli/scripts/tg-stop-flow +++ b/trustgraph-cli/trustgraph/cli/stop_flow.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Stops a processing flow. """ @@ -50,5 +48,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-stop-library-processing b/trustgraph-cli/trustgraph/cli/stop_library_processing.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-stop-library-processing rename to trustgraph-cli/trustgraph/cli/stop_library_processing.py index bb041b05..638ab71c --- a/trustgraph-cli/scripts/tg-stop-library-processing +++ b/trustgraph-cli/trustgraph/cli/stop_library_processing.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Removes a library document processing record. This is just a record of procesing, it doesn't stop in-flight processing at the moment. @@ -61,5 +59,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-cli/scripts/tg-unload-kg-core b/trustgraph-cli/trustgraph/cli/unload_kg_core.py old mode 100755 new mode 100644 similarity index 97% rename from trustgraph-cli/scripts/tg-unload-kg-core rename to trustgraph-cli/trustgraph/cli/unload_kg_core.py index b24dc231..76a28073 --- a/trustgraph-cli/scripts/tg-unload-kg-core +++ b/trustgraph-cli/trustgraph/cli/unload_kg_core.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python3 - """ Starts a load operation on a knowledge core which is already stored by the knowledge manager. You could load a core with tg-put-kg-core and then @@ -68,5 +66,5 @@ def main(): print("Exception:", e, flush=True) -main() - +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/trustgraph-embeddings-hf/pyproject.toml b/trustgraph-embeddings-hf/pyproject.toml new file mode 100644 index 00000000..c3b286f7 --- /dev/null +++ b/trustgraph-embeddings-hf/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-embeddings-hf" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "HuggingFace embeddings support for TrustGraph." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "trustgraph-flow>=1.2,<1.3", + "torch", + "urllib3", + "transformers", + "sentence-transformers", + "langchain", + "langchain-core", + "langchain-huggingface", + "langchain-community", + "huggingface-hub", + "pulsar-client", + "pyyaml", + "prometheus-client", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +embeddings-hf = "trustgraph.embeddings.hf:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.embeddings_hf_version.__version__"} \ No newline at end of file diff --git a/trustgraph-embeddings-hf/scripts/embeddings-hf b/trustgraph-embeddings-hf/scripts/embeddings-hf deleted file mode 100644 index a7d84d04..00000000 --- a/trustgraph-embeddings-hf/scripts/embeddings-hf +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.embeddings.hf import run - -run() - diff --git a/trustgraph-embeddings-hf/setup.py b/trustgraph-embeddings-hf/setup.py deleted file mode 100644 index ce40f927..00000000 --- a/trustgraph-embeddings-hf/setup.py +++ /dev/null @@ -1,55 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/embeddings_hf_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-embeddings-hf", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="HuggingFace embeddings support for TrustGraph.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "trustgraph-flow>=1.2,<1.3", - "torch", - "urllib3", - "transformers", - "sentence-transformers", - "langchain", - "langchain-core", - "langchain-huggingface", - "langchain-community", - "huggingface-hub", - "pulsar-client", - "pyyaml", - "prometheus-client", - ], - scripts=[ - "scripts/embeddings-hf", - ] -) diff --git a/trustgraph-flow/pyproject.toml b/trustgraph-flow/pyproject.toml new file mode 100644 index 00000000..c7eef10b --- /dev/null +++ b/trustgraph-flow/pyproject.toml @@ -0,0 +1,123 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-flow" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "aiohttp", + "anthropic", + "cassandra-driver", + "cohere", + "cryptography", + "falkordb", + "fastembed", + "google-genai", + "ibis", + "jsonschema", + "langchain", + "langchain-community", + "langchain-core", + "langchain-text-splitters", + "mcp", + "minio", + "mistralai", + "neo4j", + "ollama", + "openai", + "pinecone[grpc]", + "prometheus-client", + "pulsar-client", + "pymilvus", + "pypdf", + "mistralai", + "pyyaml", + "qdrant-client", + "rdflib", + "requests", + "tabulate", + "tiktoken", + "urllib3", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +agent-manager-react = "trustgraph.agent.react:run" +api-gateway = "trustgraph.gateway:run" +chunker-recursive = "trustgraph.chunking.recursive:run" +chunker-token = "trustgraph.chunking.token:run" +config-svc = "trustgraph.config.service:run" +de-query-milvus = "trustgraph.query.doc_embeddings.milvus:run" +de-query-pinecone = "trustgraph.query.doc_embeddings.pinecone:run" +de-query-qdrant = "trustgraph.query.doc_embeddings.qdrant:run" +de-write-milvus = "trustgraph.storage.doc_embeddings.milvus:run" +de-write-pinecone = "trustgraph.storage.doc_embeddings.pinecone:run" +de-write-qdrant = "trustgraph.storage.doc_embeddings.qdrant:run" +document-embeddings = "trustgraph.embeddings.document_embeddings:run" +document-rag = "trustgraph.retrieval.document_rag:run" +embeddings-fastembed = "trustgraph.embeddings.fastembed:run" +embeddings-ollama = "trustgraph.embeddings.ollama:run" +ge-query-milvus = "trustgraph.query.graph_embeddings.milvus:run" +ge-query-pinecone = "trustgraph.query.graph_embeddings.pinecone:run" +ge-query-qdrant = "trustgraph.query.graph_embeddings.qdrant:run" +ge-write-milvus = "trustgraph.storage.graph_embeddings.milvus:run" +ge-write-pinecone = "trustgraph.storage.graph_embeddings.pinecone:run" +ge-write-qdrant = "trustgraph.storage.graph_embeddings.qdrant:run" +graph-embeddings = "trustgraph.embeddings.graph_embeddings:run" +graph-rag = "trustgraph.retrieval.graph_rag:run" +kg-extract-agent = "trustgraph.extract.kg.agent:run" +kg-extract-definitions = "trustgraph.extract.kg.definitions:run" +kg-extract-relationships = "trustgraph.extract.kg.relationships:run" +kg-extract-topics = "trustgraph.extract.kg.topics:run" +kg-manager = "trustgraph.cores:run" +kg-store = "trustgraph.storage.knowledge:run" +librarian = "trustgraph.librarian:run" +mcp-tool = "trustgraph.agent.mcp_tool:run" +metering = "trustgraph.metering:run" +object-extract-row = "trustgraph.extract.object.row:run" +oe-write-milvus = "trustgraph.storage.object_embeddings.milvus:run" +pdf-decoder = "trustgraph.decoding.pdf:run" +pdf-ocr-mistral = "trustgraph.decoding.mistral_ocr:run" +prompt-template = "trustgraph.prompt.template:run" +rev-gateway = "trustgraph.rev_gateway:run" +rows-write-cassandra = "trustgraph.storage.rows.cassandra:run" +run-processing = "trustgraph.processing:run" +text-completion-azure = "trustgraph.model.text_completion.azure:run" +text-completion-azure-openai = "trustgraph.model.text_completion.azure_openai:run" +text-completion-claude = "trustgraph.model.text_completion.claude:run" +text-completion-cohere = "trustgraph.model.text_completion.cohere:run" +text-completion-googleaistudio = "trustgraph.model.text_completion.googleaistudio:run" +text-completion-llamafile = "trustgraph.model.text_completion.llamafile:run" +text-completion-lmstudio = "trustgraph.model.text_completion.lmstudio:run" +text-completion-mistral = "trustgraph.model.text_completion.mistral:run" +text-completion-ollama = "trustgraph.model.text_completion.ollama:run" +text-completion-openai = "trustgraph.model.text_completion.openai:run" +text-completion-tgi = "trustgraph.model.text_completion.tgi:run" +text-completion-vllm = "trustgraph.model.text_completion.vllm:run" +triples-query-cassandra = "trustgraph.query.triples.cassandra:run" +triples-query-falkordb = "trustgraph.query.triples.falkordb:run" +triples-query-memgraph = "trustgraph.query.triples.memgraph:run" +triples-query-neo4j = "trustgraph.query.triples.neo4j:run" +triples-write-cassandra = "trustgraph.storage.triples.cassandra:run" +triples-write-falkordb = "trustgraph.storage.triples.falkordb:run" +triples-write-memgraph = "trustgraph.storage.triples.memgraph:run" +triples-write-neo4j = "trustgraph.storage.triples.neo4j:run" +wikipedia-lookup = "trustgraph.external.wikipedia:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.flow_version.__version__"} \ No newline at end of file diff --git a/trustgraph-flow/scripts/agent-manager-react b/trustgraph-flow/scripts/agent-manager-react deleted file mode 100644 index b5e060c7..00000000 --- a/trustgraph-flow/scripts/agent-manager-react +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.agent.react import run - -run() - diff --git a/trustgraph-flow/scripts/api-gateway b/trustgraph-flow/scripts/api-gateway deleted file mode 100755 index f7ba0fda..00000000 --- a/trustgraph-flow/scripts/api-gateway +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.gateway import run - -run() - diff --git a/trustgraph-flow/scripts/chunker-recursive b/trustgraph-flow/scripts/chunker-recursive deleted file mode 100755 index 041a72d4..00000000 --- a/trustgraph-flow/scripts/chunker-recursive +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.chunking.recursive import run - -run() - diff --git a/trustgraph-flow/scripts/chunker-token b/trustgraph-flow/scripts/chunker-token deleted file mode 100755 index 5090defa..00000000 --- a/trustgraph-flow/scripts/chunker-token +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.chunking.token import run - -run() - diff --git a/trustgraph-flow/scripts/config-svc b/trustgraph-flow/scripts/config-svc deleted file mode 100755 index 9debd391..00000000 --- a/trustgraph-flow/scripts/config-svc +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.config.service import run - -run() - diff --git a/trustgraph-flow/scripts/de-query-milvus b/trustgraph-flow/scripts/de-query-milvus deleted file mode 100755 index 15e237c3..00000000 --- a/trustgraph-flow/scripts/de-query-milvus +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.doc_embeddings.milvus import run - -run() - diff --git a/trustgraph-flow/scripts/de-query-pinecone b/trustgraph-flow/scripts/de-query-pinecone deleted file mode 100755 index b21d9045..00000000 --- a/trustgraph-flow/scripts/de-query-pinecone +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.doc_embeddings.pinecone import run - -run() - diff --git a/trustgraph-flow/scripts/de-query-qdrant b/trustgraph-flow/scripts/de-query-qdrant deleted file mode 100755 index 2f0e7d6e..00000000 --- a/trustgraph-flow/scripts/de-query-qdrant +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.doc_embeddings.qdrant import run - -run() - diff --git a/trustgraph-flow/scripts/de-write-milvus b/trustgraph-flow/scripts/de-write-milvus deleted file mode 100755 index 644674d0..00000000 --- a/trustgraph-flow/scripts/de-write-milvus +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.doc_embeddings.milvus import run - -run() - diff --git a/trustgraph-flow/scripts/de-write-pinecone b/trustgraph-flow/scripts/de-write-pinecone deleted file mode 100755 index eb604747..00000000 --- a/trustgraph-flow/scripts/de-write-pinecone +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.doc_embeddings.pinecone import run - -run() - diff --git a/trustgraph-flow/scripts/de-write-qdrant b/trustgraph-flow/scripts/de-write-qdrant deleted file mode 100755 index 1550291f..00000000 --- a/trustgraph-flow/scripts/de-write-qdrant +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.doc_embeddings.qdrant import run - -run() - diff --git a/trustgraph-flow/scripts/document-embeddings b/trustgraph-flow/scripts/document-embeddings deleted file mode 100755 index 26bb85b0..00000000 --- a/trustgraph-flow/scripts/document-embeddings +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.embeddings.document_embeddings import run - -run() - diff --git a/trustgraph-flow/scripts/document-rag b/trustgraph-flow/scripts/document-rag deleted file mode 100755 index e4cf5401..00000000 --- a/trustgraph-flow/scripts/document-rag +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.retrieval.document_rag import run - -run() - diff --git a/trustgraph-flow/scripts/embeddings-fastembed b/trustgraph-flow/scripts/embeddings-fastembed deleted file mode 100755 index e1322269..00000000 --- a/trustgraph-flow/scripts/embeddings-fastembed +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.embeddings.fastembed import run - -run() - diff --git a/trustgraph-flow/scripts/embeddings-ollama b/trustgraph-flow/scripts/embeddings-ollama deleted file mode 100755 index 185eed59..00000000 --- a/trustgraph-flow/scripts/embeddings-ollama +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.embeddings.ollama import run - -run() - diff --git a/trustgraph-flow/scripts/ge-query-milvus b/trustgraph-flow/scripts/ge-query-milvus deleted file mode 100755 index 179750cb..00000000 --- a/trustgraph-flow/scripts/ge-query-milvus +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.graph_embeddings.milvus import run - -run() - diff --git a/trustgraph-flow/scripts/ge-query-pinecone b/trustgraph-flow/scripts/ge-query-pinecone deleted file mode 100755 index b75aec78..00000000 --- a/trustgraph-flow/scripts/ge-query-pinecone +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.graph_embeddings.pinecone import run - -run() - diff --git a/trustgraph-flow/scripts/ge-query-qdrant b/trustgraph-flow/scripts/ge-query-qdrant deleted file mode 100755 index 7039d17a..00000000 --- a/trustgraph-flow/scripts/ge-query-qdrant +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.graph_embeddings.qdrant import run - -run() - diff --git a/trustgraph-flow/scripts/ge-write-milvus b/trustgraph-flow/scripts/ge-write-milvus deleted file mode 100755 index 0b18faf8..00000000 --- a/trustgraph-flow/scripts/ge-write-milvus +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.graph_embeddings.milvus import run - -run() - diff --git a/trustgraph-flow/scripts/ge-write-pinecone b/trustgraph-flow/scripts/ge-write-pinecone deleted file mode 100755 index 802a8377..00000000 --- a/trustgraph-flow/scripts/ge-write-pinecone +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.graph_embeddings.pinecone import run - -run() - diff --git a/trustgraph-flow/scripts/ge-write-qdrant b/trustgraph-flow/scripts/ge-write-qdrant deleted file mode 100755 index 4276fd2b..00000000 --- a/trustgraph-flow/scripts/ge-write-qdrant +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.graph_embeddings.qdrant import run - -run() - diff --git a/trustgraph-flow/scripts/graph-embeddings b/trustgraph-flow/scripts/graph-embeddings deleted file mode 100755 index 29b1fbf4..00000000 --- a/trustgraph-flow/scripts/graph-embeddings +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.embeddings.graph_embeddings import run - -run() - diff --git a/trustgraph-flow/scripts/graph-rag b/trustgraph-flow/scripts/graph-rag deleted file mode 100755 index 6b18b689..00000000 --- a/trustgraph-flow/scripts/graph-rag +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.retrieval.graph_rag import run - -run() - diff --git a/trustgraph-flow/scripts/kg-extract-agent b/trustgraph-flow/scripts/kg-extract-agent deleted file mode 100755 index 732d37c4..00000000 --- a/trustgraph-flow/scripts/kg-extract-agent +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.extract.kg.agent import run - -run() - diff --git a/trustgraph-flow/scripts/kg-extract-definitions b/trustgraph-flow/scripts/kg-extract-definitions deleted file mode 100755 index 7f20225b..00000000 --- a/trustgraph-flow/scripts/kg-extract-definitions +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.extract.kg.definitions import run - -run() - diff --git a/trustgraph-flow/scripts/kg-extract-relationships b/trustgraph-flow/scripts/kg-extract-relationships deleted file mode 100755 index f57d7c89..00000000 --- a/trustgraph-flow/scripts/kg-extract-relationships +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.extract.kg.relationships import run - -run() - diff --git a/trustgraph-flow/scripts/kg-extract-topics b/trustgraph-flow/scripts/kg-extract-topics deleted file mode 100755 index e8ff2688..00000000 --- a/trustgraph-flow/scripts/kg-extract-topics +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.extract.kg.topics import run - -run() - diff --git a/trustgraph-flow/scripts/kg-manager b/trustgraph-flow/scripts/kg-manager deleted file mode 100644 index ee8ec923..00000000 --- a/trustgraph-flow/scripts/kg-manager +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.cores import run - -run() - diff --git a/trustgraph-flow/scripts/kg-store b/trustgraph-flow/scripts/kg-store deleted file mode 100644 index 1a5ba9ef..00000000 --- a/trustgraph-flow/scripts/kg-store +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.knowledge import run - -run() - diff --git a/trustgraph-flow/scripts/librarian b/trustgraph-flow/scripts/librarian deleted file mode 100755 index 9f6458ab..00000000 --- a/trustgraph-flow/scripts/librarian +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.librarian import run - -run() - diff --git a/trustgraph-flow/scripts/mcp-tool b/trustgraph-flow/scripts/mcp-tool deleted file mode 100755 index 369df360..00000000 --- a/trustgraph-flow/scripts/mcp-tool +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.agent.mcp_tool import run - -run() - diff --git a/trustgraph-flow/scripts/metering b/trustgraph-flow/scripts/metering deleted file mode 100755 index 7f1d0e12..00000000 --- a/trustgraph-flow/scripts/metering +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.metering import run - -run() \ No newline at end of file diff --git a/trustgraph-flow/scripts/object-extract-row b/trustgraph-flow/scripts/object-extract-row deleted file mode 100755 index 04cbcfef..00000000 --- a/trustgraph-flow/scripts/object-extract-row +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.extract.object.row import run - -run() - diff --git a/trustgraph-flow/scripts/oe-write-milvus b/trustgraph-flow/scripts/oe-write-milvus deleted file mode 100755 index c78f2000..00000000 --- a/trustgraph-flow/scripts/oe-write-milvus +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.object_embeddings.milvus import run - -run() - diff --git a/trustgraph-flow/scripts/pdf-decoder b/trustgraph-flow/scripts/pdf-decoder deleted file mode 100755 index 0de6a9be..00000000 --- a/trustgraph-flow/scripts/pdf-decoder +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.decoding.pdf import run - -run() - diff --git a/trustgraph-flow/scripts/pdf-ocr-mistral b/trustgraph-flow/scripts/pdf-ocr-mistral deleted file mode 100755 index fb086767..00000000 --- a/trustgraph-flow/scripts/pdf-ocr-mistral +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.decoding.mistral_ocr import run - -run() - diff --git a/trustgraph-flow/scripts/prompt-template b/trustgraph-flow/scripts/prompt-template deleted file mode 100755 index 65f68a9c..00000000 --- a/trustgraph-flow/scripts/prompt-template +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.prompt.template import run - -run() - diff --git a/trustgraph-flow/scripts/rev-gateway b/trustgraph-flow/scripts/rev-gateway deleted file mode 100755 index 708c6c96..00000000 --- a/trustgraph-flow/scripts/rev-gateway +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.rev_gateway import run - -run() - diff --git a/trustgraph-flow/scripts/rows-write-cassandra b/trustgraph-flow/scripts/rows-write-cassandra deleted file mode 100755 index a1358f5e..00000000 --- a/trustgraph-flow/scripts/rows-write-cassandra +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.rows.cassandra import run - -run() - diff --git a/trustgraph-flow/scripts/run-processing b/trustgraph-flow/scripts/run-processing deleted file mode 100755 index cdfbb871..00000000 --- a/trustgraph-flow/scripts/run-processing +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.processing import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-azure b/trustgraph-flow/scripts/text-completion-azure deleted file mode 100755 index 965bf956..00000000 --- a/trustgraph-flow/scripts/text-completion-azure +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.azure import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-azure-openai b/trustgraph-flow/scripts/text-completion-azure-openai deleted file mode 100755 index f989d4b7..00000000 --- a/trustgraph-flow/scripts/text-completion-azure-openai +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.azure_openai import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-claude b/trustgraph-flow/scripts/text-completion-claude deleted file mode 100755 index b9175375..00000000 --- a/trustgraph-flow/scripts/text-completion-claude +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.claude import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-cohere b/trustgraph-flow/scripts/text-completion-cohere deleted file mode 100755 index 42110db6..00000000 --- a/trustgraph-flow/scripts/text-completion-cohere +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.cohere import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-googleaistudio b/trustgraph-flow/scripts/text-completion-googleaistudio deleted file mode 100755 index 4d2b0784..00000000 --- a/trustgraph-flow/scripts/text-completion-googleaistudio +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.googleaistudio import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-llamafile b/trustgraph-flow/scripts/text-completion-llamafile deleted file mode 100755 index 38c48ac2..00000000 --- a/trustgraph-flow/scripts/text-completion-llamafile +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.llamafile import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-lmstudio b/trustgraph-flow/scripts/text-completion-lmstudio deleted file mode 100755 index 7b9e259e..00000000 --- a/trustgraph-flow/scripts/text-completion-lmstudio +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.lmstudio import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-mistral b/trustgraph-flow/scripts/text-completion-mistral deleted file mode 100755 index 91ef2279..00000000 --- a/trustgraph-flow/scripts/text-completion-mistral +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.mistral import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-ollama b/trustgraph-flow/scripts/text-completion-ollama deleted file mode 100755 index 9479750a..00000000 --- a/trustgraph-flow/scripts/text-completion-ollama +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.ollama import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-openai b/trustgraph-flow/scripts/text-completion-openai deleted file mode 100755 index 665080c1..00000000 --- a/trustgraph-flow/scripts/text-completion-openai +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.openai import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-tgi b/trustgraph-flow/scripts/text-completion-tgi deleted file mode 100755 index c1e856f8..00000000 --- a/trustgraph-flow/scripts/text-completion-tgi +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.tgi import run - -run() - diff --git a/trustgraph-flow/scripts/text-completion-vllm b/trustgraph-flow/scripts/text-completion-vllm deleted file mode 100755 index e24c076a..00000000 --- a/trustgraph-flow/scripts/text-completion-vllm +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.vllm import run - -run() - diff --git a/trustgraph-flow/scripts/triples-query-cassandra b/trustgraph-flow/scripts/triples-query-cassandra deleted file mode 100755 index d6baf969..00000000 --- a/trustgraph-flow/scripts/triples-query-cassandra +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.triples.cassandra import run - -run() - diff --git a/trustgraph-flow/scripts/triples-query-falkordb b/trustgraph-flow/scripts/triples-query-falkordb deleted file mode 100755 index 7f9ab74c..00000000 --- a/trustgraph-flow/scripts/triples-query-falkordb +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.triples.falkordb import run - -run() - diff --git a/trustgraph-flow/scripts/triples-query-memgraph b/trustgraph-flow/scripts/triples-query-memgraph deleted file mode 100755 index 443929e4..00000000 --- a/trustgraph-flow/scripts/triples-query-memgraph +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.triples.memgraph import run - -run() - diff --git a/trustgraph-flow/scripts/triples-query-neo4j b/trustgraph-flow/scripts/triples-query-neo4j deleted file mode 100755 index 05d97b10..00000000 --- a/trustgraph-flow/scripts/triples-query-neo4j +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.query.triples.neo4j import run - -run() - diff --git a/trustgraph-flow/scripts/triples-write-cassandra b/trustgraph-flow/scripts/triples-write-cassandra deleted file mode 100755 index 207c3222..00000000 --- a/trustgraph-flow/scripts/triples-write-cassandra +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.triples.cassandra import run - -run() - diff --git a/trustgraph-flow/scripts/triples-write-falkordb b/trustgraph-flow/scripts/triples-write-falkordb deleted file mode 100755 index 916ee352..00000000 --- a/trustgraph-flow/scripts/triples-write-falkordb +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.triples.falkordb import run - -run() - diff --git a/trustgraph-flow/scripts/triples-write-memgraph b/trustgraph-flow/scripts/triples-write-memgraph deleted file mode 100755 index 3d94a576..00000000 --- a/trustgraph-flow/scripts/triples-write-memgraph +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.triples.memgraph import run - -run() - diff --git a/trustgraph-flow/scripts/triples-write-neo4j b/trustgraph-flow/scripts/triples-write-neo4j deleted file mode 100755 index 58786d44..00000000 --- a/trustgraph-flow/scripts/triples-write-neo4j +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.storage.triples.neo4j import run - -run() - diff --git a/trustgraph-flow/scripts/wikipedia-lookup b/trustgraph-flow/scripts/wikipedia-lookup deleted file mode 100755 index a89b1009..00000000 --- a/trustgraph-flow/scripts/wikipedia-lookup +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.external.wikipedia import run - -run() - diff --git a/trustgraph-flow/setup.py b/trustgraph-flow/setup.py deleted file mode 100644 index 59b94adc..00000000 --- a/trustgraph-flow/setup.py +++ /dev/null @@ -1,134 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/flow_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-flow", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "aiohttp", - "anthropic", - "cassandra-driver", - "cohere", - "cryptography", - "falkordb", - "fastembed", - "google-genai", - "ibis", - "jsonschema", - "langchain", - "langchain-community", - "langchain-core", - "langchain-text-splitters", - "mcp", - "minio", - "mistralai", - "neo4j", - "ollama", - "openai", - "pinecone[grpc]", - "prometheus-client", - "pulsar-client", - "pymilvus", - "pypdf", - "mistralai", - "pyyaml", - "qdrant-client", - "rdflib", - "requests", - "tabulate", - "tiktoken", - "urllib3", - ], - scripts=[ - "scripts/agent-manager-react", - "scripts/api-gateway", - "scripts/rev-gateway", - "scripts/chunker-recursive", - "scripts/chunker-token", - "scripts/config-svc", - "scripts/de-query-milvus", - "scripts/de-query-pinecone", - "scripts/de-query-qdrant", - "scripts/de-write-milvus", - "scripts/de-write-pinecone", - "scripts/de-write-qdrant", - "scripts/document-embeddings", - "scripts/document-rag", - "scripts/embeddings-fastembed", - "scripts/embeddings-ollama", - "scripts/ge-query-milvus", - "scripts/ge-query-pinecone", - "scripts/ge-query-qdrant", - "scripts/ge-write-milvus", - "scripts/ge-write-pinecone", - "scripts/ge-write-qdrant", - "scripts/graph-embeddings", - "scripts/graph-rag", - "scripts/kg-extract-definitions", - "scripts/kg-extract-relationships", - "scripts/kg-extract-agent", - "scripts/kg-store", - "scripts/kg-manager", - "scripts/librarian", - "scripts/mcp-tool", - "scripts/metering", - "scripts/object-extract-row", - "scripts/oe-write-milvus", - "scripts/pdf-decoder", - "scripts/pdf-ocr-mistral", - "scripts/prompt-template", - "scripts/rows-write-cassandra", - "scripts/run-processing", - "scripts/text-completion-azure", - "scripts/text-completion-azure-openai", - "scripts/text-completion-claude", - "scripts/text-completion-cohere", - "scripts/text-completion-googleaistudio", - "scripts/text-completion-llamafile", - "scripts/text-completion-lmstudio", - "scripts/text-completion-mistral", - "scripts/text-completion-ollama", - "scripts/text-completion-openai", - "scripts/text-completion-tgi", - "scripts/text-completion-vllm", - "scripts/triples-query-cassandra", - "scripts/triples-query-falkordb", - "scripts/triples-query-memgraph", - "scripts/triples-query-neo4j", - "scripts/triples-write-cassandra", - "scripts/triples-write-falkordb", - "scripts/triples-write-memgraph", - "scripts/triples-write-neo4j", - "scripts/wikipedia-lookup", - ] -) diff --git a/trustgraph-mcp/pyproject.toml b/trustgraph-mcp/pyproject.toml new file mode 100644 index 00000000..c99b296e --- /dev/null +++ b/trustgraph-mcp/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-mcp" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "mcp", + "websockets", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +mcp-server = "trustgraph.mcp_server:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.mcp_version.__version__"} \ No newline at end of file diff --git a/trustgraph-mcp/scripts/mcp-server b/trustgraph-mcp/scripts/mcp-server deleted file mode 100755 index 2a8f83bf..00000000 --- a/trustgraph-mcp/scripts/mcp-server +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.mcp_server import run - -run() - diff --git a/trustgraph-mcp/setup.py b/trustgraph-mcp/setup.py deleted file mode 100644 index 663824c0..00000000 --- a/trustgraph-mcp/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/mcp_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-mcp", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "mcp", - "websockets", - ], - scripts=[ - "scripts/mcp-server", - ] -) diff --git a/trustgraph-ocr/pyproject.toml b/trustgraph-ocr/pyproject.toml new file mode 100644 index 00000000..7465c534 --- /dev/null +++ b/trustgraph-ocr/pyproject.toml @@ -0,0 +1,35 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-ocr" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "pulsar-client", + "prometheus-client", + "boto3", + "pdf2image", + "pytesseract", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +pdf-ocr = "trustgraph.decoding.ocr:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.ocr_version.__version__"} \ No newline at end of file diff --git a/trustgraph-ocr/scripts/pdf-ocr b/trustgraph-ocr/scripts/pdf-ocr deleted file mode 100755 index 1417351f..00000000 --- a/trustgraph-ocr/scripts/pdf-ocr +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.decoding.ocr import run - -run() - diff --git a/trustgraph-ocr/setup.py b/trustgraph-ocr/setup.py deleted file mode 100644 index dac8b3ff..00000000 --- a/trustgraph-ocr/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/ocr_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-ocr", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "pulsar-client", - "prometheus-client", - "boto3", - "pdf2image", - "pytesseract", - ], - scripts=[ - "scripts/pdf-ocr", - ] -) diff --git a/trustgraph-vertexai/pyproject.toml b/trustgraph-vertexai/pyproject.toml new file mode 100644 index 00000000..98a84de8 --- /dev/null +++ b/trustgraph-vertexai/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph-vertexai" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "pulsar-client", + "google-cloud-aiplatform", + "prometheus-client", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[project.scripts] +text-completion-vertexai = "trustgraph.model.text_completion.vertexai:run" + +[tool.setuptools.packages.find] +include = ["trustgraph*"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.vertexai_version.__version__"} \ No newline at end of file diff --git a/trustgraph-vertexai/scripts/text-completion-vertexai b/trustgraph-vertexai/scripts/text-completion-vertexai deleted file mode 100755 index 56458d4a..00000000 --- a/trustgraph-vertexai/scripts/text-completion-vertexai +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from trustgraph.model.text_completion.vertexai import run - -run() - diff --git a/trustgraph-vertexai/setup.py b/trustgraph-vertexai/setup.py deleted file mode 100644 index 6d915627..00000000 --- a/trustgraph-vertexai/setup.py +++ /dev/null @@ -1,45 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/vertexai_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph-vertexai", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "pulsar-client", - "google-cloud-aiplatform", - "prometheus-client", - ], - scripts=[ - "scripts/text-completion-vertexai", - ] -) diff --git a/trustgraph/pyproject.toml b/trustgraph/pyproject.toml new file mode 100644 index 00000000..1ac6a402 --- /dev/null +++ b/trustgraph/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "trustgraph" +dynamic = ["version"] +authors = [{name = "trustgraph.ai", email = "security@trustgraph.ai"}] +description = "TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline." +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "trustgraph-base>=1.2,<1.3", + "trustgraph-bedrock>=1.2,<1.3", + "trustgraph-cli>=1.2,<1.3", + "trustgraph-embeddings-hf>=1.2,<1.3", + "trustgraph-flow>=1.2,<1.3", + "trustgraph-vertexai>=1.2,<1.3", +] +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[project.urls] +Homepage = "https://github.com/trustgraph-ai/trustgraph" + +[tool.setuptools] +packages = ["trustgraph"] + +[tool.setuptools.dynamic] +version = {attr = "trustgraph.trustgraph_version.__version__"} \ No newline at end of file diff --git a/trustgraph/setup.py b/trustgraph/setup.py deleted file mode 100644 index 7d296c51..00000000 --- a/trustgraph/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -import setuptools -import os -import importlib - -with open("README.md", "r") as fh: - long_description = fh.read() - -# Load a version number module -spec = importlib.util.spec_from_file_location( - 'version', 'trustgraph/trustgraph_version.py' -) -version_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(version_module) - -version = version_module.__version__ - -setuptools.setup( - name="trustgraph", - version=version, - author="trustgraph.ai", - author_email="security@trustgraph.ai", - description="TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/trustgraph-ai/trustgraph", - packages=setuptools.find_namespace_packages( - where='./', - ), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", - ], - python_requires='>=3.8', - download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz", - install_requires=[ - "trustgraph-base>=1.2,<1.3", - "trustgraph-bedrock>=1.2,<1.3", - "trustgraph-cli>=1.2,<1.3", - "trustgraph-embeddings-hf>=1.2,<1.3", - "trustgraph-flow>=1.2,<1.3", - "trustgraph-vertexai>=1.2,<1.3", - ], - scripts=[ - ] -)