Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added create_database() and remove_database() methods. #39

Merged
merged 5 commits into from
Nov 28, 2022

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Nov 20, 2022

Closes #34
Closes #38

Add support for backends that supports multiple databases, like stardog and graphdb

@jesper-friis jesper-friis linked an issue Nov 20, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2022

Codecov Report

Base: 73.57% // Head: 73.10% // Decreases project coverage by -0.47% ⚠️

Coverage data is based on head (355eb28) compared to base (95f1d4c).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   73.57%   73.10%   -0.48%     
==========================================
  Files          10       10              
  Lines         598      621      +23     
==========================================
+ Hits          440      454      +14     
- Misses        158      167       +9     
Impacted Files Coverage Δ
tripper/backends/ontopy.py 37.93% <ø> (ø)
tripper/backends/rdflib.py 96.55% <ø> (ø)
tripper/triplestore.py 77.77% <66.66%> (-1.93%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@CasperWA CasperWA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to come up with a better way of updating/changing the initialization interface for the backends. Adding an unused parameter to all of them whenever one changes seems extremely inefficient.

Copy link

@xAlessandroC xAlessandroC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, the changes are fine. Since I still have to start the integration with OntoREC, do you need more proper code testing for the final merge of these features?

I also share Casper's point, maybe this approach won't scale in the future.

@jesper-friis
Copy link
Contributor Author

To me, the changes are fine. Since I still have to start the integration with OntoREC, do you need more proper code testing for the final merge of these features?

I also share Casper's point, maybe this approach won't scale in the future.

OK, I removed the explicit explicit database argument from Triplestore.init()

@CasperWA
Copy link
Contributor

To me, the changes are fine. Since I still have to start the integration with OntoREC, do you need more proper code testing for the final merge of these features?
I also share Casper's point, maybe this approach won't scale in the future.

OK, I removed the explicit explicit database argument from Triplestore.init()

I don't think this was the point. The point was to design a replacement interface and procedure of handling this. This issue is not one that is to be solved in this PR, but rather a new issue should be opened and this interface and procedure should be updated in another PR.

@jesper-friis
Copy link
Contributor Author

I don't think this was the point. The point was to design a replacement interface and procedure of handling this. This issue is not one that is to be solved in this PR, but rather a new issue should be opened and this interface and procedure should be updated in another PR.

This PR provides a common API for backends with multiple databases. It does not require anything change in code in backends that doesn't support multiple databases.

@CasperWA CasperWA enabled auto-merge (squash) November 28, 2022 07:59
@CasperWA CasperWA merged commit f51b605 into main Nov 28, 2022
@CasperWA CasperWA deleted the 34-database_support branch November 28, 2022 08:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
4 participants