From dce4291d2da70d83814721d64b20f4ee8a1facf8 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 14:15:49 +0800 Subject: [PATCH 01/11] docs: update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d7fd392f..b87ff0c97 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ We provide a user interface for Gradio, which allows you to use DB-GPT through o To use multiple models, modify the LLM_MODEL parameter in the .env configuration file to switch between the models. -####Create your own knowledge repository: +### Create your own knowledge repository: 1.Place personal knowledge files or folders in the pilot/datasets directory. From 72f76ac1d9bd48298edc677f0d9947797eb6fef8 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 14:39:17 +0800 Subject: [PATCH 02/11] docs: update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b87ff0c97..92614ff31 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ Run the Python interpreter and type the commands: ## Acknowledgement -The achievements of this project are thanks to the technical community, especially the following projects: +This project is standing on the shoulders of giants and is not going to work without the open-source communities. Special thanks to the following projects for their excellent contribution to the AI industry: - [FastChat](https://github.com/lm-sys/FastChat) for providing chat services - [vicuna-13b](https://lmsys.org/blog/2023-03-30-vicuna/) as the base model - [langchain](https://langchain.readthedocs.io/) tool chain From 17e001c308b84a7e0fa8cba56808fbc78cc8c450 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 15:03:00 +0800 Subject: [PATCH 03/11] docs: fix --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 603ac2049..2b33ed0be 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -89,7 +89,7 @@ Use Cases | Best Practices and built-in implementations for common DB-GPT use cases: -- `Sql generation and diagnosis <./use_cases/sql_generation_and_diagnosis.html>`: SQL generation and diagnosis. +- `Sql generation and diagnosis <./use_cases/sql_generation_and_diagnosis.html>`_: SQL generation and diagnosis. - `knownledge Based QA <./use_cases/knownledge_based_qa.html>`_: A important scene for user to chat with database documents, codes, bugs and schemas. From cebd2cc0481128573c87d466652ca93f1d8733ea Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 15:17:24 +0800 Subject: [PATCH 04/11] docs: fix --- docs/conf.py | 8 ++------ pyproject.toml | 49 ------------------------------------------------- 2 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 pyproject.toml diff --git a/docs/conf.py b/docs/conf.py index ba156d994..d077367db 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,12 +12,8 @@ project = "DB-GPT" copyright = "2023, csunny" author = "csunny" -with open("../pyproject.toml") as f: - data = toml.load(f) - -version = data["tool"]["poetry"]["version"] -release = version -html_title = project + " " + version +release = "0.0.6" +html_title = project + " " + release # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 12834cedd..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,49 +0,0 @@ -[tool.poetry] -name = "db-gpt" -version = "0.0.6" -description = "Interact with your data and environment privately" -authors = [] -readme = "README.md" -license = "MIT" -packages = [{include = "db_gpt"}] -repository = "https://www.github.com/csunny/DB-GPT" - -[tool.poetry.dependencies] -python = "^3.10" -accelerate = "^0.16" - - -[tool.poetry.group.docs.dependencies] -autodoc_pydantic = "^1.8.0" -myst_parser = "^0.18.1" -nbsphinx = "^0.8.9" -sphinx = "^4.5.0" -sphinx-autobuild = "^2021.3.14" -sphinx_book_theme = "^0.3.3" -sphinx_rtd_theme = "^1.0.0" -sphinx-typlog-theme = "^0.8.0" -sphinx-panels = "^0.6.0" -toml = "^0.10.2" -myst-nb = "^0.17.1" -linkchecker = "^10.2.1" -sphinx-copybutton = "^0.5.1" - -[tool.poetry.group.test.dependencies] -# The only dependencies that should be added are -# dependencies used for running tests (e.g., pytest, freezegun, response). -# Any dependencies that do not meet that criteria will be removed. -pytest = "^7.3.0" -pytest-cov = "^4.0.0" -pytest-dotenv = "^0.5.2" -duckdb-engine = "^0.7.0" -pytest-watcher = "^0.2.6" -freezegun = "^1.2.2" -responses = "^0.22.0" -pytest-asyncio = "^0.20.3" -lark = "^1.1.5" -pytest-mock = "^3.10.0" -pytest-socket = "^0.6.0" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" From 2014e6b5e133990d92aa5300e6a4f02dcf1aa262 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 15:49:27 +0800 Subject: [PATCH 05/11] docs: update --- docs/conf.py | 8 +++- poetry.toml | 5 +++ pyproject.toml | 120 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 poetry.toml create mode 100644 pyproject.toml diff --git a/docs/conf.py b/docs/conf.py index d077367db..ba156d994 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,8 +12,12 @@ project = "DB-GPT" copyright = "2023, csunny" author = "csunny" -release = "0.0.6" -html_title = project + " " + release +with open("../pyproject.toml") as f: + data = toml.load(f) + +version = data["tool"]["poetry"]["version"] +release = version +html_title = project + " " + version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 000000000..42159b247 --- /dev/null +++ b/poetry.toml @@ -0,0 +1,5 @@ +[virtualenvs] +in-project = true + +[installer] +modern-installation = false diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..9ad3fb5d6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,120 @@ +[tool.poetry] +name = "db-gpt" +version = "0.0.6" +description = "Interact with your data and environment privately" +authors = [] +readme = "README.md" +license = "MIT" +packages = [{include = "db_gpt"}] +repository = "https://www.github.com/csunny/DB-GPT" + +[tool.poetry.dependencies] +python = "^3.10" +accelerate = "^0.16" +torch = "^2.0.0" +accelerate "^0.16" +aiohttp = "^3.8" +aiosignal = "^1.3" +async-timeout = "^4.0" +attrs = "^22.2" +bitsandbytes = "^0.37" +cchardet = "^2.1" +chardet = "^5.1" +contourpy = "^1.0" +cycler = "^0.11.0" +filelock = "^3.9.0" +fonttools = "^4.38.0" +frozenlist = "^1.3.3" +huggingface-hub = "^0.13.4" +importlib-resources = "^5.12.0" +kiwisolver = "^1.4.4" +matplotlib = "^3.7.0" +multidict = "^6.0.4" +packaging = "^23.0" +psutil = "^5.9.4" +pycocotools = "^2.0.6" +pyparsing = "^3.0.9" +python-dateutil = "^2.8.2" +pyyaml = "^6.0" +tokenizers = "^0.13.2" +tqdm = "^4.64.1" +transformers = "^4.28.0" +timm = "^0.6.13" +spacy = "^3.5.1" +webdataset = "^0.2.48" +yarl = "^1.8.2" +zipp = "^3.14.0" +omegaconf = "^2.3.0" +opencv-python = "^4.7.0.72" +iopath = "^0.1.10" +tenacity = "^8.2.2" +peft = "^0.3" +pycocoevalcap = "^1.2" +cpm_kernels +umap-learn = "^0.5.3" +notebook = "^6.5.4" +gradio = "^3.23" +gradio-client = "^0.0.8" +wandb = "^0.15.2" +llama-index = "^0.5.27" +pymysql +unstructured = "^0.6.3" +grpcio = "^1.47.5" + +auto-gpt-plugin-template +pymdown-extensions = "^9.11" +gTTS = "^2.3.1" +langchain = "^0.0.142" +nltk = "^3.8.1" +python-dotenv = "^1.0.0" +pymilvus = {version = "2.2.1", optional = true} +vcrpy = "^4.2.1" +chromadb = "^0.3.22" +markdown2 = "^2.4.8" +colorama = "^0.4.6" +playsound = "^1.3" +distro = {version = "1.8.0", optional = true} +pypdf = {version = "^3.4.0", optional = true} + +[tool.poetry.group.docs.dependencies] +autodoc_pydantic = "^1.8.0" +myst_parser = "^0.18.1" +nbsphinx = "^0.8.9" +sphinx = "^4.5.0" +sphinx-autobuild = "^2021.3.14" +sphinx_book_theme = "^0.3.3" +sphinx_rtd_theme = "^1.0.0" +sphinx-typlog-theme = "^0.8.0" +sphinx-panels = "^0.6.0" +toml = "^0.10.2" +myst-nb = "^0.17.1" +linkchecker = "^10.2.1" +sphinx-copybutton = "^0.5.1" + +[tool.poetry.group.test.dependencies] +# The only dependencies that should be added are +# dependencies used for running tests (e.g., pytest, freezegun, response). +# Any dependencies that do not meet that criteria will be removed. +pytest = "^7.3.0" +pytest-cov = "^4.0.0" +pytest-dotenv = "^0.5.2" +duckdb-engine = "^0.7.0" +pytest-watcher = "^0.2.6" +freezegun = "^1.2.2" +responses = "^0.22.0" +pytest-asyncio = "^0.20.3" +lark = "^1.1.5" +pytest-mock = "^3.10.0" +pytest-socket = "^0.6.0" + + +[tool.poetry.group.lint.dependencies] +ruff = "^0.0.249" +types-toml = "^0.10.8.1" +types-redis = "^4.3.21.6" +black = "^23.1.0" +types-chardet = "^5.0.4.6" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From 6606672c00503664bbfbe864c47a0ec6d5953491 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 16:06:45 +0800 Subject: [PATCH 06/11] fix: pyproject --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ad3fb5d6..595c6d204 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,6 @@ repository = "https://www.github.com/csunny/DB-GPT" python = "^3.10" accelerate = "^0.16" torch = "^2.0.0" -accelerate "^0.16" aiohttp = "^3.8" aiosignal = "^1.3" async-timeout = "^4.0" @@ -50,18 +49,18 @@ iopath = "^0.1.10" tenacity = "^8.2.2" peft = "^0.3" pycocoevalcap = "^1.2" -cpm_kernels +cpm_kernels = "^1.0.11" umap-learn = "^0.5.3" notebook = "^6.5.4" gradio = "^3.23" gradio-client = "^0.0.8" wandb = "^0.15.2" llama-index = "^0.5.27" -pymysql +pymysql = "^1.0.3" unstructured = "^0.6.3" grpcio = "^1.47.5" -auto-gpt-plugin-template +auto-gpt-plugin-template = "^1.0" pymdown-extensions = "^9.11" gTTS = "^2.3.1" langchain = "^0.0.142" From bd0603ff99e5f9071b6d0cfc86eb6a6bde24347d Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 16:14:31 +0800 Subject: [PATCH 07/11] docs: fix --- docs/conf.py | 7 ++- pilot/VERSION | 1 + pyproject.toml | 122 ++++++------------------------------------------- 3 files changed, 18 insertions(+), 112 deletions(-) create mode 100644 pilot/VERSION diff --git a/docs/conf.py b/docs/conf.py index ba156d994..c9904dc31 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,11 +12,10 @@ project = "DB-GPT" copyright = "2023, csunny" author = "csunny" -with open("../pyproject.toml") as f: - data = toml.load(f) -version = data["tool"]["poetry"]["version"] -release = version +with open("../pilot/VERSION") as f: + version = f.read() + html_title = project + " " + version # -- General configuration --------------------------------------------------- diff --git a/pilot/VERSION b/pilot/VERSION new file mode 100644 index 000000000..6c6aa7cb0 --- /dev/null +++ b/pilot/VERSION @@ -0,0 +1 @@ +0.1.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 595c6d204..6ff2e0df1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,112 +8,18 @@ license = "MIT" packages = [{include = "db_gpt"}] repository = "https://www.github.com/csunny/DB-GPT" -[tool.poetry.dependencies] -python = "^3.10" -accelerate = "^0.16" -torch = "^2.0.0" -aiohttp = "^3.8" -aiosignal = "^1.3" -async-timeout = "^4.0" -attrs = "^22.2" -bitsandbytes = "^0.37" -cchardet = "^2.1" -chardet = "^5.1" -contourpy = "^1.0" -cycler = "^0.11.0" -filelock = "^3.9.0" -fonttools = "^4.38.0" -frozenlist = "^1.3.3" -huggingface-hub = "^0.13.4" -importlib-resources = "^5.12.0" -kiwisolver = "^1.4.4" -matplotlib = "^3.7.0" -multidict = "^6.0.4" -packaging = "^23.0" -psutil = "^5.9.4" -pycocotools = "^2.0.6" -pyparsing = "^3.0.9" -python-dateutil = "^2.8.2" -pyyaml = "^6.0" -tokenizers = "^0.13.2" -tqdm = "^4.64.1" -transformers = "^4.28.0" -timm = "^0.6.13" -spacy = "^3.5.1" -webdataset = "^0.2.48" -yarl = "^1.8.2" -zipp = "^3.14.0" -omegaconf = "^2.3.0" -opencv-python = "^4.7.0.72" -iopath = "^0.1.10" -tenacity = "^8.2.2" -peft = "^0.3" -pycocoevalcap = "^1.2" -cpm_kernels = "^1.0.11" -umap-learn = "^0.5.3" -notebook = "^6.5.4" -gradio = "^3.23" -gradio-client = "^0.0.8" -wandb = "^0.15.2" -llama-index = "^0.5.27" -pymysql = "^1.0.3" -unstructured = "^0.6.3" -grpcio = "^1.47.5" +[tool.mypy] +ignore_missing_imports = "True" +disallow_untyped_defs = "True" +exclude = ["notebooks", "build", "examples"] -auto-gpt-plugin-template = "^1.0" -pymdown-extensions = "^9.11" -gTTS = "^2.3.1" -langchain = "^0.0.142" -nltk = "^3.8.1" -python-dotenv = "^1.0.0" -pymilvus = {version = "2.2.1", optional = true} -vcrpy = "^4.2.1" -chromadb = "^0.3.22" -markdown2 = "^2.4.8" -colorama = "^0.4.6" -playsound = "^1.3" -distro = {version = "1.8.0", optional = true} -pypdf = {version = "^3.4.0", optional = true} - -[tool.poetry.group.docs.dependencies] -autodoc_pydantic = "^1.8.0" -myst_parser = "^0.18.1" -nbsphinx = "^0.8.9" -sphinx = "^4.5.0" -sphinx-autobuild = "^2021.3.14" -sphinx_book_theme = "^0.3.3" -sphinx_rtd_theme = "^1.0.0" -sphinx-typlog-theme = "^0.8.0" -sphinx-panels = "^0.6.0" -toml = "^0.10.2" -myst-nb = "^0.17.1" -linkchecker = "^10.2.1" -sphinx-copybutton = "^0.5.1" - -[tool.poetry.group.test.dependencies] -# The only dependencies that should be added are -# dependencies used for running tests (e.g., pytest, freezegun, response). -# Any dependencies that do not meet that criteria will be removed. -pytest = "^7.3.0" -pytest-cov = "^4.0.0" -pytest-dotenv = "^0.5.2" -duckdb-engine = "^0.7.0" -pytest-watcher = "^0.2.6" -freezegun = "^1.2.2" -responses = "^0.22.0" -pytest-asyncio = "^0.20.3" -lark = "^1.1.5" -pytest-mock = "^3.10.0" -pytest-socket = "^0.6.0" - - -[tool.poetry.group.lint.dependencies] -ruff = "^0.0.249" -types-toml = "^0.10.8.1" -types-redis = "^4.3.21.6" -black = "^23.1.0" -types-chardet = "^5.0.4.6" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[tool.ruff] +exclude = [ + ".venv", + "__pycache__", + ".ipynb_checkpoints", + ".mypy_cache", + ".ruff_cache", + "examples", + "notebooks", +] \ No newline at end of file From 1d35ada19dd27590f57845fbc0720cbaced12d43 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 16:24:09 +0800 Subject: [PATCH 08/11] fix: docs --- docs/conf.py | 3 +++ pyproject.toml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index c9904dc31..c6757eda7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,11 +7,14 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import toml +import os +import sys project = "DB-GPT" copyright = "2023, csunny" author = "csunny" +sys.path.insert(0, os.path.abspath("../")) with open("../pilot/VERSION") as f: version = f.read() diff --git a/pyproject.toml b/pyproject.toml index 6ff2e0df1..532c052b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,9 @@ ignore_missing_imports = "True" disallow_untyped_defs = "True" exclude = ["notebooks", "build", "examples"] +[tool.setuptools] +py-modules = [] + [tool.ruff] exclude = [ ".venv", From dafd80dae33759fe4beed746ffffb9eb167968fc Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 16:39:48 +0800 Subject: [PATCH 09/11] docs: fix --- docs/conf.py | 8 +++- poetry.toml | 5 +++ pyproject.toml | 119 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 poetry.toml create mode 100644 pyproject.toml diff --git a/docs/conf.py b/docs/conf.py index d077367db..ba156d994 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,8 +12,12 @@ project = "DB-GPT" copyright = "2023, csunny" author = "csunny" -release = "0.0.6" -html_title = project + " " + release +with open("../pyproject.toml") as f: + data = toml.load(f) + +version = data["tool"]["poetry"]["version"] +release = version +html_title = project + " " + version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 000000000..42159b247 --- /dev/null +++ b/poetry.toml @@ -0,0 +1,5 @@ +[virtualenvs] +in-project = true + +[installer] +modern-installation = false diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..3b465bab9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,119 @@ +[tool.poetry] +name = "db-gpt" +version = "0.0.6" +description = "Interact with your data and environment privately" +authors = [] +readme = "README.md" +license = "MIT" +packages = [{include = "db_gpt"}] +repository = "https://www.github.com/csunny/DB-GPT" + +[tool.poetry.dependencies] +python = "^3.10" +accelerate = "^0.16" +torch = "^2.0.0" +aiohttp = "^3.8" +aiosignal = "^1.3" +async-timeout = "^4.0" +attrs = "^22.2" +bitsandbytes = "^0.37" +cchardet = "^2.1" +chardet = "^5.1" +contourpy = "^1.0" +cycler = "^0.11.0" +filelock = "^3.9.0" +fonttools = "^4.38.0" +frozenlist = "^1.3.3" +huggingface-hub = "^0.13.4" +importlib-resources = "^5.12.0" +kiwisolver = "^1.4.4" +matplotlib = "^3.7.0" +multidict = "^6.0.4" +packaging = "^23.0" +psutil = "^5.9.4" +pycocotools = "^2.0.6" +pyparsing = "^3.0.9" +python-dateutil = "^2.8.2" +pyyaml = "^6.0" +tokenizers = "^0.13.2" +tqdm = "^4.64.1" +transformers = "^4.28.0" +timm = "^0.6.13" +spacy = "^3.5.1" +webdataset = "^0.2.48" +yarl = "^1.8.2" +zipp = "^3.14.0" +omegaconf = "^2.3.0" +opencv-python = "^4.7.0.72" +iopath = "^0.1.10" +tenacity = "^8.2.2" +peft = "^0.3" +pycocoevalcap = "^1.2" +cpm_kernels = "^1.0.11" +umap-learn = "^0.5.3" +notebook = "^6.5.4" +gradio = "^3.23" +gradio-client = "^0.0.8" +wandb = "^0.15.2" +llama-index = "^0.5.27" +pymysql = "^1.0.3" +unstructured = "^0.6.3" +grpcio = "^1.47.5" + +auto-gpt-plugin-template = "^1.0.1" +pymdown-extensions = "^9.11" +gTTS = "^2.3.1" +langchain = "^0.0.142" +nltk = "^3.8.1" +python-dotenv = "^1.0.0" +pymilvus = {version = "2.2.1", optional = true} +vcrpy = "^4.2.1" +chromadb = "^0.3.22" +markdown2 = "^2.4.8" +colorama = "^0.4.6" +playsound = "^1.3" +distro = {version = "1.8.0", optional = true} +pypdf = {version = "^3.4.0", optional = true} + +[tool.poetry.group.docs.dependencies] +autodoc_pydantic = "^1.8.0" +myst_parser = "^0.18.1" +nbsphinx = "^0.8.9" +sphinx = "^4.5.0" +sphinx-autobuild = "^2021.3.14" +sphinx_book_theme = "^0.3.3" +sphinx_rtd_theme = "^1.0.0" +sphinx-typlog-theme = "^0.8.0" +sphinx-panels = "^0.6.0" +toml = "^0.10.2" +myst-nb = "^0.17.1" +linkchecker = "^10.2.1" +sphinx-copybutton = "^0.5.1" + +[tool.poetry.group.test.dependencies] +# The only dependencies that should be added are +# dependencies used for running tests (e.g., pytest, freezegun, response). +# Any dependencies that do not meet that criteria will be removed. +pytest = "^7.3.0" +pytest-cov = "^4.0.0" +pytest-dotenv = "^0.5.2" +duckdb-engine = "^0.7.0" +pytest-watcher = "^0.2.6" +freezegun = "^1.2.2" +responses = "^0.22.0" +pytest-asyncio = "^0.20.3" +lark = "^1.1.5" +pytest-mock = "^3.10.0" +pytest-socket = "^0.6.0" + + +[tool.poetry.group.lint.dependencies] +ruff = "^0.0.249" +types-toml = "^0.10.8.1" +types-redis = "^4.3.21.6" +black = "^23.1.0" +types-chardet = "^5.0.4.6" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From a241e84eed855e328a8f63a0ee528a00e9a9e528 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 17:15:08 +0800 Subject: [PATCH 10/11] docs: update discord --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92614ff31..718687999 100644 --- a/README.md +++ b/README.md @@ -245,4 +245,4 @@ This project follows the git-contributor [spec](https://github.com/xudafeng/git- The MIT License (MIT) ## Contact Information -We are working on building a community, if you have any ideas about building the community, feel free to contact us. [Discord](https://discord.com/invite/twmZk3vv) +We are working on building a community, if you have any ideas about building the community, feel free to contact us. [Discord](https://discord.gg/kMFf77FH) From d4bab66ca0d71cb0179978a0a820051f1e2ef9b4 Mon Sep 17 00:00:00 2001 From: csunny Date: Thu, 25 May 2023 17:23:52 +0800 Subject: [PATCH 11/11] docs: update --- docs/conf.py | 6 +-- poetry.toml | 5 -- pyproject.toml | 130 ------------------------------------------------- setup.py | 37 ++++++++++++++ 4 files changed, 38 insertions(+), 140 deletions(-) delete mode 100644 poetry.toml delete mode 100644 pyproject.toml create mode 100644 setup.py diff --git a/docs/conf.py b/docs/conf.py index b0b8a00e0..9ea8cb3aa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,11 +14,7 @@ project = "DB-GPT" copyright = "2023, csunny" author = "csunny" -with open("../pyproject.toml") as f: - data = toml.load(f) - -version = data["tool"]["poetry"]["version"] -release = version +version = "0.1.0" html_title = project + " " + version # -- General configuration --------------------------------------------------- diff --git a/poetry.toml b/poetry.toml deleted file mode 100644 index 42159b247..000000000 --- a/poetry.toml +++ /dev/null @@ -1,5 +0,0 @@ -[virtualenvs] -in-project = true - -[installer] -modern-installation = false diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index e6a5f80da..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,130 +0,0 @@ -[tool.poetry] -name = "db-gpt" -version = "0.0.6" -description = "Interact with your data and environment privately" -authors = [] -readme = "README.md" -license = "MIT" -packages = [{include = "db_gpt"}] -repository = "https://www.github.com/csunny/DB-GPT" - -[tool.poetry.dependencies] -python = "^3.10" -accelerate = "^0.16" -torch = "^2.0.0" -aiohttp = "^3.8" -aiosignal = "^1.3" -async-timeout = "^4.0" -attrs = "^22.2" -bitsandbytes = "^0.37" -cchardet = "^2.1" -chardet = "^5.1" -contourpy = "^1.0" -cycler = "^0.11.0" -filelock = "^3.9.0" -fonttools = "^4.38.0" -frozenlist = "^1.3.3" -huggingface-hub = "^0.13.4" -importlib-resources = "^5.12.0" -kiwisolver = "^1.4.4" -matplotlib = "^3.7.0" -multidict = "^6.0.4" -packaging = "^23.0" -psutil = "^5.9.4" -pycocotools = "^2.0.6" -pyparsing = "^3.0.9" -python-dateutil = "^2.8.2" -pyyaml = "^6.0" -tokenizers = "^0.13.2" -tqdm = "^4.64.1" -transformers = "^4.28.0" -timm = "^0.6.13" -spacy = "^3.5.1" -webdataset = "^0.2.48" -yarl = "^1.8.2" -zipp = "^3.14.0" -omegaconf = "^2.3.0" -opencv-python = "^4.7.0.72" -iopath = "^0.1.10" -tenacity = "^8.2.2" -peft = "^0.3" -pycocoevalcap = "^1.2" -cpm_kernels = "^1.0.11" -umap-learn = "^0.5.3" -notebook = "^6.5.4" -gradio = "^3.23" -gradio-client = "^0.0.8" -wandb = "^0.15.2" -llama-index = "^0.5.27" -pymysql = "^1.0.3" -unstructured = "^0.6.3" -grpcio = "^1.47.5" - -auto-gpt-plugin-template = "^1.0.1" -pymdown-extensions = "^9.11" -gTTS = "^2.3.1" -langchain = "^0.0.142" -nltk = "^3.8.1" -python-dotenv = "^1.0.0" -pymilvus = {version = "2.2.1", optional = true} -vcrpy = "^4.2.1" -chromadb = "^0.3.22" -markdown2 = "^2.4.8" -colorama = "^0.4.6" -playsound = "^1.3" -distro = {version = "1.8.0", optional = true} -pypdf = {version = "^3.4.0", optional = true} - -[tool.poetry.group.docs.dependencies] -autodoc_pydantic = "^1.8.0" -myst_parser = "^0.18.1" -nbsphinx = "^0.8.9" -sphinx = "^4.5.0" -sphinx-autobuild = "^2021.3.14" -sphinx_book_theme = "^0.3.3" -sphinx_rtd_theme = "^1.0.0" -sphinx-typlog-theme = "^0.8.0" -sphinx-panels = "^0.6.0" -toml = "^0.10.2" -myst-nb = "^0.17.1" -linkchecker = "^10.2.1" -sphinx-copybutton = "^0.5.1" - -[tool.poetry.group.test.dependencies] -# The only dependencies that should be added are -# dependencies used for running tests (e.g., pytest, freezegun, response). -# Any dependencies that do not meet that criteria will be removed. -pytest = "^7.3.0" -pytest-cov = "^4.0.0" -pytest-dotenv = "^0.5.2" -duckdb-engine = "^0.7.0" -pytest-watcher = "^0.2.6" -freezegun = "^1.2.2" -responses = "^0.22.0" -pytest-asyncio = "^0.20.3" -lark = "^1.1.5" -pytest-mock = "^3.10.0" -pytest-socket = "^0.6.0" - - -[tool.poetry.group.lint.dependencies] -ruff = "^0.0.249" -types-toml = "^0.10.8.1" -types-redis = "^4.3.21.6" -black = "^23.1.0" -types-chardet = "^5.0.4.6" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - -[tool.ruff] -exclude = [ - ".venv", - "__pycache__", - ".ipynb_checkpoints", - ".mypy_cache", - ".ruff_cache", - "examples", - "notebooks", -] diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..43ab7ccd9 --- /dev/null +++ b/setup.py @@ -0,0 +1,37 @@ +from typing import List + +import setuptools +from setuptools import find_packages + +with open("README.md", "r") as fh: + long_description = fh.read() + + +def parse_requirements(file_name: str) -> List[str]: + with open(file_name) as f: + return [ + require.strip() for require in f + if require.strip() and not require.startswith('#') + ] + + +setuptools.setup( + name="DB-GPT", + packages=find_packages(), + version="0.1.0", + author="csunny", + author_email="cfqcsunny@gmail.com", + description="DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment." + " With this solution, you can be assured that there is no risk of data leakage, and your data is 100% private and secure.", + long_description=long_description, + long_description_content_type="text/markdown", + install_requires=parse_requirements('requirements.txt'), + url="https://github.com/csunny/DB-GPT", + license='https://opensource.org/license/mit/', + python_requires='>=3.10', + entry_points={ + 'console_scripts': [ + 'dbgpt_server=pilot.server:webserver', + ], + }, +)