Closed Bjwebb closed 6 years ago
Places we have copies of our Sphinx directives:
extensions = ['sphinxcontrib.jsonschema', 'ocds_sphinx_directives']
JSONInclude
- including javascript to change how jsoninclude is displayedAutoStructifyLowPriority
extensions = ['sphinxcontrib.jsonschema', 'ocds_sphinx_directives']
JSONInclude
JSONIncludeFlat
ExtensionList
ExtensionTable
ExtensionSelectorTable
CSVTableNoTranslate
JSONSchemaDirective
(extended)JSONSchemaFieldsDirective
(extended)DirectoryListDirective
JSONInclude
extensions = ['sphinxcontrib.openapi']
JSONTableSchemaInclude
JSONSchemaDirective
(extended)extensions = ['sphinxcontrib.jsonschema']
JSONInclude
I propose we move to this repository:
AutoStructifyLowPriority
JSONInclude
JSONIncludeFlat
CSVTableNoTranslate
DirectoryListDirective
JSONSchemaDirective
(different for 360Giving and OpenReferral) and JSONSchemaFieldsDirective
, which are all modified copies of sphinxcontrib.jsonschema.JSONSchemaDirective
Leave in ocds_sphinx_directives, because they're very specific to the way OCDS does extensions, but we should add a link to the repository in our docs:
ExtensionList
ExtensionTable
ExtensionSelectorTable
Leave in openreferral specification conf.py, because its specific to JSON Schema table, which we're not likely to use elsewhere (and may move away from in the openreferral docs). We should add a mention to the docs though.
JSONTableSchemaInclude
Handling duplicates:
AutoStructifyLowPriority
JSONIncludeFlat
CSVTableNoTranslate
DirectoryListDirective
Differences:
I think the best way to combine these is to start with the ppps version, change the formatting of that so it passes flake8 tests*, and then add the extra container node as in https://github.com/open-contracting/standard/commit/520afec26ad3afc7164283df8bfe1af78c6e695d.
* and also add flake8 as a Travis test.
These are very deliberate extensions of sphinxcontrib.jsonschema.JSONSchemaDirective
, which initially I won't merge, but instead rename to more clearly differentiate them. These could possibly stay in their separate repositories, but I think by bringing them together it gives a better overview of what's possible next time someone needs to do something similar.
Still to move:
I've now made PRs to remove the code from the original repos:
and then include this as a sphinx extension everywhere that we use them.