-
Notifications
You must be signed in to change notification settings - Fork 134
refactor(sdk): make queryweaver_sdk pip-installable with shared core #544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
b1d56a8
sdk
a3a0e0a
fix: update license to AGPL-3.0 and format client.py imports
fb223f7
Merge branch 'staging' into dvirdu_python_api
DvirDukhan c045f05
fix: address PR review comments - unused variable and empty except block
e4936fa
test: improve SDK tests with content validation
ba871ed
ci: disable acceptable pylint warnings in CI
28818b8
refactor: fix pylint issues properly without disabling warnings
291a74d
testing + readme
DvirDukhan e9a8371
Merge branch 'staging' into dvirdu_python_api
DvirDukhan 834706c
text2sql_common - common file
DvirDukhan f052cc3
PR comments
DvirDukhan 80386f2
Merge branch 'staging' into dvirdu_python_api
gkorland 4a6648c
Merge staging into dvirdu_python_api: resolve conflicts
gkorland 5a779df
fix: resolve CI failures across all workflows
gkorland 9e27a62
update lock files
gkorland 731484c
merge: resolve conflicts with staging
gkorland d729e85
fix: add SDK to spellcheck wordlist
gkorland 04385b6
refactor(sdk): make queryweaver_sdk pip-installable with shared core
galshubeli fdcc3d7
fix(sdk): address review bugs in refresh path and stale docstring
galshubeli 46c3b2c
docs(examples): add SDK end-to-end example with 12-table postgres schema
galshubeli b9372ab
merge: resolve conflicts with staging
galshubeli ca1e9ed
fix(sdk): address critical bot-review bugs
galshubeli eacaf39
fix(sdk): address remaining major + minor review issues
galshubeli 61fb5fe
chore(sdk): docs/tests/infra hygiene from review
galshubeli a0cbb05
fix(sdk): final round of review issues
galshubeli 2c32f5b
refactor(core): rename text2sql_common → pipeline
galshubeli 33b8b1b
refactor(core): add unified run_query/run_confirmed orchestration
galshubeli dd26c74
refactor(core): switch routes and SDK to unified pipeline; delete syn…
galshubeli 8d42bf4
fix(ci): unblock build/test/sdk-tests + harden stream error path
galshubeli 4601362
fix(sdk): address Copilot follow-up review
galshubeli 0050733
fix(docker): install server extra so uvicorn is available
galshubeli 27eea6d
refactor(sdk): rename queryweaver_sdk → queryweaver
galshubeli e4e2fa4
refactor(core): dedupe pipeline helpers across streaming and SDK paths
galshubeli 1dcf746
fix(routes): suppress py/stack-trace-exposure on _stream_pipeline sink
galshubeli 5b120cf
fix(routes,sdk): eager-validate, gate console script, tighten URL det…
galshubeli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,4 +120,5 @@ pylint | |
| pytest | ||
| Radix | ||
| Zod | ||
| SDK | ||
| Dependabot | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| """Resolve a FalkorDB handle, falling back to the server-side singleton. | ||
|
|
||
| Core text2sql functions accept an optional ``db`` parameter so the SDK can | ||
| inject its own connection without mutating process globals. When ``db`` is | ||
| None (route handlers that haven't threaded it yet), we lazily import the | ||
| module-level singleton from ``api.extensions``. The import is deferred so | ||
| the SDK can use this module without triggering ``api.extensions``'s | ||
| import-time FalkorDB connect. | ||
| """ | ||
|
|
||
| from typing import TYPE_CHECKING, Optional | ||
|
|
||
| if TYPE_CHECKING: | ||
| # Import only for type checking — avoids pulling falkordb at runtime when | ||
| # callers pass an explicit handle and never need the server default. | ||
| from falkordb.asyncio import FalkorDB | ||
|
|
||
|
|
||
| def resolve_db(db: Optional["FalkorDB"] = None) -> "FalkorDB": | ||
| """Return the given ``db`` handle, or lazily import the server default.""" | ||
| if db is not None: | ||
| return db | ||
| # pylint: disable=import-outside-toplevel | ||
| from api.extensions import db as _default_db | ||
| return _default_db |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.