What needs refactoring
PRA needs to be gone through and checked for any issues that might pop up, ways to improve etc since it is currently a minimal viable product (mvp).
Current state
MVP
Proposed changes
More tests to add, and lookover closely for any unused code or general enhancements. The below list is a good starting place, but is neither a definite nor an exhaustive list.
- Is format.retrieved_content_to_text being used?
- Is format.raw_search_results_to_text being used?
- Does format.search_result_to_text need a recipe wrangle version?
- What exactly is web.py doing that couldn't be part of compute.py? Does it need a recipe wrangle version? Does it need tests?
- compute.score_search_results needs much more tests
- Is mask_original_term being used?
- Do compute.mask_original_term, compute.normalize_alphanum, and compute.partial_ratio need recipe wrangle versions?
- Ensure all new wrangles are in alphabetical order within their respective files.
- compute.score_search_results has a lot of parameters and therefore should be tested with a lot of combinations of these parameters. Also, are all parameters needed? Is there an easier way to condense them or use kwargs for easier expansion in the future? Are the parameters described correctly in the schema?
- Should we add the google-genai package to requirements since it is required for retrieve_link_content?
- What is scripts/test_search.py and what is it doing?
- Do all of the examples in recipe_search_web.wrgl.yml work?
- compute.score_search_results slices the input list in a very specific order. These should be turned into individual parameters.
- score_search_results is outputting empty strings for columns with no results. This causes those rows to then be filtered out and lost with no reason why. Rows marked filtered should only be done so for blacklisted words and nothing falsey should pass through otherwise.
Benefits
- Production worthy, robust PRA
What needs refactoring
PRA needs to be gone through and checked for any issues that might pop up, ways to improve etc since it is currently a minimal viable product (mvp).
Current state
MVP
Proposed changes
More tests to add, and lookover closely for any unused code or general enhancements. The below list is a good starting place, but is neither a definite nor an exhaustive list.
Benefits