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

Remove request handler factories #511

Merged
merged 2 commits into from
Nov 13, 2020

Conversation

lonvia
Copy link
Collaborator

@lonvia lonvia commented Nov 12, 2020

There really is not much point in having flexible Request classes for the different endpoints. In fact, reverse had only one implementation of its abstract Request class and the two instances of PhotonRequest were duplicating each other. This PR slim-lines the code around the Request classes, removes the RequestHandlerFactories and gets rid of a couple of tests which were effectively testing only assignments but causing a lot of trouble for refactoring. I'll readd more meaningful tests in follow-up PRs.

Unify FilteredPhotonRequest and PhotonRequest and get rid of the factory
methods for them. We can also get rid of a couple of generalisations
in the search request because of that. Move parsing of filter
expressions into PhotonRequest and add proper tests for the parser.

Remove the *RequestHandlerTests that only check for setting of internal
variables.

Remove unused ElasticsearchSearcherFactory.
Merge ReverseRequest classes into a single class and get rid of the
factory, which only ever returned the same object.
@lonvia lonvia merged commit 2d29fbc into komoot:master Nov 13, 2020
@lonvia lonvia deleted the simplify-photon-request branch November 13, 2020 10:42
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.

1 participant