-
Notifications
You must be signed in to change notification settings - Fork 723
Missing Test Coverage #375
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
Comments
The codebase for sure needs more tests, I'll dive a bit into how we approach different tests, we aren't a big fan of packages that measure test coverage though. All code comes with costs (writing an maintenance), so if the code is more complicated in the test than the function it is testing, that test is not really doing much to reduce errors I the codebase when working with that function. We also have extensive use of type hints and use MyPy, so we eliminate a huge class of bugs that often plague dynamically typed codebases. For unit tests, it also doesn't make sense to write unit tests on functions whose main logical components is an LLM call or a Cypher query. An example is There are definitely functions in the codebase that need unit tests though. I see you're also adding unit tests to the Integration tests should be the main set of tests for functions that have a Cypher query component. The CRUD functions in Finally, for LLM and search testing we are moving towards evals (you'll see an evals folder in the tests folder). The LLM calls are the most brittle part of the application, and changing prompts can have a significant effect o quality without actually breaking the flow. Over time we have also collected a lot of data to help us improve the system. As such, it makes sense for us to test our LLM calls and search results through evals. However, this is a slow process since it takes a long time to create and annotate a dataset, let alone the time it takes to build the framework. So this is a slow process that we are dedicating time to whenever the team is free. We also have some internal e2e evals we run before releases to make sure graph building and searching is working properly. Evals testing our graph building and search functionality also double as testing the functionality of the "units" as well. And most of the code base is either data ingestion, or search. That is just some off the cuff rambling about tests though. I would say the integration tests for |
That makes sense. Thank you very much for the information. I will delete my Add Tests PR #377 since it added coverage and then redo the Embedder tests so they are more inline with what you guys are looking for. One question about that, should I still use pytest-mock? Also, my Even Better Toml extension wants to reformat the pyproject.toml to add indentations and reorder things in alphabetical order; would you like to turn that off if I do add pytest-mock as a dev dependency? I can imagine looking over that diff in a PR would be annoying. Next, about my #372 PR. It seems like that one would still fit with what you described. Should I update anything on that before it can be merged? Lastly, after I look through all you described and start working on it, should I message you directly on discord if I have any questions or contact you some other way? Thank you again for the information and help. It makes things much more clear and will make contributing much easier. |
Add Test Coverage and Expand Test Suite
Context
I've noticed that the tests folder is currently minimal, and I'd like to help improve test coverage. Adding tests would:
Proposed Changes
Questions for Maintainers
I'm happy to discuss the approach and get feedback before starting the implementation.
The text was updated successfully, but these errors were encountered: