llama_index SPARQL Notes 21
I've been fixing some of the things GitHub complained about when I did a pull request. Luckily things that ChatGPT can help with.
I've added type annotations to sparql.py
, started writing some tests.
added sparqlwrapper to setup.py
-
export PYTHONPATH=/home/danny/AI/LIBS-under-dev/llama_index
-
danny@danny-desktop:~/AI/LIBS-under-dev/llama_index$ pip install -e .
-
danny@danny-desktop:~/AI/LIBS-under-dev/llama_index$ pytest tests/graph_stores/test_simple.py
-
danny@danny-desktop:~/AI/LIBS-under-dev/llama_index$ pytest tests/graph_stores/test_simple.py > ../testy.md
ok, ChatGPT got the shape of the returned values wrong (so much for type annotations!) but was easy to fix.
Next is the more challenging one, test_sparql.py
.
Give ChatGPT a zip. Include paths.txt
so it gets the imports right.
"I wish to create a pytest test. I will now upload a zip of files. Look at the functions in test_simple.py and their relation to functions in simple.py, remember these. I will then give you further instructions"
"I would like a test file, test_sparql.py
that will test all the functions in sparql.py
. Much of this will be very similar to test_simple.py
as they both follow the same interface, types.py
. I would like you to go through every function in sparql.py
one at a time and create at test for it. Don't show me any results until this is done. Combine them into test_sparqly.py
and give me that. Keep explanation to a minimum. Do not ask me for confirmation, just continue until you have a full response."
much time, many prompts later...
- pytest tests/graph_stores/test_sparql.py > ../testy.md
9 errors. I noticed "EndPointNotFound"