tabletalk 0.1.9__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tabletalk-0.2.0/.github/workflows/db_provider_tests.yml +57 -0
- tabletalk-0.2.0/.github/workflows/publish.yml +31 -0
- tabletalk-0.2.0/.gitignore +208 -0
- tabletalk-0.2.0/.pre-commit-config.yaml +48 -0
- tabletalk-0.2.0/.python-version +1 -0
- tabletalk-0.2.0/PKG-INFO +494 -0
- tabletalk-0.2.0/README.md +451 -0
- tabletalk-0.2.0/contexts/default_context.yaml +13 -0
- tabletalk-0.2.0/docs/Makefile +20 -0
- tabletalk-0.2.0/docs/conf.py +27 -0
- tabletalk-0.2.0/docs/dev/contexts.rst +45 -0
- tabletalk-0.2.0/docs/dev/local_development.rst +127 -0
- tabletalk-0.2.0/docs/dev/providers.rst +164 -0
- tabletalk-0.2.0/docs/dev/querying.rst +201 -0
- tabletalk-0.2.0/docs/index.rst +26 -0
- tabletalk-0.2.0/docs/make.bat +35 -0
- tabletalk-0.2.0/examples/ecommerce/README.md +235 -0
- tabletalk-0.2.0/examples/ecommerce/agents/customer_analyst.yaml +44 -0
- tabletalk-0.2.0/examples/ecommerce/agents/inventory_manager.yaml +34 -0
- tabletalk-0.2.0/examples/ecommerce/agents/marketing_analyst.yaml +35 -0
- tabletalk-0.2.0/examples/ecommerce/agents/revenue_analyst.yaml +39 -0
- tabletalk-0.2.0/examples/ecommerce/contexts/customers.yaml +30 -0
- tabletalk-0.2.0/examples/ecommerce/contexts/inventory.yaml +41 -0
- tabletalk-0.2.0/examples/ecommerce/contexts/marketing.yaml +39 -0
- tabletalk-0.2.0/examples/ecommerce/contexts/sales.yaml +53 -0
- tabletalk-0.2.0/examples/ecommerce/manifest/customers.txt +5 -0
- tabletalk-0.2.0/examples/ecommerce/manifest/inventory.txt +7 -0
- tabletalk-0.2.0/examples/ecommerce/manifest/marketing.txt +7 -0
- tabletalk-0.2.0/examples/ecommerce/manifest/sales.txt +9 -0
- tabletalk-0.2.0/examples/ecommerce/seed.py +317 -0
- tabletalk-0.2.0/examples/ecommerce/tabletalk.yaml +51 -0
- tabletalk-0.2.0/pyproject.toml +94 -0
- tabletalk-0.2.0/tabletalk/__init__.py +27 -0
- tabletalk-0.2.0/tabletalk/app.py +369 -0
- tabletalk-0.2.0/tabletalk/cli.py +535 -0
- tabletalk-0.2.0/tabletalk/factories.py +155 -0
- tabletalk-0.2.0/tabletalk/interfaces.py +507 -0
- tabletalk-0.2.0/tabletalk/profiles.py +127 -0
- tabletalk-0.2.0/tabletalk/providers/anthropic_provider.py +59 -0
- tabletalk-0.2.0/tabletalk/providers/azuresql_provider.py +179 -0
- tabletalk-0.2.0/tabletalk/providers/duckdb_provider.py +139 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/mysql_provider.py +72 -35
- tabletalk-0.2.0/tabletalk/providers/openai_provider.py +51 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/postgres_provider.py +65 -51
- tabletalk-0.2.0/tabletalk/providers/snowflake_provider.py +180 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/sqlite_provider.py +23 -42
- tabletalk-0.2.0/tabletalk/static/index.html +1271 -0
- tabletalk-0.2.0/tabletalk/tests/conftest.py +573 -0
- tabletalk-0.2.0/tabletalk/tests/providers/__init__.py +0 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_azuresql.py +61 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_bigquery.py +60 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_duckdb.py +377 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_mysql.py +129 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_postgres.py +114 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_snowflake.py +71 -0
- tabletalk-0.2.0/tabletalk/tests/providers/test_sqlite.py +364 -0
- tabletalk-0.2.0/tabletalk/tests/test_app.py +505 -0
- tabletalk-0.2.0/tabletalk/tests/test_cli.py +488 -0
- tabletalk-0.2.0/tabletalk/tests/test_factories.py +210 -0
- tabletalk-0.2.0/tabletalk/tests/test_interfaces.py +597 -0
- tabletalk-0.2.0/tabletalk/tests/test_profiles.py +378 -0
- tabletalk-0.2.0/tabletalk/tests/test_utils.py +218 -0
- tabletalk-0.2.0/tabletalk/utils.py +122 -0
- tabletalk-0.2.0/tabletalk.yaml +17 -0
- tabletalk-0.2.0/uv.lock +2416 -0
- tabletalk-0.1.9/PKG-INFO +0 -229
- tabletalk-0.1.9/README.md +0 -191
- tabletalk-0.1.9/setup.cfg +0 -4
- tabletalk-0.1.9/setup.py +0 -65
- tabletalk-0.1.9/tabletalk/app.py +0 -101
- tabletalk-0.1.9/tabletalk/cli.py +0 -132
- tabletalk-0.1.9/tabletalk/factories.py +0 -69
- tabletalk-0.1.9/tabletalk/interfaces.py +0 -262
- tabletalk-0.1.9/tabletalk/providers/anthropic_provider.py +0 -25
- tabletalk-0.1.9/tabletalk/providers/openai_provider.py +0 -20
- tabletalk-0.1.9/tabletalk/static/index.html +0 -427
- tabletalk-0.1.9/tabletalk/utils.py +0 -78
- tabletalk-0.1.9/tabletalk.egg-info/PKG-INFO +0 -229
- tabletalk-0.1.9/tabletalk.egg-info/SOURCES.txt +0 -25
- tabletalk-0.1.9/tabletalk.egg-info/dependency_links.txt +0 -1
- tabletalk-0.1.9/tabletalk.egg-info/entry_points.txt +0 -2
- tabletalk-0.1.9/tabletalk.egg-info/requires.txt +0 -12
- tabletalk-0.1.9/tabletalk.egg-info/top_level.txt +0 -1
- {tabletalk-0.1.9 → tabletalk-0.2.0}/LICENSE +0 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/main.py +0 -0
- {tabletalk-0.1.9/tabletalk → tabletalk-0.2.0/tabletalk/providers}/__init__.py +0 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/bigquery_provider.py +0 -0
- {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/static/logo.jpg +0 -0
- {tabletalk-0.1.9/tabletalk/providers → tabletalk-0.2.0/tabletalk/tests}/__init__.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: DB Provider Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
services:
|
|
15
|
+
postgres:
|
|
16
|
+
image: postgres:16
|
|
17
|
+
env:
|
|
18
|
+
POSTGRES_USER: test
|
|
19
|
+
POSTGRES_PASSWORD: test
|
|
20
|
+
POSTGRES_DB: test
|
|
21
|
+
ports: ["5432:5432"]
|
|
22
|
+
options: >-
|
|
23
|
+
--health-cmd pg_isready
|
|
24
|
+
--health-interval 10s
|
|
25
|
+
--health-timeout 5s
|
|
26
|
+
--health-retries 5
|
|
27
|
+
|
|
28
|
+
mysql:
|
|
29
|
+
image: mysql:8
|
|
30
|
+
env:
|
|
31
|
+
MYSQL_ROOT_PASSWORD: test
|
|
32
|
+
MYSQL_DATABASE: test
|
|
33
|
+
ports: ["3306:3306"]
|
|
34
|
+
options: >-
|
|
35
|
+
--health-cmd="mysqladmin ping"
|
|
36
|
+
--health-interval=10s
|
|
37
|
+
--health-timeout=5s
|
|
38
|
+
--health-retries=3
|
|
39
|
+
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v3
|
|
45
|
+
with:
|
|
46
|
+
version: "latest"
|
|
47
|
+
|
|
48
|
+
- name: Set up Python
|
|
49
|
+
uses: actions/setup-python@v5
|
|
50
|
+
with:
|
|
51
|
+
python-version: "3.11"
|
|
52
|
+
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
run: uv sync --extra postgres --extra mysql
|
|
55
|
+
|
|
56
|
+
- name: Run tests
|
|
57
|
+
run: uv run pytest
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
pypi-publish:
|
|
9
|
+
name: Publish release to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment:
|
|
12
|
+
name: pypi
|
|
13
|
+
url: https://pypi.org/p/tabletalk
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v3
|
|
22
|
+
with:
|
|
23
|
+
version: "latest"
|
|
24
|
+
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: uv build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
30
|
+
with:
|
|
31
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# If you prefer the allow list template instead of the deny list, see community template:
|
|
2
|
+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
|
3
|
+
#
|
|
4
|
+
# Binaries for programs and plugins
|
|
5
|
+
/tabletext
|
|
6
|
+
.env
|
|
7
|
+
/test
|
|
8
|
+
*.json
|
|
9
|
+
test/
|
|
10
|
+
biql.yaml
|
|
11
|
+
biql
|
|
12
|
+
modules/
|
|
13
|
+
*.exe
|
|
14
|
+
*.exe~
|
|
15
|
+
*.dll
|
|
16
|
+
*.so
|
|
17
|
+
*.dylib
|
|
18
|
+
.DS_Store
|
|
19
|
+
# Test binary, built with `go test -c`
|
|
20
|
+
*.test
|
|
21
|
+
|
|
22
|
+
# Output of the go coverage tool, specifically when used with LiteIDE
|
|
23
|
+
*.out
|
|
24
|
+
|
|
25
|
+
# Dependency directories (remove the comment below to include it)
|
|
26
|
+
# vendor/
|
|
27
|
+
|
|
28
|
+
# Go workspace file
|
|
29
|
+
go.work
|
|
30
|
+
go.work.sum
|
|
31
|
+
|
|
32
|
+
.vscode/
|
|
33
|
+
|
|
34
|
+
#ipfile.lock
|
|
35
|
+
user_settings.json
|
|
36
|
+
# UV
|
|
37
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
38
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
39
|
+
# commonly ignored for libraries.
|
|
40
|
+
#uv.lock
|
|
41
|
+
|
|
42
|
+
# poetry
|
|
43
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
44
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
45
|
+
# commonly ignored for libraries.
|
|
46
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
47
|
+
#poetry.lock
|
|
48
|
+
|
|
49
|
+
# pdm
|
|
50
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
51
|
+
#pdm.lock
|
|
52
|
+
# pdm stores project-wide configurations in .pdm.torate JetBrains.gitignore that can
|
|
53
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
54
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
55
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
56
|
+
#.idea/
|
|
57
|
+
|
|
58
|
+
# PyPI configuration file
|
|
59
|
+
.pypircml, but it is recommended to not include it
|
|
60
|
+
# in version control.
|
|
61
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
62
|
+
.pdm.toml
|
|
63
|
+
.pdm-python
|
|
64
|
+
.pdm-build/
|
|
65
|
+
|
|
66
|
+
# Database
|
|
67
|
+
*.db
|
|
68
|
+
__pycache__
|
|
69
|
+
|
|
70
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
71
|
+
__pypackages__/
|
|
72
|
+
|
|
73
|
+
# Celery stuff
|
|
74
|
+
celerybeat-schedule
|
|
75
|
+
celerybeat.pid
|
|
76
|
+
|
|
77
|
+
# SageMath parsed files
|
|
78
|
+
*.sage.py
|
|
79
|
+
|
|
80
|
+
# Environments
|
|
81
|
+
.env
|
|
82
|
+
.venv
|
|
83
|
+
env/
|
|
84
|
+
venv/
|
|
85
|
+
ENV/
|
|
86
|
+
env.bak/
|
|
87
|
+
venv.bak/
|
|
88
|
+
|
|
89
|
+
# Spyder project settings
|
|
90
|
+
.spyderproject
|
|
91
|
+
.spyproject
|
|
92
|
+
|
|
93
|
+
# Rope project settings
|
|
94
|
+
.ropeproject
|
|
95
|
+
|
|
96
|
+
# mkdocs documentation
|
|
97
|
+
/site
|
|
98
|
+
|
|
99
|
+
# mypy
|
|
100
|
+
.mypy_cache/
|
|
101
|
+
.dmypy.json
|
|
102
|
+
dmypy.json
|
|
103
|
+
|
|
104
|
+
# Pyre type checker
|
|
105
|
+
.pyre/
|
|
106
|
+
|
|
107
|
+
# pytype static type analyzer
|
|
108
|
+
.pytype/
|
|
109
|
+
|
|
110
|
+
# Cython debug symbols
|
|
111
|
+
cython_debug/
|
|
112
|
+
|
|
113
|
+
# PyCharm
|
|
114
|
+
# JetBrains specific template is maintained in a sepaqlite3
|
|
115
|
+
db.sqlite3-journal
|
|
116
|
+
|
|
117
|
+
# Flask stuff:
|
|
118
|
+
instance/
|
|
119
|
+
.webassets-cache
|
|
120
|
+
|
|
121
|
+
# Scrapy stuff:
|
|
122
|
+
.scrapy
|
|
123
|
+
|
|
124
|
+
# Sphinx documentation
|
|
125
|
+
docs/_build/
|
|
126
|
+
|
|
127
|
+
# PyBuilder
|
|
128
|
+
.pybuilder/
|
|
129
|
+
target/
|
|
130
|
+
|
|
131
|
+
# Jupyter Notebook
|
|
132
|
+
.ipynb_checkpoints
|
|
133
|
+
|
|
134
|
+
# IPython
|
|
135
|
+
profile_default/
|
|
136
|
+
ipython_config.py
|
|
137
|
+
|
|
138
|
+
# pyenv
|
|
139
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
140
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
141
|
+
# .python-version
|
|
142
|
+
|
|
143
|
+
# pipenv
|
|
144
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
145
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
146
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
147
|
+
# install all needed dependencies.
|
|
148
|
+
#P Byte-compiled / optimized / DLL files
|
|
149
|
+
__pycache__/
|
|
150
|
+
*.py[cod]
|
|
151
|
+
*$py.class
|
|
152
|
+
|
|
153
|
+
# C extensions
|
|
154
|
+
*.so
|
|
155
|
+
|
|
156
|
+
# Distribution / packaging
|
|
157
|
+
.Python
|
|
158
|
+
build/
|
|
159
|
+
develop-eggs/
|
|
160
|
+
dist/
|
|
161
|
+
downloads/
|
|
162
|
+
eggs/
|
|
163
|
+
.eggs/
|
|
164
|
+
lib/
|
|
165
|
+
lib64/
|
|
166
|
+
parts/
|
|
167
|
+
sdist/
|
|
168
|
+
var/
|
|
169
|
+
wheels/
|
|
170
|
+
share/python-wheels/
|
|
171
|
+
*.egg-info/
|
|
172
|
+
.installed.cfg
|
|
173
|
+
*.egg
|
|
174
|
+
MANIFEST
|
|
175
|
+
|
|
176
|
+
# PyInstaller
|
|
177
|
+
# Usually these files are written by a python script from a template
|
|
178
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
179
|
+
*.manifest
|
|
180
|
+
*.spec
|
|
181
|
+
|
|
182
|
+
# Installer logs
|
|
183
|
+
pip-log.txt
|
|
184
|
+
pip-delete-this-directory.txt
|
|
185
|
+
|
|
186
|
+
# Unit test / coverage reports
|
|
187
|
+
htmlcov/
|
|
188
|
+
.tox/
|
|
189
|
+
.nox/
|
|
190
|
+
.coverage
|
|
191
|
+
.coverage.*
|
|
192
|
+
.cache
|
|
193
|
+
nosetests.xml
|
|
194
|
+
coverage.xml
|
|
195
|
+
*.cover
|
|
196
|
+
*.py,cover
|
|
197
|
+
.hypothesis/
|
|
198
|
+
.pytest_cache/
|
|
199
|
+
cover/
|
|
200
|
+
|
|
201
|
+
# Translations
|
|
202
|
+
*.mo
|
|
203
|
+
*.pot
|
|
204
|
+
|
|
205
|
+
# Django stuff:
|
|
206
|
+
*.log
|
|
207
|
+
local_settings.py
|
|
208
|
+
db.s
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-case-conflict
|
|
6
|
+
- id: check-json
|
|
7
|
+
- id: check-executables-have-shebangs
|
|
8
|
+
- id: pretty-format-json
|
|
9
|
+
args: [ --autofix ]
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
- id: debug-statements
|
|
13
|
+
- id: end-of-file-fixer
|
|
14
|
+
- id: mixed-line-ending
|
|
15
|
+
- id: trailing-whitespace
|
|
16
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
17
|
+
rev: v1.10.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: python-check-blanket-noqa
|
|
20
|
+
- id: python-check-blanket-type-ignore
|
|
21
|
+
- id: python-no-eval
|
|
22
|
+
- id: rst-backticks
|
|
23
|
+
- id: rst-directive-colons
|
|
24
|
+
- id: rst-inline-touching-normal
|
|
25
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
26
|
+
rev: v0.3.7
|
|
27
|
+
hooks:
|
|
28
|
+
- id: ruff
|
|
29
|
+
args: [ "--fix", "--extend-select=PD002", "--extend-select=E722", "--extend-select=PERF101", "--extend-select=I001", "--extend-select=I002" ]
|
|
30
|
+
- id: ruff-format
|
|
31
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
32
|
+
rev: 'v1.10.1'
|
|
33
|
+
hooks:
|
|
34
|
+
- id: mypy
|
|
35
|
+
additional_dependencies: [
|
|
36
|
+
types-PyYAML==6.0.12.20241230,
|
|
37
|
+
openai,
|
|
38
|
+
google-cloud-bigquery,
|
|
39
|
+
google-auth,
|
|
40
|
+
types-psycopg2,
|
|
41
|
+
mysql-connector-python,
|
|
42
|
+
anthropic,
|
|
43
|
+
click,
|
|
44
|
+
setuptools,
|
|
45
|
+
flask,
|
|
46
|
+
pytest
|
|
47
|
+
]
|
|
48
|
+
args: [--strict, --namespace-packages]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|