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

making sure that Github is not accessed #188

Closed
eroux opened this issue Jun 20, 2020 · 9 comments
Closed

making sure that Github is not accessed #188

eroux opened this issue Jun 20, 2020 · 9 comments
Assignees

Comments

@eroux
Copy link
Contributor

eroux commented Jun 20, 2020

Looking at some logs, it seems that when we load the local ont-policy.rdf, it still reads the rest of the files on github instead of the local version, we need to check that and fix if necessary

@MarcAgate
Copy link
Collaborator

@xristy In the ontology specs of all ontPolicy.rdf files, could you remove all the allUrl tags that point to a github raw file url? This way we make sure that the ontDocumentManager is really picking up the local repo files. I can do it if you are too busy.

@eroux
Copy link
Contributor Author

eroux commented Jun 22, 2020

I don't think it's a good solution, it's still quite interesting to allow softwares like TopQuandrant to get the whole ontology using just one URI... Perhaps there might be a way to ask the ontmanager to prefer local files to distant ones? @xristy if no such thing exists, perhaps it would be worth reporting an issue?

@MarcAgate
Copy link
Collaborator

ok, I'll look at it, meanwhile, I am going to create another ontPolicy.rdf for testing. I still have to validate that files are still downloaded from github.

@eroux
Copy link
Contributor Author

eroux commented Jun 22, 2020

Ok thanks! I think it's apparent in the DEBUG logs

@eroux
Copy link
Contributor Author

eroux commented Jun 22, 2020

or maybe an alternative would be to have a ont-policy-local.rdf on github with only references to local files?

@MarcAgate
Copy link
Collaborator

MarcAgate commented Jun 22, 2020

Ok, I am going to do this: ont-policy-local.rdf without "raw" urls, at least for testing, something that we will remove later on.

@xristy
Copy link
Contributor

xristy commented Jun 22, 2020

One possibility might be to make use of path in the OntDocumentManager constructor.

The path could be like:

"/path/to/local/ont-policy.rdf;https://raw.githubusercontent.com/buda-base/editor-templates/master/ont-policy.rdf"

and omit the local policy file for production outside of China.

The path is not limited to just 2 elements.

@xristy
Copy link
Contributor

xristy commented Jun 22, 2020

Looking further, only a single altURL per OntologySpec is used so the current ont-policy.rdf in owl-schema and editor-templates should be actually two different files as has been mentioned above one would be ont-policy-local.rdf and the other would be ont-policy.rdf.

Then on the China server or a development server there would be a configuration item indicating a URI for the appropriate policy file. Master copies of the two files will be in github for both owl-schema and editor-templates.

The ont-policy.rdf defines an xml entity

<!ENTITY git     'https://raw.githubusercontent.com/buda-base/'>

The ont-policy-local.rdf defines an xml entity

<!ENTITY local   'file:///Users/chris/git/'>

So the above definition needs to be changed depending on where directory is located in the local filesystem.

The altURL are defined using the entities as:

<altURL    rdf:resource="&git;owl-schema/master/ext/user/budauser.ttl"/>

or

<altURL    rdf:resource="&local;owl-schema/ext/user/budauser.ttl"/>

See commits 3f7a5ff and 36c18ee.

Hopefully this helps.

@xristy
Copy link
Contributor

xristy commented Jun 24, 2020

Closing since addressed in owl-schema #169

@xristy xristy closed this as completed Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants