Coder Social home page Coder Social logo

onroerenderfgoed / pyramid_skosprovider Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 7.0 302 KB

Attach SKOS providers to a pyramid application

Home Page: http://pyramid-skosprovider.readthedocs.org/

License: MIT License

Python 100.00%
pyramid python skos thesaurus

pyramid_skosprovider's People

Contributors

bartsaelen avatar cahytinne avatar dependabot[bot] avatar dieuska avatar goessebr avatar koenedaele avatar pyup-bot avatar wim-de-clercq avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyramid_skosprovider's Issues

1.2.0

Deploy steps

  • update version in:
    • setup.py
    • docs/source/conf.py
    • CITATION.cff
  • update date-released in CITATION.cff
  • Distribution
    • python setup.py sdist bdist_wheel

Remove deprecated querying of URI

Since version 0.7.0, So, /uris/urn:x-skosprovider:trees should now be called as /uris?uri=urn:x-skosprovider:trees. The old way has been deprecated for a while. Remove in version 2.0.0

Implement search on all providers

The skosprovider registry allows for searches on more than one provider through the registry.find method. We should expose this one through the REST interface as well as /c.

We would expose the label and type query parameters, but not the collection one (since that would immediately entail that we're searching within a single conceptscheme).

We can also pass in parameters to only query certain schemes. We namespace these with the scheme prefix. We expose scheme.ids to only search on certain ids and scheme.subject for searching all schemes with a certain subject.

return http status 404 when conceptscheme is not found

https://github.com/koenedaele/pyramid_skosprovider/blob/master/pyramid_skosprovider/views.py#L232

This retruns False if the conceptscheme is not found. Which causes the next line to fail with:

File "/Data/Envs/adviezen/lib/python2.7/site-packages/pyramid_skosprovider/views.py", line 233, in get_concept
    concept = provider.get_by_id(concept_id)
AttributeError: 'bool' object has no attribute 'get_by_id'

Resulting in a http status 500 server error. Returning a http 404 would be better here

Pagination error

Pagination through range headers only works for the first range. Other ranges return the correct Content-Range header but contain no data.

Rework searching for a URI

Currently the API for searching where a certain URI is in use is:

GET https://pyramid.skosprovider.be/uris/urn:x-skosprovider:1

This cause problems with apache servers, when we're looking for a URI of type https://id.erfgoed.net/processen/1. The double slash gets replaced by a single one and the skosprovider can't find find the URI anymore.

Might be better to add the URI as a query parameter and no longer as a path segment.

/cc @BartSaelen @claeyswo

Create an endpoint for URI lookups

Currently, it's not possible to lookup a URI, eg. http://vocab.getty.edu/aat/300007391 from the client side without doing a lot of client side processing ang guessing.

It should be possible to hit /uris/. If a certain URI is know internally, a redirect to that URI follows, eg. to /conceptschemes/schemex/c/concepty.

Allow client to choose language

Springs from OnroerendErfgoed/skosprovider_atramhasis#2.

I think we might need to do 2 things:

/cc @BartSaelen

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.