diff --git a/README.md b/README.md index 2bdfeac..337a51d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ print(result.content) # JSON rows tools["hotdata_create_managed_database"].call( name="sales", schema_name="public", - tables="orders\ncustomers", + tables="orders,customers", ) tools["hotdata_load_managed_table"].call( diff --git a/hotdata_llamaindex/tools.py b/hotdata_llamaindex/tools.py index 58b6d49..ad46de4 100644 --- a/hotdata_llamaindex/tools.py +++ b/hotdata_llamaindex/tools.py @@ -58,8 +58,8 @@ def hotdata_create_managed_database( schema_name: str = DEFAULT_SCHEMA, tables: str = "", ) -> str: - """Create a Hotdata-managed database and optionally declare tables (one per line).""" - table_names = [line.strip() for line in tables.splitlines() if line.strip()] + """Create a Hotdata-managed database and optionally declare tables (comma or newline separated).""" + table_names = [t.strip() for t in tables.replace(",", "\n").splitlines() if t.strip()] db = create_managed_database( client, name=name, diff --git a/scripts/publish-workflow.sh b/scripts/publish-workflow.sh deleted file mode 100755 index 88c9db9..0000000 --- a/scripts/publish-workflow.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash -# Generate publish.yml for a package. Usage: publish-workflow.sh hotdata-runtime -set -euo pipefail -pkg="${1:?package name}" -cat <&2 - exit 1 - fi - tag="\${GITHUB_REF_NAME#v}" - pkg_version=\$(python -c "import tomllib,pathlib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']['version'])") - if [ "\$tag" != "\$pkg_version" ]; then - echo "Release tag (\$tag) does not match pyproject.toml version (\$pkg_version)" >&2 - exit 1 - fi - - - name: Build sdist and wheel - run: python -m build - - - name: Check distribution metadata - run: python -m twine check --strict dist/* - - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: dist - path: dist/ - - publish: - name: Publish to PyPI - needs: build - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/${pkg} - permissions: - id-token: write - steps: - - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 - with: - name: dist - path: dist/ - - - name: Publish via Trusted Publishing - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 -EOF