diff --git a/docs/guidance/publication.md b/docs/guidance/publication.md index ff9885f..0f217ba 100644 --- a/docs/guidance/publication.md +++ b/docs/guidance/publication.md @@ -137,7 +137,7 @@ libcoveofds jsontogeojson network-package.json nodes.geojson spans.geojson To convert data to CSV format: - [Install Flatten Tool](https://flatten-tool.readthedocs.io/en/latest/getting-started/#getting-started) -- Download the [network schema](../../schema/network-schema.json) +- Download the [network schema](../_readthedocs/html/network-schema.json) - If your data is a [JSON Lines file](../reference/publication_formats/json.md#streaming-option), segment it into appropriately sized [network packages](../reference/publication_formats/json.md#small-files-and-api-responses-option) - Run the following command for each network package: diff --git a/docs/primer/scopeandkeyconcepts.md b/docs/primer/scopeandkeyconcepts.md index ab8f493..a383767 100644 --- a/docs/primer/scopeandkeyconcepts.md +++ b/docs/primer/scopeandkeyconcepts.md @@ -62,7 +62,7 @@ In a fully integrated model, one actor takes on all three roles, whilst in open OFDS defines a network as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /description ``` @@ -72,7 +72,7 @@ OFDS defines a network as: OFDS defines a node as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Node/description ``` @@ -84,7 +84,7 @@ For more information about nodes, see the [Node reference](../reference/schema.m OFDS defines a span as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Span/description ``` diff --git a/docs/reference/identifiers.md b/docs/reference/identifiers.md index b2246ad..2385aa7 100644 --- a/docs/reference/identifiers.md +++ b/docs/reference/identifiers.md @@ -33,7 +33,7 @@ To ensure that an organisation's `.identifier` is globally unique, it has two co :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Organisation :include: identifier/scheme,identifier/id ``` diff --git a/docs/reference/publication_formats/csv.md b/docs/reference/publication_formats/csv.md index 5148bee..3063a5e 100644 --- a/docs/reference/publication_formats/csv.md +++ b/docs/reference/publication_formats/csv.md @@ -90,7 +90,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/networks.csv) or a [blank template](../../../examples/csv/template/networks.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,name,website,publisher,publicationDate,collectionDate,crs,accuracy,accuracyDetails,language :nocrossref: ``` @@ -105,7 +105,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/nodes.csv) or a [blank template](../../../examples/csv/template/nodes.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,nodes/0/id,nodes/0/name,nodes/0/phase,nodes/0/status,nodes/0/location,nodes/0/address,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider :collapse: nodes/0/location :nocrossref: @@ -119,7 +119,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/nodes_internationalConnections.csv) or a [blank template](../../../examples/csv/template/nodes_internationalConnections.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,nodes/0/id,nodes/0/internationalConnections/0/streetAddress,nodes/0/internationalConnections/0/locality,nodes/0/internationalConnections/0/region,nodes/0/internationalConnections/0/postalCode,nodes/0/internationalConnections/0/country :nocrossref: ``` @@ -132,7 +132,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/nodes_networkProviders.csv) or a [blank template](../../../examples/csv/template/nodes_networkProviders.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,nodes/0/id,nodes/0/networkProviders/0/id,nodes/0/networkProviders/0/name :nocrossref: ``` @@ -146,7 +146,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/spans.csv) or a [blank template](../../../examples/csv/template/spans.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,spans/0/id,spans/0/name,spans/0/phase,spans/0/status,spans/0/readyForServiceDate,spans/0/start,spans/0/end,spans/0/directed,spans/0/route,spans/0/physicalInfrastructureProvider,spans/0/supplier,spans/0/transmissionMedium,spans/0/deployment,spans/0/deploymentDetails,spans/0/darkFibre,spans/0/fibreType,spans/0/fibreTypeDetails,spans/0/fibreCount,spans/0/fibreLength,spans/0/technologies,spans/0/capacity,spans/0/capacityDetails,spans/0/countries :collapse: spans/0/route :nocrossref: @@ -160,7 +160,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/spans_networkProviders.csv) or a [blank template](../../../examples/csv/template/spans_networkProviders.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,spans/0/id,spans/0/networkProviders/0/id,spans/0/networkProviders/0/name :nocrossref: ``` @@ -174,7 +174,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/phases.csv) or a [blank template](../../../examples/csv/template/phases.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,phases/0/id,phases/0/name,phases/0/description :nocrossref: ``` @@ -187,7 +187,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/phases_funders.csv) or a [blank template](../../../examples/csv/template/phases_funders.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,phases/0/id,phases/0/funders/0/id,phases/0/funders/0/name :nocrossref: ``` @@ -200,7 +200,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/organisations.csv) or a [blank template](../../../examples/csv/template/organisations.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,organisations/0/id,organisations/0/name,organisations/0/identifier,organisations/0/country,organisations/0/roles,organisations/0/roleDetails,organisations/0/website,organisations/0/logo :nocrossref: ``` @@ -215,7 +215,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/contracts.csv) or a [blank template](../../../examples/csv/template/contracts.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,contracts/0/id,contracts/0/title,contracts/0/description,contracts/0/type,contracts/0/value,contracts/0/dateSigned :nocrossref: ``` @@ -228,7 +228,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/contracts_documents.csv) or a [blank template](../../../examples/csv/template/contracts_documents.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,contracts/0/id,contracts/0/documents/0/title,contracts/0/documents/0/description,contracts/0/documents/0/url,contracts/0/documents/0/format :nocrossref: ``` @@ -241,7 +241,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/contracts_relatedPhases.csv) or a [blank template](../../../examples/csv/template/contracts_relatedPhases.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,contracts/0/id,contracts/0/relatedPhases/0/id,contracts/0/relatedPhases/0/name :nocrossref: ``` @@ -254,7 +254,7 @@ This table is related to the following tables: The fields in this table are listed below. You can also download an [example CSV file](../../../examples/csv/links.csv) or a [blank template](../../../examples/csv/template/links.csv) for this table. -```{jsonschema} ../../../schema/network-schema.json +```{jsonschema} ../../_readthedocs/html/network-schema.json :include: id,links/0/href,links/0/rel :nocrossref: ``` diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 9100315..07ce58c 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -12,7 +12,7 @@ The schema provides the authoritative definition of the structure of Open Fibre For this version of OFDS, the canonical URL of the schema is [https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0\_\_3\_\_0/schema/network-schema.json](https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__3__0/schema/network-schema.json). Use the canonical URL to make sure that your software, documentation or other resources refer to the specific version of the schema with which they were tested. -This page presents the schema in an [interactive browser](#browser) and in [reference tables](#reference-tables) with additional information in paragraphs. You can also download the canonical version of the schema as [JSON Schema](../../schema/network-schema.json) or download it as a [CSV spreadsheet](../../schema/network-schema.csv). +This page presents the schema in an [interactive browser](#browser) and in [reference tables](#reference-tables) with additional information in paragraphs. You can also download the canonical version of the schema as [JSON Schema](../_readthedocs/html/network-schema.json) or download it as a [CSV spreadsheet](../../schema/network-schema.csv). ```{note} If any conflicts are found between the text on this page and the text within the schema, the text within the schema takes precedence. @@ -44,7 +44,7 @@ In addition to the above sections, there are several top-level metadata fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :collapse: nodes,spans,phases,organisations,contracts,crs,links :addtargets: ``` @@ -101,7 +101,7 @@ This section lists each component in the OFDS schema. Some components are reused `Node` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Node/description ``` @@ -115,7 +115,7 @@ Each `Node` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Node :collapse: id,name,phase,status,location,address,type,accessPoint,internationalConnections,power,technologies,physicalInfrastructureProvider,networkProviders :addtargets: @@ -139,7 +139,7 @@ Each `Node` has the following fields: `Span` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Span/description ``` @@ -153,7 +153,7 @@ Each `Span` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Span :collapse: id,name,phase,status,readyForServiceDate,start,end,directed,route,physicalInfrastructureProvider,networkProviders,supplier,transmissionMedium,deployment,deploymentDetails,darkFibre,fibreType,fibreTypeDetails,fibreCount,fibreLength,technologies,capacity,capacityDetails,countries :addtargets: @@ -177,7 +177,7 @@ Each `Span` has the following fields: `Phase` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Phase/description ``` @@ -191,7 +191,7 @@ Each `Phase` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Phase :collapse: id,name,description,funders :addtargets: @@ -215,7 +215,7 @@ Each `Phase` has the following fields: `Organisation` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Organisation/description ``` @@ -229,7 +229,7 @@ Each `Organisation` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Organisation :collapse: id,name,identifier,country,roles,roleDetails,website,logo :addtargets: @@ -253,7 +253,7 @@ Each `Organisation` has the following fields: `Contract` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Contract/description ``` @@ -267,7 +267,7 @@ Each `Contract` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Contract :collapse: id,title,description,type,value,dateSigned,documents,relatedPhases :addtargets: @@ -291,7 +291,7 @@ Each `Contract` has the following fields: `Geometry` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Geometry/description ``` @@ -308,7 +308,7 @@ Each `Geometry` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Geometry :collapse: type,coordinates :addtargets: @@ -338,7 +338,7 @@ Each `Geometry` has the following fields: `OrganisationReference` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/OrganisationReference/description ``` @@ -357,7 +357,7 @@ Each `OrganisationReference` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/OrganisationReference :collapse: id,name :addtargets: @@ -411,7 +411,7 @@ Each `OrganisationReference` has the following fields: `PhaseReference` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/PhaseReference/description ``` @@ -427,7 +427,7 @@ Each `PhaseReference` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/PhaseReference :collapse: id,name :addtargets: @@ -463,7 +463,7 @@ Each `PhaseReference` has the following fields: `Address` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Address/description ``` @@ -478,7 +478,7 @@ Each `Address` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Address :collapse: streetAddress,locality,region,postalCode,country :addtargets: @@ -508,7 +508,7 @@ Each `Address` has the following fields: `Value` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Value/description ``` @@ -522,7 +522,7 @@ Each `Value` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Value :collapse: amount,currency :addtargets: @@ -546,7 +546,7 @@ Each `Value` has the following fields: `Document` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Document/description ``` @@ -560,7 +560,7 @@ Each `Document` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Document :collapse: title,description,url,format :addtargets: @@ -584,7 +584,7 @@ Each `Document` has the following fields: `Identifier` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Identifier/description ``` @@ -598,7 +598,7 @@ Each `Identifier` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Identifier :collapse: id,scheme,legalName,uri :addtargets: @@ -641,7 +641,7 @@ For more information, see [How to transform coordinates to the correct coordinat `CoordinateReferenceSystem` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/CoordinateReferenceSystem/description ``` @@ -655,7 +655,7 @@ Each `CoordinateReferenceSystem` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/CoordinateReferenceSystem :collapse: name,uri :addtargets: @@ -679,7 +679,7 @@ Each `CoordinateReferenceSystem` has the following fields: `Link` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/Link/description ``` @@ -693,7 +693,7 @@ Each `Link` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/Link :collapse: href,rel :addtargets: @@ -717,7 +717,7 @@ Each `Link` has the following fields: `FibreTypeDetails` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/FibreTypeDetails/description ``` @@ -731,7 +731,7 @@ Each `FibreTypeDetails` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/FibreTypeDetails :collapse: fibreSubtype,description :addtargets: @@ -755,7 +755,7 @@ Each `FibreTypeDetails` has the following fields: `DeploymentDetails` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/DeploymentDetails/description ``` @@ -769,7 +769,7 @@ Each `DeploymentDetails` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/DeploymentDetails :collapse: description :addtargets: @@ -793,7 +793,7 @@ Each `DeploymentDetails` has the following fields: `CapacityDetails` is defined as: -```{jsoninclude-quote} ../../schema/network-schema.json +```{jsoninclude-quote} ../_readthedocs/html/network-schema.json :jsonpointer: /$defs/CapacityDetails/description ``` @@ -807,7 +807,7 @@ Each `CapacityDetails` has the following fields: :::{tab-item} Schema -```{jsonschema} ../../schema/network-schema.json +```{jsonschema} ../_readthedocs/html/network-schema.json :pointer: /$defs/CapacityDetails :collapse: description :addtargets: diff --git a/manage.py b/manage.py index 94892f9..98308fa 100755 --- a/manage.py +++ b/manage.py @@ -205,7 +205,7 @@ def generate_csv_reference_markdown(table, schema, parents=None, depth=2): # Generate jsonschema directive markdown[table]['content'].extend([ - "```{jsonschema} ../../../schema/network-schema.json\n" + "```{jsonschema} ../../_readthedocs/html/network-schema.json\n" f":include: {','.join(include_pointers)}\n" ]) @@ -428,7 +428,7 @@ def update_schema_docs(schema): # Add description definition["content"].extend([ f"`{defn}` is defined as:\n\n", - "```{jsoninclude-quote} ../../schema/network-schema.json\n", + "```{jsoninclude-quote} ../_readthedocs/html/network-schema.json\n", f":jsonpointer: /$defs/{defn}/description\n", "```\n\n" ]) @@ -463,7 +463,7 @@ def update_schema_docs(schema): f"\nEach `{defn}` has the following fields:\n\n", "::::{tab-set}\n\n", ":::{tab-item} Schema\n\n", - "```{jsonschema} ../../schema/network-schema.json\n", + "```{jsonschema} ../_readthedocs/html/network-schema.json\n", f":pointer: /$defs/{defn}\n", f":collapse: {','.join(definition['properties'].keys())}\n", ":addtargets:\n",