Feat/production readiness#82
Open
sharathjogi2040 wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
Open
Feat/production readiness#82sharathjogi2040 wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
sharathjogi2040 wants to merge 4 commits intoGoogleCloudPlatform:mainfrom
Conversation
This commit introduces a major new capability to the Open Data QnA system,
allowing you to query collections of JSON files using natural language.
The system now translates natural language questions into Python code,
which is then executed to retrieve data from the specified JSON files.
Key changes include:
- New capabilities for generating Python code from natural language
and contextual information (JSON schemas, CSV schemas, JSON file manifest).
- New capabilities for validating Python code syntax.
- New capabilities for fixing erroneous Python code.
- A new mechanism for safely executing the generated Python code
in a restricted environment and returning structured results or errors.
- Adapted capabilities for embedding JSON/CSV schema descriptions and
JSON filename manifests.
- Adapted capabilities for handling results or errors from Python
code execution and generating natural language responses.
- Configuration updates to orchestrate the new JSON querying workflow,
including paths to JSON data, schema files, and manifest files,
and new prompts for the JSON querying capabilities.
- Data Handling:
- The system processes your provided JSON schemas, CSV schemas, and
JSON filename information to guide query generation.
- It can handle lookups in potentially large collections of individual
JSON files, optionally using CSV files for initial filtering.
- Testing:
- A comprehensive test plan with diverse test cases was developed to ensure functionality and guide iteration.
This enables querying of complex, nested JSON structures, significantly
expanding the types of data sources the system can interact with beyond
traditional SQL databases.
This change introduces a series of improvements to make the application more robust, secure, testable, and ready for containerized deployment. Key changes: - Refactored the core logic from `opendataqna.py` into a new `Pipeline` class in `pipeline.py`. This improves code organization and maintainability. - Introduced a testing framework (`pytest`, `pytest-asyncio`, `pytest-mock`) and added initial unit tests for the pipeline. - Modified the application to be configurable via environment variables, with `config.ini` as a fallback. This is essential for containerized deployments. - Added support for fetching secrets (e.g., database passwords) from Google Secret Manager, improving security. - Created a `Dockerfile.cli` to containerize the command-line application. - Added a `.dockerignore` file to optimize the Docker build context. - Updated the `README.md` to document the new Docker and secret management features. - Fixed several bugs uncovered during the refactoring process, including import errors and incorrect method signatures.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.