onroerenderfgoed / pyramid_skosprovider Goto Github PK
View Code? Open in Web Editor NEWAttach SKOS providers to a pyramid application
Home Page: http://pyramid-skosprovider.readthedocs.org/
License: MIT License
Attach SKOS providers to a pyramid application
Home Page: http://pyramid-skosprovider.readthedocs.org/
License: MIT License
Deploy steps
This repositorty wil be transferred to the OE account.
SortLabel support is required to solve OnroerendErfgoed/atramhasis#362
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
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.
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
The code below should ignore case when matching found concept results with the provided label query param:
https://github.com/koenedaele/pyramid_skosprovider/blob/f51948ade0c2dfa82d42471d6d55cf40d07aa209/pyramid_skosprovider/views.py#L283-L291
Drop support for 3.4, add 3.7.
Part of OnroerendErfgoed/atramhasis#850
Todo:
In skosprovider 0.7.0, a Collection got an extra infer_concept_relations
field.
We should add this field to the renderer.
Add options to search for a match to the API. Possible with skosprovider 0.7.0.
Set caching headers correctly.
@pytest.mark.xfail
def test_get_concepts_language(self):
Pagination through range headers only works for the first range. Other ranges return the correct Content-Range header but contain no data.
https://github.com/koenedaele/pyramid_skosprovider/blob/7dc8dddfd36812944bc888096413ab3ec073a473/pyramid_skosprovider/views.py#L12 blokkeert de upgrade naar pyramid 2.0 in andere projecten. Pyramid 2.0 vereist python>=3.6
Currently, we've only added this for concepts. Would be nice to have for conceptschemes as well.
Currently JSON-LD downloads are supported with an Accept header, but not with a file extension, making it harder to expose them through a web interface as a link.
The code below should ignore case when matching found concept results with the provided label query param:
https://github.com/koenedaele/pyramid_skosprovider/blob/f51948ade0c2dfa82d42471d6d55cf40d07aa209/pyramid_skosprovider/views.py#L283-L291
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
Currently we're not exposing the expand method. Might be helpful to add it as well.
See OnroerendErfgoed/atramhasis#794
We're publishing the context dictionary, but for online consumption this needs to be wrapped in {"@context":...}
When external providers go down, pyramid_skosprovider errors with a HTTP 500 error, while this should actually be a HTTP 502 error.
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.
Springs from OnroerendErfgoed/skosprovider_atramhasis#2.
I think we might need to do 2 things:
/cc @BartSaelen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.