Skip to content
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

Replacement for RDFAlchemy? #15

Open
joephayes opened this issue Mar 19, 2020 · 12 comments
Open

Replacement for RDFAlchemy? #15

joephayes opened this issue Mar 19, 2020 · 12 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@joephayes
Copy link
Contributor

The RDFAlchemy project's repo is archived and inactive - https://github.com/gjhiggins/RDFAlchemy and it doesn't look like there is a clear replacement. Perhaps https://github.com/cosminbasca/surfrdf or https://pypi.org/project/Owlready2/ ?

@charbull
Copy link
Collaborator

Hi Joe,

I used RDFLib recently.
Please take a look: https://github.com/RDFLib/rdflib

@joephayes
Copy link
Contributor Author

Great thank you! Are you planning on opening a PR that replaces RDFAlchemy with RDFLib?

@charbull
Copy link
Collaborator

charbull commented Apr 3, 2020

Hi I haven't worked on OLGA to replace it yet.

It is not hard, we need to do the following:

  • create similar files class template: [RDFLIB Class]
  • create similar files class template: [[RDFLIB instance]
    (https://github.com/EcoStruxure/OLGA/blob/master/OLGA/OLGA-Core/src/main/resources/templates/python/rdfalchemy/template_python_instances.ftl)]
  • Update the setup.py
  • Update the Generators to add RDFLib One here

@charbull charbull added enhancement New feature or request help wanted Extra attention is needed labels Jul 20, 2020
@charbull
Copy link
Collaborator

@joephayes is this still of any interest?

@joephayes
Copy link
Contributor Author

@charbull - Yes it is!

@charbull
Copy link
Collaborator

@joephayes I am trying to do some refactoring to make it easier to add this.
Take a look at this PR: #22

@corymosiman12
Copy link

Hi @charbull - I went through and was able to build the Python library. When I go to import specific things, I am thrown the following:

>>> from digitalbuildings.DigitalBuildings.Rdf.Model import EntityType
>>> from digitalbuildings.DigitalBuildings.Rdf.Model import Equipment
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/digitalbuildings/DigitalBuildings/Rdf/Model/Equipment.py", line 5, in <module>
    from digitalbuildings.www.google.com.digitalbuildings._0_0_1.EntityType import EntityType
ImportError: No module named www.google.com.digitalbuildings._0_0_1.EntityType

I'm not positive if this is a related issue or if will get taken care of when upgraded to RDFLib. If so, seems like that is making progress and can wait until then - thanks!

@charbull
Copy link
Collaborator

charbull commented Sep 1, 2020

Hi @corymosiman12, please add -preserve option for the code generation since there are similar class names but different IRI there is a clash.

Thanks

@charbull
Copy link
Collaborator

charbull commented Sep 1, 2020

Had the same error here: #17

Will find some time to fix that.

@corymosiman12
Copy link

ah ok - will do, thanks!

@charbull
Copy link
Collaborator

charbull commented Sep 8, 2020

@corymosiman12 I found a bug and for now fixed manually the code generation for Java.
I put a detailed steps here and the generated source code:https://github.com/google/digitalbuildings/tree/master/ontology/rdf/example

@corymosiman12
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants