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
first version of RDF conversion #337
Conversation
Thanks a lot, @LoesvdBiggelaar! @nilskre could you do a first pass on this? |
Let me know if and what I should update the code based on the feedback! |
Thanks a lot for the PR @LoesvdBiggelaar |
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.
Great work so far! Thanks a lot.
One question: How do you debug the generated RDF files? Do you load them in e.g. Protege to visualize them?
I have added some code-specific comments in the review and am happy to hear your opinion about them.
Some general comments:
- At the moment the tests are failing. Before merging they need to pass.
- It would be great to have a docs page describing how to use the RDF output adapter (similar to the neo4j output docs.
- Not sure, if you already have used the pre-commit hooks
If there are any questions don't hesitate to ask.
test/write/graph/test_rdf.py
Outdated
|
||
# check if the number of nodes and relations are correct | ||
assert len(set(g.subjects())) == 15 # generated 4 nodes per type (8 in total) and 4 'edges'. together with the class definition (+3) makes 15 in total | ||
assert len(set(g.subject_objects())) == 47 # all the triples; between nodes, but also the converted properties of nodes and the 'edges'. |
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.
Good initial test (also for debugging/reviewing quite helpful :)
Furthermore, I would expect, that the content of the rdf Graph is tested in detail (id, name, properties, ...).
Thanks for the feedback! I'll process them |
regarding the tests, only the test/test_integration.py is failing. However, I don't think I changed anything there. Could someone explain what that test is actually testing and how I influenced this test with the RDF code? |
Hi Loes, |
I cannot find anywere a button I noticed that this pull request only exists in biocypher/biocypher and not on thehyve/biocypher. maybe that has something to do with it? |
I can't see your version of the PR, but the button/checkbox should be there. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork# Not completely sure if you can activate it only when you create the PR though... it would definitely be very helpful if we could commit to the PR directly. |
We were probably investigating this at the same time @slobentanzer . |
Yes, we did. :) Should we just merge this PR into the |
I am working on a bit of documentation still. so could we merge this PR when that commit is also added? |
Sure, I'll do it when you give me the go. :) |
Done! we can merge |
I build upon the pull request of @supermaxiste.
the output will now
what still should/could be improved: