-
Notifications
You must be signed in to change notification settings - Fork 28
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
Implement recast service #44
Conversation
@whikloj Just a guess from Travis's output, but maybe try generating a composer.json using PHP 5.6? #42 (comment) |
@dannylamb This should "work" now, but the Gemini and Recast tests will fail as they rely on the Crayfish-Commons PR. So once that is merged, then these tests could be restarted. |
Ran the script and getting an exception thrown. The service is not being registered.
|
@whikloj can you hit the button on this one? i'd like to test this out. |
i am resisting the urge to hit it myself and am trying not to implicate myself in the pull 😁 |
@dannylamb so in the Crayfish Couple changes to match up with the changes in Crayfish but this still works, though for those things not in Gemini I can't do anything so we might want to consider whether more things should be mapped using it. |
well this has become completely screwed. I'll see if I can get all the pieces together again, but don't bother trying this one. |
Move Milliner to use GeminiClient in Crayfish-Commons
Codecov Report
@@ Coverage Diff @@
## master #44 +/- ##
==========================================
- Coverage 100% 97.1% -2.9%
- Complexity 122 140 +18
==========================================
Files 9 9
Lines 570 621 +51
==========================================
+ Hits 570 603 +33
- Misses 0 18 +18
Continue to review full report at Codecov.
|
@dannylamb Codecov is kicking me for boosting it to 100% previously 🤦♂️ but otherwise this is good. I updated the testing instructions above. |
You flew too close to the 🌞 @whikloj I can give this a whirl then 👍 |
@whikloj Both add and replace work out just fine. JSONLD looks good:
But turtle is re-writing namespaces to ns01, ns02, etc... Since it's the default return format, it'd be nice to sort that out. EasyRDF is always a pain in the arse, but I'm guessing you could stash the namespaces from what you receive and re-use them when serializing out. If that turns out to be an ordeal we can spool off another ticket, because what you have works just fine with jsonld. |
@dannylamb could we put this in and then I'll work on the serialization issue after. Just to get this in and available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, Let's do this 🚀
GitHub Issue: Islandora/documentation/issues/800
Depends on: Islandora/Crayfish-Commons#16
What does this Pull Request do?
This PR implements a new API-X extension service inside of Crayfish. The service binds to resources of rdf:type ldp:RdfSource and rewrites the request to add Fedora URIs for Drupal URIs it finds in the Gemini DB.
What's new?
/by_uri
endpoint with a getByUri function which uses the above search.svc:recast
uri via API-XHow should this be tested?
As API-X with Fedora 5 is still broken these are new testing instructions.
Pull down a claw-playbook (or delete the contents of your
roles/external
directory on an existing one) and edit the requirements.yml to make the following change:Then
vagrant up
Once done you should have a completely functioning Claw instance.
Create a new repository object as a collection, then create a new repository object (as whatever) and make it part of the first collection.
Find this second object's Fedora URL. I normally just dig through all the URIs in Fedora but you can also look in the Gemini DB if you want.
Once you have your Fedora URI
Then using that URI as your
Apix-Ldp-Resource
call the Recast service and note the change in thememberOf
predicate values.http://localhost:8000/recast/
calls the default action ofadd
and is the same as callinghttp://localhost:8000/recast/add
. Tryhttp://localhost:8000/recast/replace
to remove the corresponding Drupal urisAdditional Notes:
Interested parties
@Islandora-CLAW/committers