Skip to content

fix: cli.py not sending ALL_MESSAGES fix, walk-conversation, post db tests#1

Merged
Scarvy merged 2 commits intoScarvy:mainfrom
isandesh7:main
Sep 2, 2025
Merged

fix: cli.py not sending ALL_MESSAGES fix, walk-conversation, post db tests#1
Scarvy merged 2 commits intoScarvy:mainfrom
isandesh7:main

Conversation

@isandesh7
Copy link
Copy Markdown
Contributor

cli was not sending all messages to load messages causing it to load only first message and if the first message did not have parts it did not load anything.

to verify i've added post db checks which load the most heavy conversation and outputs it result on the console in human readable format

Also had to add a pytest.ini to support console logs to be shown in default pytest commnd

I had made some fixes to load_document before observing the root cause.
I kept them since the tests are passing on those changes.

cli was not sending all messages to load messages causing it to load
only first message and if the first message did not have parts it did
not load anything.
to verify i've added post db checks which load the most heavy
conversation and outputs it result on the console in human readable
format
Also had to add a pytest.ini to support console logs to be shown in
default pytest commnd
@Scarvy
Copy link
Copy Markdown
Owner

Scarvy commented Apr 21, 2025

@isandesh7 Thanks for the PR!

Tests failed looking for the database in the new pytest file you added. See below:

platform linux -- Python 3.11.12, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/runner/work/chatgpt-to-sqlite/chatgpt-to-sqlite
configfile: pytest.ini
collected 3 items

tests/test_chatgpt_to_sqlite.py::test_version PASSED
tests/test_post_import_sanity_on_db.py::test_preview_documents ERROR
tests/test_post_import_sanity_on_db.py::test_sanity_check_db FAILED

==================================== ERRORS ====================================
___________________ ERROR at setup of test_preview_documents ___________________
tests/test_post_import_sanity_on_db.py:[15](https://github.com/Scarvy/chatgpt-to-sqlite/actions/runs/14296529473/job/40895923771?pr=1#step:5:16): in get_most_active_conversation_with_messages
    cursor.execute(
E   sqlite3.OperationalError: no such table: conversations

I think adding a fixture to initialize a temporary database to run the sanity checks will fix it. After that it will be good to merge 👍.

@isandesh7
Copy link
Copy Markdown
Contributor Author

@Scarvy I have added the fixture. The tests pass now.

@Scarvy Scarvy merged commit a2da29b into Scarvy:main Sep 2, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants