diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d4ca28..b5105f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: types: - created workflow_dispatch: - + jobs: publish: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 644a39c..26b75ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,4 +30,4 @@ jobs: pip install . - name: Run Test run: | - pytest . \ No newline at end of file + pytest . diff --git a/README.md b/README.md index 4750c64..55b0867 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,4 @@ pre-commit install pre-commit run --all-files ``` -After that, it will run automatically \ No newline at end of file +After that, it will run automatically diff --git a/dev-requirements.txt b/dev-requirements.txt index d4a45cf..4d4a689 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,2 +1,2 @@ pytest -pre-commit \ No newline at end of file +pre-commit diff --git a/sanclone/__init__.py b/sanclone/__init__.py index c1074ab..82d0a6c 100644 --- a/sanclone/__init__.py +++ b/sanclone/__init__.py @@ -1,2 +1,4 @@ +from .state import State from .version import __version__ -from .state import State \ No newline at end of file + +__all__ = ["__version__", "State"] diff --git a/sanclone/state.py b/sanclone/state.py index 709717e..dd7b818 100644 --- a/sanclone/state.py +++ b/sanclone/state.py @@ -2,4 +2,4 @@ class State(BaseModel): - pass \ No newline at end of file + pass diff --git a/sanclone/tools/__init__.py b/sanclone/tools/__init__.py index 376422e..1095f07 100644 --- a/sanclone/tools/__init__.py +++ b/sanclone/tools/__init__.py @@ -1 +1,3 @@ -from .echo import EchoTool \ No newline at end of file +from .echo import EchoTool + +__all__ = ["EchoTool"] diff --git a/sanclone/tools/echo.py b/sanclone/tools/echo.py index 5e926b8..2ebccec 100644 --- a/sanclone/tools/echo.py +++ b/sanclone/tools/echo.py @@ -1,4 +1,5 @@ from langchain.tools import BaseTool + from ..state import State @@ -7,6 +8,5 @@ class EchoTool(BaseTool): description = "An exampel tool that echoes what you input." shared_state: State - def _run(self, query: str) -> str: - return query \ No newline at end of file + return query diff --git a/sanclone/version.py b/sanclone/version.py index b3c06d4..f102a9c 100644 --- a/sanclone/version.py +++ b/sanclone/version.py @@ -1 +1 @@ -__version__ = "0.0.1" \ No newline at end of file +__version__ = "0.0.1" diff --git a/setup.py b/setup.py index ed737ff..04e794b 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ from setuptools import setup +# so mypy can see version +__version__ = "0.0.0" + exec(open("sanclone/version.py").read()) with open("README.md", "r", encoding="utf-8") as fh: @@ -20,6 +23,6 @@ long_description_content_type="text/markdown", classifiers=[ "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License" + "License :: OSI Approved :: MIT License", ], ) diff --git a/tests/test_sanity.py b/tests/test_sanity.py index fd4d9f8..120d2d1 100644 --- a/tests/test_sanity.py +++ b/tests/test_sanity.py @@ -4,9 +4,10 @@ def test_version(): assert sanclone.__version__ + def test_echo_tool(): - from sanclone.tools import EchoTool from sanclone import State + from sanclone.tools import EchoTool + tool = EchoTool(shared_state=State()) assert tool.run("Hello") == "Hello" - \ No newline at end of file