From 5cd6956d58da7d2cbf1fa951e16b64e583e10226 Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sun, 4 Dec 2022 17:44:40 -0800 Subject: [PATCH] Harrison/version 0028 (#259) --- docs/conf.py | 9 ++++++--- docs/requirements.txt | 1 + langchain/VERSION | 1 - langchain/__init__.py | 5 ----- poetry.lock | 14 +++++++++++++- pyproject.toml | 3 ++- 6 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 langchain/VERSION diff --git a/docs/conf.py b/docs/conf.py index f5e6b1fc..7851401c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,7 +15,10 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) -import langchain +import toml + +with open("../pyproject.toml") as f: + data = toml.load(f) # -- Project information ----------------------------------------------------- @@ -23,8 +26,8 @@ project = "LangChain" copyright = "2022, Harrison Chase" author = "Harrison Chase" -version = langchain.__version__ -release = langchain.__version__ +version = data["tool"]["poetry"]["version"] +release = version # -- General configuration --------------------------------------------------- diff --git a/docs/requirements.txt b/docs/requirements.txt index 206b5066..fd4a7a91 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,3 +6,4 @@ sphinx-autobuild==2021.3.14 sphinx_rtd_theme==1.0.0 sphinx-typlog-theme==0.8.0 sphinx-panels +toml diff --git a/langchain/VERSION b/langchain/VERSION deleted file mode 100644 index 24ff8558..00000000 --- a/langchain/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.0.27 diff --git a/langchain/__init__.py b/langchain/__init__.py index 32bbba17..9f0b4b79 100644 --- a/langchain/__init__.py +++ b/langchain/__init__.py @@ -1,10 +1,5 @@ """Main entrypoint into package.""" -from pathlib import Path - -with open(Path(__file__).absolute().parents[0] / "VERSION") as _f: - __version__ = _f.read().strip() - from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain from langchain.chains import ( ConversationChain, diff --git a/poetry.lock b/poetry.lock index 1c754b88..f4327980 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1942,6 +1942,14 @@ python-versions = "*" [package.dependencies] types-urllib3 = "<1.27" +[[package]] +name = "types-toml" +version = "0.10.8.1" +description = "Typing stubs for toml" +category = "main" +optional = false +python-versions = "*" + [[package]] name = "types-urllib3" version = "1.26.25.4" @@ -2047,7 +2055,7 @@ llms = ["manifest-ml"] [metadata] lock-version = "1.1" python-versions = ">=3.8.1,<4.0" -content-hash = "ec61c2519afcbcf5517e990baf5997a76fbe2d292193862afaef4148c707bdac" +content-hash = "4c7e2033677ad4d5924096db6fed10f13be8f12e9098891e1f105e8fb5e72cee" [metadata.files] anyio = [ @@ -3446,6 +3454,10 @@ types-requests = [ {file = "types-requests-2.28.11.5.tar.gz", hash = "sha256:a7df37cc6fb6187a84097da951f8e21d335448aa2501a6b0a39cbd1d7ca9ee2a"}, {file = "types_requests-2.28.11.5-py3-none-any.whl", hash = "sha256:091d4a5a33c1b4f20d8b1b952aa8fa27a6e767c44c3cf65e56580df0b05fd8a9"}, ] +types-toml = [ + {file = "types-toml-0.10.8.1.tar.gz", hash = "sha256:171bdb3163d79a520560f24ba916a9fc9bff81659c5448a9fea89240923722be"}, + {file = "types_toml-0.10.8.1-py3-none-any.whl", hash = "sha256:b7b5c4977f96ab7b5ac06d8a6590d17c0bf252a96efc03b109c2711fb3e0eafd"}, +] types-urllib3 = [ {file = "types-urllib3-1.26.25.4.tar.gz", hash = "sha256:eec5556428eec862b1ac578fb69aab3877995a99ffec9e5a12cf7fbd0cc9daee"}, {file = "types_urllib3-1.26.25.4-py3-none-any.whl", hash = "sha256:ed6b9e8a8be488796f72306889a06a3fc3cb1aa99af02ab8afb50144d7317e49"}, diff --git a/pyproject.toml b/pyproject.toml index 3aec3bb1..c690a808 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain" -version = "0.0.26" +version = "0.0.28" description = "Building applications with LLMs through composability" authors = [] license = "MIT" @@ -21,6 +21,7 @@ manifest-ml = {version = "^0.0.1", optional = true} spacy = {version = "^3", optional = true} nltk = {version = "^3", optional = true} transformers = {version = "^4", optional = true} +types-toml = "^0.10.8.1" [tool.poetry.group.test.dependencies] pytest = "^7.2.0"