Giter Club home page Giter Club logo

questioning_authority's People

Contributors

afred avatar amsterdamos avatar andjsmit avatar awead avatar barmintor avatar bess avatar bkeese avatar botimer avatar carolyncole avatar cbeer avatar cjcolvar avatar conorsheehan1 avatar dbrower avatar eddierubeiz avatar elrayle avatar hackartisan avatar jcoyne avatar jeremyf avatar jrgriffiniii avatar jrochkind avatar mbklein avatar mikeapp avatar mjgiarlo avatar mstroming avatar randalldfloyd avatar revgum avatar rotated8 avatar scande3 avatar tpendragon avatar tworrall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

questioning_authority's Issues

More informative errors

We can render errors, even in JSON:

render :json => { :errors => @authority.errors.full_messages }, :status => 422

Refactor app as an engine

Currently, this is just a plain Rails application. It needs to be restructured as an engine plugin so folks can include it in their existing rails apps.

Drop Ruby 1.9 support?

The spec tests currently fail under Ruby 1.9 with some seg. faults and other nasty errors. We could chase them down and see about fixing them, or take the easy way out and just drop support for Ruby 1.9.

We can then focus on testing against forthcoming versions such as 2.1.0 and 2.1.1.

Add "describe" action / route

When called at the root level (i.e., without a vocab), it should return a list of authorities and sub-authorities (where applicable).
When called for a particular vocab, it should return a description of the authority if available and a list of sub-authorities of that authority (if any).
When called for a vocab and sub-authority, it should return a description of the sub-authority (if any).

simplify Getty queries

Hi! We developed & maintain the Getty endpoint, and luc:term should only include terms (which includes pref & altLabels, minus any " (qualifier)". You can see the props that are navigated to collect FTS text here: http://vocab.getty.edu/doc/#FTS_Insert_Queries.

You write "The full text index matches on fields besides the term, so we filter to ensure the match is in the term" and do a REGEX on pref|altLabel, and then DISTINCT since there are multiple altLabels. This query is quite complex and a bit more expensive than it needs to be.

If you provide some testing examples, we'll fix the problem "matches on fields besides the term".

For AAT, you seem to want prefLabel only. I wrote in the support forum "I think that if we make an index by prefLabels only, that would resolve most problems. But is this what you need? Eg it won't find "frostbiting" aka "frostbite boating".
If you want an extra index by prefLabel only, let me know (but it'll also have more languages than EN)

Return objects instead of JSON?

This may be a bigger question than we want to try to tackle this week but I'm wondering if it would make the app/engine more versatile if our Authorities returned the actual objects (e.g., arrays, hashes) rather than json. The consumer could then convert them to json if that's the format they needed. Or perhaps a "format" parameter could be used to specify "json" or "raw"(?), with one or the other being the default if "format" wasn't specified. Thoughts on this? Worth considering?

Release 0.6.0 breaks LoC functionality?

Unsure of which exact change is causing this issue but having to version my code to use the 0.5.0 release to avoid the below. Perhaps there was an API change that isn't documented? (It doesn't look like the CHANGELOG was ever updated for the 0.6.0 release).

In 0.5.0, doing:
authority_check = Qa::Authorities::Loc.subauthority_for('relators')
authority_result = authority_check.search(URI.escape('Photographer'))

Returns:
[{"id"=>"info:lc/vocabulary/relators/pht", "label"=>"Photographer"}]

Meanwhile, in 0.6.0, that same code of:
authority_check = Qa::Authorities::Loc.subauthority_for('relators')
authority_result = authority_check.search(URI.escape('Photographer'))

Returns:
[{"id"=>"info:lc/vocabulary/relators/cst", "label"=>"Costume designer"}, {"id"=>"info:lc/vocabulary/relators/clr", "label"=>"Colorist"}, {"id"=>"info:lc/vocabulary/relators/scl", "label"=>"Sculptor"}, {"id"=>"info:lc/vocabulary/relators/prs", "label"=>"Production designer"}, {"id"=>"info:lc/vocabulary/relators/dis", "label"=>"Dissertant"}, {"id"=>"info:lc/vocabulary/relators/arr", "label"=>"Arranger"}, {"id"=>"info:lc/vocabulary/relators/wdc", "label"=>"Woodcutter"}, {"id"=>"info:lc/vocabulary/relators/cre", "label"=>"Creator"}, {"id"=>"info:lc/vocabulary/relators/act", "label"=>"Actor"}, {"id"=>"info:lc/vocabulary/relators/cas", "label"=>"Caster"}, {"id"=>"info:lc/vocabulary/relators/pop", "label"=>"Printer of plates"}, {"id"=>"info:lc/vocabulary/relators/res", "label"=>"Researcher"}, {"id"=>"info:lc/vocabulary/relators/len", "label"=>"Lender"}, {"id"=>"info:lc/vocabulary/relators/clt", "label"=>"Collotyper"}, {"id"=>"info:lc/vocabulary/relators/rpt", "label"=>"Reporter"}, {"id"=>"info:lc/vocabulary/relators/elg", "label"=>"Electrician"}, {"id"=>"info:lc/vocabulary/relators/mdc", "label"=>"Metadata contact"}, {"id"=>"info:lc/vocabulary/relators/rdd", "label"=>"Radio director"}, {"id"=>"info:lc/vocabulary/relators/bnd", "label"=>"Binder"}, {"id"=>"info:lc/vocabulary/relators/art", "label"=>"Artist"}]

Of note, while I get a response, there is no "Photographer" role returned.

Any help would be appreciated as to why the above code works differently in 0.5.0 compared to 0.6.0. Thanks!

Extraneous routes

The application has more routes than it needs. The /terms/:id routes should be removed. Maybe others.

$ rake routes
Prefix Verb   URI Pattern                             Controller#Action
          GET    /search/:vocab(.:format)                terms#search
          GET    /search/:vocab/:sub_authority(.:format) terms#search
          GET    /terms/:vocab(.:format)                 terms#index
          GET    /terms/:vocab/:sub_authority(.:format)  terms#index
    terms GET    /terms(.:format)                        terms#index
          POST   /terms(.:format)                        terms#create
 new_term GET    /terms/new(.:format)                    terms#new
edit_term GET    /terms/:id/edit(.:format)               terms#edit
     term GET    /terms/:id(.:format)                    terms#show
          PATCH  /terms/:id(.:format)                    terms#update
          PUT    /terms/:id(.:format)                    terms#update
          DELETE /terms/:id(.:format)                    terms#destroy

Application Crashes when performing queries

[moved from README.md file]

Some users have reported errors resulting from the curb gem. When performing queries, the application will crash with the error:

Trace/BPT trap: 5

The solution is to install the curb gem from the master branch on Github. To do this, add the following line to the Gemfile of your
application:

gem 'curb', github: 'taf2/curb'

Rails 3 compatablity

Not sure why this was described by the original group that evaluated Questioning Authority but it was identified and not done.

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

More informative errors

We can render errors, even in JSON:

render :json => { :errors => @authority.errors.full_messages }, :status => 422

Remove requirement of query parameter

TermController currently requires a query parameter (q) to be present (i.e., have a value). Remove this requirement so that its absence signals that all terms in the vocabulary (and sub_authority, if pertinent) are returned.

Change list query to have the following spec

each term in the list is a hash that conforms to the following specification:

  • It must have an ID
  • It must have a label
  • It may have additional fields, such as URI, and authority name.

Travis-CI build failing, but working locally

On Travis-CI, the build failed with Ruby 1.9.3 but worked with 2.0. Locally, it works with 1.9.3. I think there might be some weird things going on with WebMock as I did see some issues with tests failing locally but had difficulty replicating.

Remove LCSH authority

The LCSH authority is a bit misleading because it's searching all the LOC authorities and not just subject headings. It's functionality is also covered by the subjects sub-authority under the LOC class.

Removing the LCSH class would clear up the confusion. If we need to retain the original functionality of the LCSH class, then we can add another option to Loc that uses the same url in the current LCSH class.

LOC bug when using "--"

Setup / Expected

The documentation gives the following example:

/qa/search/loc/subjects?q=History--

QA then presents this data to you in JSON format:

[
    {"id":"info:lc/authorities/subjects/sh2008121753","label":"History--Philosophy--History--20th century"},
    {"id":"info:lc/authorities/subjects/sh2008121752","label":"History--Philosophy--History--19th century"},
    etc...
]

Actual

The data actually returned is more like the following

[
    {"id":"info:lc/authorities/subjects/sh85111862","label":"Reconstruction (U.S. history, 1865-1877)"},
    {"id":"info:lc/authorities/subjects/sh85061255","label":"History publishing"},
    etc...
    {"id":"info:lc/authorities/subjects/sh85068444","label":"Islamic Empire"},
]

The Issue

A "--" does not seem to be processed correctly. For example, searching for "History Philosophy" will return results more like the first example. As is, about half of the results currently do not contain the word "history" nor any "--". I have no yet done appropriate research into details of this behavior besides noticing it during recent testing.

Qa::Authorities::Local needs a results method

Added config/authorities/countries.yml,

If want to retrieve a complete list:
http://localhost:3000/qa/terms/local/countries

I got the following error:

Started GET "/qa/terms/local/countries" for 127.0.0.1 at 2014-06-10 16:20:29 -0700
(developer) Callback phase initiated.
Processing by Qa::TermsController#index as HTML
Parameters: {"vocab"=>"local", "sub_authority"=>"countries"}
Completed 500 Internal Server Error in 1ms

NoMethodError (undefined method `results' for #Qa::Authorities::Local:0x007fe1289b8848)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.