Skip to content

feat: Add Postgres Reader #53

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 5 commits into from
Jan 29, 2025
Merged

feat: Add Postgres Reader #53

merged 5 commits into from
Jan 29, 2025

Conversation

dishaprakash
Copy link
Contributor

feat: Add Postgres Reader

@dishaprakash dishaprakash requested review from a team as code owners January 25, 2025 00:51
@product-auto-label product-auto-label bot added the api: cloudsql-postgres Issues related to the googleapis/llama-index-cloud-sql-pg-python API. label Jan 25, 2025
Copy link
Collaborator

@vishwarajanand vishwarajanand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vishwarajanand vishwarajanand changed the base branch from main to add-async-reader January 27, 2025 09:48
Copy link
Collaborator

@vishwarajanand vishwarajanand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the failing lint and tests in local, after merging with PR#52 and they are passing, so seems like the failure is because that PR isn't yet merged to main.
Changing base branch in GH UI didn't fix the tests!

Test log

Tests pass when run together with async version of code

(venv311) (base) ➜  llama-index-cloud-sql-pg-python git:(add-sync-reader) ✗ PYTHONPATH=src pytest -v -k reader
======================================================================================================================= test session starts =======================================================================================================================
platform linux -- Python 3.11.9, pytest-8.3.4, pluggy-1.5.0 -- /usr/local/google/home/vishwarajanand/github/llama-index-cloud-sql-pg-python/venv311/bin/python
cachedir: .pytest_cache
rootdir: /usr/local/google/home/vishwarajanand/github/llama-index-cloud-sql-pg-python
configfile: pyproject.toml
plugins: anyio-4.8.0, asyncio-0.25.2
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=class
collected 221 items / 200 deselected / 21 selected                                                                                                                                                                                                                

tests/test_async_reader.py::TestAsyncPostgresReader::test_create_reader_with_invalid_parameters PASSED                                                                                                                                                      [  4%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_default PASSED                                                                                                                                                                    [  9%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_customized_content_customized_metadata PASSED                                                                                                                                     [ 14%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_customized_content_default_metadata PASSED                                                                                                                                        [ 19%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_with_json PASSED                                                                                                                                                                  [ 23%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_customized_content_default_metadata_custom_formatter PASSED                                                                                                                       [ 28%]
tests/test_async_reader.py::TestAsyncPostgresReader::test_load_from_query_customized_content_default_metadata_custom_page_content_format PASSED                                                                                                             [ 33%]
tests/test_reader.py::TestPostgresReaderAsync::test_create_reader_with_invalid_parameters PASSED                                                                                                                                                            [ 38%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_default PASSED                                                                                                                                                                          [ 42%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_customized_content_customized_metadata PASSED                                                                                                                                           [ 47%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_customized_content_default_metadata PASSED                                                                                                                                              [ 52%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_with_json PASSED                                                                                                                                                                        [ 57%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_customized_content_default_metadata_custom_formatter PASSED                                                                                                                             [ 61%]
tests/test_reader.py::TestPostgresReaderAsync::test_load_from_query_customized_content_default_metadata_custom_page_content_format PASSED                                                                                                                   [ 66%]
tests/test_reader.py::TestPostgresReaderSync::test_create_reader_with_invalid_parameters PASSED                                                                                                                                                             [ 71%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_default PASSED                                                                                                                                                                           [ 76%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_customized_content_customized_metadata PASSED                                                                                                                                            [ 80%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_customized_content_default_metadata PASSED                                                                                                                                               [ 85%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_with_json PASSED                                                                                                                                                                         [ 90%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_customized_content_default_metadata_custom_formatter PASSED                                                                                                                              [ 95%]
tests/test_reader.py::TestPostgresReaderSync::test_load_from_query_customized_content_default_metadata_custom_page_content_format PASSED                                                                                                                    [100%]

========================================================================================================== 21 passed, 200 deselected in 94.28s (0:01:34) ==========================================================================================================
(venv311) (base) ➜  llama-index-cloud-sql-pg-python git:(add-sync-reader) ✗ 

@vishwarajanand vishwarajanand changed the base branch from add-async-reader to main January 27, 2025 09:52
@vishwarajanand
Copy link
Collaborator

By mistake, I pushed the merged branch with PR#52. Either we can merge that PR first, and rebase to see async interfaces go away.
Or pls force push the older branch head

@dishaprakash dishaprakash merged commit 4ceade4 into main Jan 29, 2025
8 checks passed
@dishaprakash dishaprakash deleted the add-sync-reader branch January 29, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudsql-postgres Issues related to the googleapis/llama-index-cloud-sql-pg-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants