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

Misplaced if statement causes entities to be incorrectly inferred to be DataProperties #1105

Closed
matentzn opened this issue Mar 28, 2023 · 8 comments
Labels

Comments

@matentzn
Copy link
Contributor

matentzn commented Mar 28, 2023

I have debugged this until #1104; But I am not familiar enough with the template code to fix this. It seems this was only recently introduced.

Basically, when running robot template (failing test introduced in #1104), at some point the ManchesterSyntaxParser checks if an entity it encounters is a DataProperty. The if statement then asserts this (if its false), thereby causing a previously untyped entity to become a DataProperty.

EDIT: I dont understand the bug very well - more investigation is needed. This seems only to happen when the entity in question does not have a known type.

@jamesaoverton
Copy link
Member

Do you have a line number?

@Clare72
Copy link

Clare72 commented Jan 30, 2024

+1 on getting this fixed please, it is also causing me problems
I find that object properties become data properties in the output and classes become datatypes
It is possible to workaround by using --ancestors (if your entities are present in --input), but this duplicates some information into the new ontology, and this may go out of date if you plan to have the new ontology as an import (which I do).
It is also possible to workaround by adding all entities to the template and setting the TYPE to what you want, but this is pretty annoying if you have a lot of entities.

@matentzn matentzn removed their assignment Mar 10, 2024
@matentzn
Copy link
Contributor Author

This is (Java-wise) a bit beyond me unfortunately.. @Clare72 would it be justifiable for @gouttegd to deal with this as part of his FlyBase work plan? Just checking, because otherwise I fear this really annoying bug is just staying around for a long time..

@gouttegd
Copy link
Contributor

gouttegd commented Mar 10, 2024

:D Since when do you worry that the work I do for our tooling must be “justifiable as part of my FlyBase work plan”? That horse left the barn at about the moment I pushed my second contribution to the ODK…

But if you want me to tackle this one though, you’ll have to do a better job of describing what the problem is. Directly pointing to a ”misplaced if statement” is not helpful. Do you have a test case?

What is this ”failing test introduced in #1104” you are talking about? There is currently no failing tests – not in the master branch anyway.

@jamesaoverton
Copy link
Member

jamesaoverton commented Mar 10, 2024

I’m pretty sure this one was fixed by #1104, and just needs to be released.

@jamesaoverton
Copy link
Member

(“Failing test …” was the original title of #1104, which I changed once I’d figured out the problem.)

@matentzn
Copy link
Contributor Author

I think I have not.. had my coffee yet. Now its coming all back to me, and yes, this is actually solving the problem.

Closing this issue here. Sorry for the noise, and thanks for chipping in so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants