Skip to content
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

Refactor Search.py #26

Open
Nihilate opened this issue Aug 27, 2018 · 0 comments
Open

Refactor Search.py #26

Nihilate opened this issue Aug 27, 2018 · 0 comments

Comments

@Nihilate
Copy link
Owner

Search.py is a bit of a mess in terms of testability, readability, extendability and code reuse.

Goals:

  • Split it up so that it only does what it should do (return search results) instead of returning formatted comments
  • Move the common "search web" algorithm into a single function instead of replicating it everywhere
  • Improve the "search web" algorithm so that it actually loops through all possibilities (might want search results cached before attempting this to avoid blasting the database sites too much)
  • Find a way to make the algorithm make more sense (maybe it just needs to rely on better documentation)
  • Unit test the shit out of it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant