-
Notifications
You must be signed in to change notification settings - Fork 30
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
Clean Up TermController Logic #137
Comments
Part of the complication seems to be that various authorities don't bother to raise Several authorities fail miserably when altered to inherit from |
@no-reply This was part of the original implementation where you could define your own authority as a constant like I'm only vaguely familiar with the factory pattern, but if that can enforce the creation of new authorities, then I'm 👍 . The process of extending Feel free to ping me on any PRs or commits and I'll offer what feedback I can. Otherwise, I think any changes you're proposing regarding shoring up the API and codebase would be most welcome. |
Authority registration is a hard coded constantize within this namespace. Pending work on a registry, this aliases `Qa::LDF::Authority` classes to the namespace to expose them to Questioning Authority. See: samvera/questioning_authority#137
MESH ids are in lowercase. Since query is case sensitive, we need to downcase query terms in order to prevent false negatives based on typist idiosyncracies. Since it's not possible to redirect authorities in `Qa` due to the `TermsController` behavior (samvera/questioning_authority#137), we simply monkeypatch the existing `Qa::Authorities::Mesh` class.
MESH ids are in lowercase. Since query is case sensitive, we need to downcase query terms in order to prevent false negatives based on typist idiosyncracies. Since it's not possible to redirect authorities in `Qa` due to the `TermsController` behavior (samvera/questioning_authority#137), we simply monkeypatch the existing `Qa::Authorities::Mesh` class.
MESH ids are in lowercase. Since query is case sensitive, we need to downcase query terms in order to prevent false negatives based on typist idiosyncracies. Since it's not possible to redirect authorities in `Qa` due to the `TermsController` behavior (samvera/questioning_authority#137), we simply monkeypatch the existing `Qa::Authorities::Mesh` class. Closes #244.
I am not expecting this to be fixed in the next release of QA. I am leaving open in case we want to revisit this later. |
TermController has a bunch of logic for building authorities based on a largely undocumented namespacing pattern: https://github.com/projecthydra-labs/questioning_authority/blob/master/app/controllers/qa/terms_controller.rb#L35-L64
I haven't been able to completely make sense of everything that goes on here, a lot seems pinned to obscure specifics of various authority impls. We should replace the whole thing with a factory method an authority factory method and some kind of registry. I think it should be possible to accomplish this without breaking changes.
I have a branch that starts to work on this which fails a bunch of tests if you start to register authorities, various things break for reasons that are hard to pin down: https://github.com/projecthydra-labs/questioning_authority/tree/authority-factory
The text was updated successfully, but these errors were encountered: