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.
Files changed (89) hide show
  1. tabletalk-0.2.0/.github/workflows/db_provider_tests.yml +57 -0
  2. tabletalk-0.2.0/.github/workflows/publish.yml +31 -0
  3. tabletalk-0.2.0/.gitignore +208 -0
  4. tabletalk-0.2.0/.pre-commit-config.yaml +48 -0
  5. tabletalk-0.2.0/.python-version +1 -0
  6. tabletalk-0.2.0/PKG-INFO +494 -0
  7. tabletalk-0.2.0/README.md +451 -0
  8. tabletalk-0.2.0/contexts/default_context.yaml +13 -0
  9. tabletalk-0.2.0/docs/Makefile +20 -0
  10. tabletalk-0.2.0/docs/conf.py +27 -0
  11. tabletalk-0.2.0/docs/dev/contexts.rst +45 -0
  12. tabletalk-0.2.0/docs/dev/local_development.rst +127 -0
  13. tabletalk-0.2.0/docs/dev/providers.rst +164 -0
  14. tabletalk-0.2.0/docs/dev/querying.rst +201 -0
  15. tabletalk-0.2.0/docs/index.rst +26 -0
  16. tabletalk-0.2.0/docs/make.bat +35 -0
  17. tabletalk-0.2.0/examples/ecommerce/README.md +235 -0
  18. tabletalk-0.2.0/examples/ecommerce/agents/customer_analyst.yaml +44 -0
  19. tabletalk-0.2.0/examples/ecommerce/agents/inventory_manager.yaml +34 -0
  20. tabletalk-0.2.0/examples/ecommerce/agents/marketing_analyst.yaml +35 -0
  21. tabletalk-0.2.0/examples/ecommerce/agents/revenue_analyst.yaml +39 -0
  22. tabletalk-0.2.0/examples/ecommerce/contexts/customers.yaml +30 -0
  23. tabletalk-0.2.0/examples/ecommerce/contexts/inventory.yaml +41 -0
  24. tabletalk-0.2.0/examples/ecommerce/contexts/marketing.yaml +39 -0
  25. tabletalk-0.2.0/examples/ecommerce/contexts/sales.yaml +53 -0
  26. tabletalk-0.2.0/examples/ecommerce/manifest/customers.txt +5 -0
  27. tabletalk-0.2.0/examples/ecommerce/manifest/inventory.txt +7 -0
  28. tabletalk-0.2.0/examples/ecommerce/manifest/marketing.txt +7 -0
  29. tabletalk-0.2.0/examples/ecommerce/manifest/sales.txt +9 -0
  30. tabletalk-0.2.0/examples/ecommerce/seed.py +317 -0
  31. tabletalk-0.2.0/examples/ecommerce/tabletalk.yaml +51 -0
  32. tabletalk-0.2.0/pyproject.toml +94 -0
  33. tabletalk-0.2.0/tabletalk/__init__.py +27 -0
  34. tabletalk-0.2.0/tabletalk/app.py +369 -0
  35. tabletalk-0.2.0/tabletalk/cli.py +535 -0
  36. tabletalk-0.2.0/tabletalk/factories.py +155 -0
  37. tabletalk-0.2.0/tabletalk/interfaces.py +507 -0
  38. tabletalk-0.2.0/tabletalk/profiles.py +127 -0
  39. tabletalk-0.2.0/tabletalk/providers/anthropic_provider.py +59 -0
  40. tabletalk-0.2.0/tabletalk/providers/azuresql_provider.py +179 -0
  41. tabletalk-0.2.0/tabletalk/providers/duckdb_provider.py +139 -0
  42. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/mysql_provider.py +72 -35
  43. tabletalk-0.2.0/tabletalk/providers/openai_provider.py +51 -0
  44. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/postgres_provider.py +65 -51
  45. tabletalk-0.2.0/tabletalk/providers/snowflake_provider.py +180 -0
  46. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/sqlite_provider.py +23 -42
  47. tabletalk-0.2.0/tabletalk/static/index.html +1271 -0
  48. tabletalk-0.2.0/tabletalk/tests/conftest.py +573 -0
  49. tabletalk-0.2.0/tabletalk/tests/providers/__init__.py +0 -0
  50. tabletalk-0.2.0/tabletalk/tests/providers/test_azuresql.py +61 -0
  51. tabletalk-0.2.0/tabletalk/tests/providers/test_bigquery.py +60 -0
  52. tabletalk-0.2.0/tabletalk/tests/providers/test_duckdb.py +377 -0
  53. tabletalk-0.2.0/tabletalk/tests/providers/test_mysql.py +129 -0
  54. tabletalk-0.2.0/tabletalk/tests/providers/test_postgres.py +114 -0
  55. tabletalk-0.2.0/tabletalk/tests/providers/test_snowflake.py +71 -0
  56. tabletalk-0.2.0/tabletalk/tests/providers/test_sqlite.py +364 -0
  57. tabletalk-0.2.0/tabletalk/tests/test_app.py +505 -0
  58. tabletalk-0.2.0/tabletalk/tests/test_cli.py +488 -0
  59. tabletalk-0.2.0/tabletalk/tests/test_factories.py +210 -0
  60. tabletalk-0.2.0/tabletalk/tests/test_interfaces.py +597 -0
  61. tabletalk-0.2.0/tabletalk/tests/test_profiles.py +378 -0
  62. tabletalk-0.2.0/tabletalk/tests/test_utils.py +218 -0
  63. tabletalk-0.2.0/tabletalk/utils.py +122 -0
  64. tabletalk-0.2.0/tabletalk.yaml +17 -0
  65. tabletalk-0.2.0/uv.lock +2416 -0
  66. tabletalk-0.1.9/PKG-INFO +0 -229
  67. tabletalk-0.1.9/README.md +0 -191
  68. tabletalk-0.1.9/setup.cfg +0 -4
  69. tabletalk-0.1.9/setup.py +0 -65
  70. tabletalk-0.1.9/tabletalk/app.py +0 -101
  71. tabletalk-0.1.9/tabletalk/cli.py +0 -132
  72. tabletalk-0.1.9/tabletalk/factories.py +0 -69
  73. tabletalk-0.1.9/tabletalk/interfaces.py +0 -262
  74. tabletalk-0.1.9/tabletalk/providers/anthropic_provider.py +0 -25
  75. tabletalk-0.1.9/tabletalk/providers/openai_provider.py +0 -20
  76. tabletalk-0.1.9/tabletalk/static/index.html +0 -427
  77. tabletalk-0.1.9/tabletalk/utils.py +0 -78
  78. tabletalk-0.1.9/tabletalk.egg-info/PKG-INFO +0 -229
  79. tabletalk-0.1.9/tabletalk.egg-info/SOURCES.txt +0 -25
  80. tabletalk-0.1.9/tabletalk.egg-info/dependency_links.txt +0 -1
  81. tabletalk-0.1.9/tabletalk.egg-info/entry_points.txt +0 -2
  82. tabletalk-0.1.9/tabletalk.egg-info/requires.txt +0 -12
  83. tabletalk-0.1.9/tabletalk.egg-info/top_level.txt +0 -1
  84. {tabletalk-0.1.9 → tabletalk-0.2.0}/LICENSE +0 -0
  85. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/main.py +0 -0
  86. {tabletalk-0.1.9/tabletalk → tabletalk-0.2.0/tabletalk/providers}/__init__.py +0 -0
  87. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/providers/bigquery_provider.py +0 -0
  88. {tabletalk-0.1.9 → tabletalk-0.2.0}/tabletalk/static/logo.jpg +0 -0
  89. {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