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

Alternative ways of removing imports #1185

Open
areleu opened this issue Mar 7, 2024 · 4 comments
Open

Alternative ways of removing imports #1185

areleu opened this issue Mar 7, 2024 · 4 comments

Comments

@areleu
Copy link

areleu commented Mar 7, 2024

So I am looking to ways to work around this error that I face when I try to build an ontolgy in a Gitlab CI pipeline:

org.semanticweb.owlapi.model.UnloadableImportException: Could not load imported ontology: <ontology-iri> Cause: Connection refused
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.

It seems that there is a problem with the configuration of gitlab that does not allow certain applications to make internet requests.

And I came across this suggestion #310 but the problem is that when I try to remove the imports of the ontology, the API tries to import them beforehand.

On one side I could figure a solution for the requests issue in gitlab, but I think is too much effort for something that I do not really need, and other kinds of requests are working.

I also faced this issue and its solution #1150 (comment) and I considered using a similar solution but since I am using a large number of files so it seems to be error prone to me. Unless there is some way in which I can programmatically build a catalog using robot, since I could theoretically wget each of the missing imports and add them to the catalog.

@jamesaoverton
Copy link
Member

Would robot merge --collapse-import-closure true work? http://robot.obolibrary.org/merge

@Eugenio2192
Copy link

Eugenio2192 commented Mar 7, 2024

Would robot merge --collapse-import-closure true work? http://robot.obolibrary.org/merge

Just tried it and got the same outcome, it tries to import everything before merging.
I will hardcode a big catalog for now as a temporary fix, but it gets very large with ontologies having multiple dependencies.

EDIT: This is my home account, the other one I can only get in my work computer.

@jamesaoverton
Copy link
Member

So you do not want to fetch the imports at all? If that's right, you can remove the <owl:import ...> elements from your .owl file, either using Unix tools such as sed or grep -v, or using robot query --update.

@Eugenio2192
Copy link

So you do not want to fetch the imports at all? If that's right, you can remove the <owl:import ...> elements from your .owl file, either using Unix tools such as sed or grep -v, or using robot query --update.

In this particular case I don't want the imports, mainly because I am extracting portions of several ontologies that have a multiple imports. But you are right, I think I will have to rely on such a solution. Feel free to close if you think this is not a very needed feature, thanks!

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

No branches or pull requests

3 participants