-
Notifications
You must be signed in to change notification settings - Fork 0
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
sphinxcontrib-jsonschema extension is not working #4
Comments
@Bjwebb Can I ask if you have any pointers on this? I installed sphinxcontrib-jsonschema via pip and get:
|
My notes: openownership/data-standard@76a9eb4 is the commit where these directives was introduced but I can't see anything about including libraries here. |
We have a custom version of sphinxcontrib-jsonschema, have you got that installed? https://github.com/openownership/data-standard/blob/60-refactor-docs/requirements.txt#L7 |
Nope, I was using pip! Thanks, I will check that out. |
BTW, that file can be installed with pip with |
The instructions at https://github.com/openownership/data-standard/tree/60-refactor-docs#build-the-docs-locally might also be useful for getting set up. |
Fixed that error by installing lib directly. (I should maybe look at using requirements.txt for this project generally.) I now have another error:
That does seem to be in the file correctly. I will try and work out what is going on in a day or two. |
This is broken because! When @Bjwebb added the directives the data files did not have any external references |
Ok, so this commit OpenDataServices/sphinxcontrib-opendataservices-jsonschema@b7332e8 adds the placeholder class that doesn't allow any loading. If I reverse the commit, it will now .... let us move on to the next problem! 🎉 I don't think the https://pypi.org/project/jsonref/ library supports external refs the way we use them. See https://github.com/gazpachoking/jsonref/blob/master/jsonref.py#L295 If it's http/https and a requests lib is installed, load using requests! That's great. If it's not -- load using urllib.request.urlopen ... which also expects a URI. In other words, just passing "components.json" does not work! If you go through the source file and replace any "components.json" with "https://raw.githubusercontent.com/openownership/data-standard/60-refactor-docs/schema/components.json" or "file:///vagrant/data-standard/schema/components.json" that bypasses this issue! 🎉 And we move on to .... another issue! 😢 I haven't yet looked at that issue properly yet, I'm just noting this issue before I move on so I don't forget it all and run away and join the circus. 🤡 |
Ok, final problem is simply that i think
has now been broken by the splitting into separate JSON files - beneficial-ownership-statement.json has no definitions object. So, to list the things that I think need fixing:
and then finally,
Yup, the circus definitely looks tempting 🎪 😛 |
Oh wait, it does! But you have pass base_uri! gazpachoking/jsonref#8 (comment) |
So progress has been made on this! OpenDataServices/sphinxcontrib-opendataservices-jsonschema#8 has been opened to discuss the changes needed there. About to do a commit so that the vagrant box will use the version of the library that is in the P.R. Then, what is left to do:
|
When it is working, all csv-table directives need to be changed to this.
The text was updated successfully, but these errors were encountered: