diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 0000000..7c03d61 --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,21 @@ +name: Link Check +on: [push, pull_request] + +jobs: + linkcheck: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - run: pip install -r requirements.txt + - run: cd ./docs/ && make dirhtml + - run: cd ./docs/ && make linkcheck diff --git a/.github/workflows/mdformat.yml b/.github/workflows/mdformat.yml new file mode 100644 index 0000000..100a6c1 --- /dev/null +++ b/.github/workflows/mdformat.yml @@ -0,0 +1,20 @@ +name: MD Format +on: [push, pull_request] + +jobs: + mdformat: + name: Mdformat Action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - run: pip install -r requirements.txt + - run: mdformat --check ./docs/**/*.md diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..85e6298 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,19 @@ +name: Run all tests +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - run: pip install -r requirements.txt + - run: pytest tests diff --git a/.github/workflows/sphinx-build.yml b/.github/workflows/sphinx-build.yml new file mode 100644 index 0000000..a219505 --- /dev/null +++ b/.github/workflows/sphinx-build.yml @@ -0,0 +1,19 @@ +name: Sphinx Build +on: [push, pull_request] + +jobs: + linkcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x64 + - uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + - run: pip install -r requirements.txt + - run: cd ./docs/ && sphinx-build -nW . ./temp_build diff --git a/.gitignore b/.gitignore index c9811e7..da9f58a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .ve *.swp *~ -_build \ No newline at end of file +_build +.pyest* +__pycache__ diff --git a/codelists/closed/deployment.csv b/codelists/closed/deployment.csv index ebb3c71..319d219 100644 --- a/codelists/closed/deployment.csv +++ b/codelists/closed/deployment.csv @@ -1,3 +1,3 @@ -code,title,description -aboveGround,Above ground,"This span is deployed above ground. For example, aerial deployment along poles or using optical groundwire." -belowGround,Below ground,"This span is deployed below ground. For example, cable that is routed through a duct buried in a trench or run through a sewer." +Code,Title,Description +aboveGround,Above ground,"This span is deployed above ground. For example, aerial deployment along poles or using optical groundwire." +belowGround,Below ground,"This span is deployed below ground. For example, cable that is routed through a duct buried in a trench or run through a sewer." diff --git a/codelists/closed/fibreType.csv b/codelists/closed/fibreType.csv index e5cbc25..774cc54 100644 --- a/codelists/closed/fibreType.csv +++ b/codelists/closed/fibreType.csv @@ -1,8 +1,8 @@ -code,title,description -G.651.1,G.651.1,A 50/125 µm multimode graded index optical fibre cable for the optical access network that conforms to ITU-T recommendation G.651.1. -G.652,G.652,A single-mode optical fibre and cable that conforms to ITU-T recommendation G.652. -G.653,G.653,"A dispersion-shifted, single-mode optical fibre and cable that conforms to ITU-T recommendation G.653." -G.654,G.654,A cut-off shifted single-mode optical fibre and cable that conforms to ITU-T recommendation G.654. -G.655,G.655,A non-zero dispersion-shifted single-mode optical fibre and cable that conforms to ITU-T recommendation G.655. -G.656,G.656,A fibre and cable with non-zero dispersion for wideband optical transport that conforms to ITU-T recommendation G.656. -G.657,G.657,A bending-loss insensitive single-mode optical fibre and cable that conforms to ITU-T recommendation G.657. +Code,Title,Description +G.651.1,G.651.1,A 50/125 µm multimode graded index optical fibre cable for the optical access network that conforms to ITU-T recommendation G.651.1. +G.652,G.652,A single-mode optical fibre and cable that conforms to ITU-T recommendation G.652. +G.653,G.653,"A dispersion-shifted, single-mode optical fibre and cable that conforms to ITU-T recommendation G.653." +G.654,G.654,A cut-off shifted single-mode optical fibre and cable that conforms to ITU-T recommendation G.654. +G.655,G.655,A non-zero dispersion-shifted single-mode optical fibre and cable that conforms to ITU-T recommendation G.655. +G.656,G.656,A fibre and cable with non-zero dispersion for wideband optical transport that conforms to ITU-T recommendation G.656. +G.657,G.657,A bending-loss insensitive single-mode optical fibre and cable that conforms to ITU-T recommendation G.657. diff --git a/codelists/closed/geometryType.csv b/codelists/closed/geometryType.csv index 11d03b9..5f261ff 100644 --- a/codelists/closed/geometryType.csv +++ b/codelists/closed/geometryType.csv @@ -1,3 +1,3 @@ -code,title,description -LineString,Line string,"A GeoJSON LineString, i.e. an array of two or more positions." -Point,Point,"A GeoJSON Point, i.e. a single position." +Code,Title,Description +LineString,Line string,"A GeoJSON LineString, i.e. an array of two or more positions." +Point,Point,"A GeoJSON Point, i.e. a single position." diff --git a/codelists/closed/nodeStatus.csv b/codelists/closed/nodeStatus.csv index 013bf37..ed438ec 100644 --- a/codelists/closed/nodeStatus.csv +++ b/codelists/closed/nodeStatus.csv @@ -1,7 +1,7 @@ -code,title,description -proposed,Proposed,Planning for the node is at an early stage and financing for its construction is not yet finalised. -planned,Planned,Planning for the node is at an advanced stage and financing for its construction is finalised. -underConstruction,Under construction,Construction of the passive physical infrastructure for the node is in progress. -operational,Operational,The active network infrastructure for the node is live and carrying traffic. -decommissioned,Decommissioned,The node is no longer operational. -inactive,Inactive,"Construction of the passive network infrastructure is complete, but the node is not yet operational." +Code,Title,Description +proposed,Proposed,Planning for the node is at an early stage and financing for its construction is not yet finalised. +planned,Planned,Planning for the node is at an advanced stage and financing for its construction is finalised. +underConstruction,Under construction,Construction of the passive physical infrastructure for the node is in progress. +operational,Operational,The active network infrastructure for the node is live and carrying traffic. +decommissioned,Decommissioned,The node is no longer operational. +inactive,Inactive,"Construction of the passive network infrastructure is complete, but the node is not yet operational." diff --git a/codelists/closed/spanStatus.csv b/codelists/closed/spanStatus.csv index 00e4974..7ec5d25 100644 --- a/codelists/closed/spanStatus.csv +++ b/codelists/closed/spanStatus.csv @@ -1,7 +1,7 @@ -code,title,description -operational,Operational,The active network infrastructure for the span is live and carrying traffic. -underConstruction,Under construction,Construction of the passive physical infrastructure for the span is in progress. -planned,Planned,Planning for the span is at an advanced stage and financing for its construction is finalised. -decommissioned,Decommissioned,The span is no longer operational. -proposed,Proposed,Planning for the span is at an early stage and financing for its construction is not yet finalised. -inactive,Inactive,"Construction of the passive network infrastructure is complete, but the span is not yet operational." +Code,Title,Description +operational,Operational,The active network infrastructure for the span is live and carrying traffic. +underConstruction,Under construction,Construction of the passive physical infrastructure for the span is in progress. +planned,Planned,Planning for the span is at an advanced stage and financing for its construction is finalised. +decommissioned,Decommissioned,The span is no longer operational. +proposed,Proposed,Planning for the span is at an early stage and financing for its construction is not yet finalised. +inactive,Inactive,"Construction of the passive network infrastructure is complete, but the span is not yet operational." diff --git a/codelists/closed/transmissionMedium.csv b/codelists/closed/transmissionMedium.csv index bd0ceed..428b83a 100644 --- a/codelists/closed/transmissionMedium.csv +++ b/codelists/closed/transmissionMedium.csv @@ -1,5 +1,5 @@ -code,title,description -fibre,Fibre optic cable,The physical media of this span is fibre optic cable. -microwave,Microwave radio,The physical media of this span is microwave radio. -copper,Copper wire,The physical media of this span is copper wire. -coaxial,Coaxial cable,The physical media of this span is coaxial cable. +Code,Title,Description +fibre,Fibre optic cable,The physical media of this span is fibre optic cable. +microwave,Microwave radio,The physical media of this span is microwave radio. +copper,Copper wire,The physical media of this span is copper wire. +coaxial,Coaxial cable,The physical media of this span is coaxial cable. diff --git a/codelists/open/contractType.csv b/codelists/open/contractType.csv index a05be87..6af7d84 100644 --- a/codelists/open/contractType.csv +++ b/codelists/open/contractType.csv @@ -1,4 +1,4 @@ -code,title,description -ppp,Public Private Partnership (PPP),"A long-term contract between a private party and a government entity, for providing a public asset or service, in which the private party bears significant risk and management responsibility and remuneration is linked to performance. " -private,Private,A contract in which the private sector takes ownership of the network and responsibility for its operation. -public,Public,A contract in which the public sector owns the network and is responsible for its operation. +Code,Title,Description +ppp,Public Private Partnership (PPP),"A long-term contract between a private party and a government entity,for providing a public asset or service,in which the private party bears significant risk and management responsibility and remuneration is linked to performance." +private,Private,A contract in which the private sector takes ownership of the network and responsibility for its operation. +public,Public,A contract in which the public sector owns the network and is responsible for its operation. diff --git a/codelists/open/linkRelationType.csv b/codelists/open/linkRelationType.csv index 8d8d7fc..7f88a38 100644 --- a/codelists/open/linkRelationType.csv +++ b/codelists/open/linkRelationType.csv @@ -1,6 +1,6 @@ -code,title,description -describedby,Described by,Refers to the canonical JSON schema that describes the structure of the data. -"tag:opentelecomdata.net,2022:nodesAPI",Nodes API,An API endpoint that returns a paginated list of `Node` objects. -"tag:opentelecomdata.net,2022:nodesFile",Nodes file,A JSON Lines file containing one `Node` object per line. The file may be compressed using ZIP or GZIP. -"tag:opentelecomdata.net,2022:spansAPI",Spans API,An API endpoint that returns a paginated list of `Span` objects. -"tag:opentelecomdata.net,2022:spansFile",Spans file,A JSON Lines file containing one `Span` object per line. The file may be compressed using ZIP or GZIP. \ No newline at end of file +Code,Title,Description +describedby,Described by,Refers to the canonical JSON schema that describes the structure of the data. +"tag:opentelecomdata.net,2022:nodesAPI",Nodes API,An API endpoint that returns a paginated list of `Node` objects. +"tag:opentelecomdata.net,2022:nodesFile",Nodes file,A JSON Lines file containing one `Node` object per line. The file may be compressed using ZIP or GZIP. +"tag:opentelecomdata.net,2022:spansAPI",Spans API,An API endpoint that returns a paginated list of `Span` objects. +"tag:opentelecomdata.net,2022:spansFile",Spans file,A JSON Lines file containing one `Span` object per line. The file may be compressed using ZIP or GZIP. diff --git a/codelists/open/mediaType.csv b/codelists/open/mediaType.csv index d18a575..7787796 100644 --- a/codelists/open/mediaType.csv +++ b/codelists/open/mediaType.csv @@ -1903,4 +1903,4 @@ video/vnd.youtube.yt,vnd.youtube.yt video/vnd.vivo,vnd.vivo video/VP8,VP8 video/VP9,VP9 -offline/print,print \ No newline at end of file +offline/print,print diff --git a/codelists/open/nodeTechnologies.csv b/codelists/open/nodeTechnologies.csv index b376997..8c1c9e4 100644 --- a/codelists/open/nodeTechnologies.csv +++ b/codelists/open/nodeTechnologies.csv @@ -1,3 +1,3 @@ -code,title,description -mpls,Multi-Protocol Label Switching,A routing technique that directs data from one node to the next based on labels rather than network addresses. -ip,Internet Protocol,A network layer protocol that defines the addressing mechanism on the Internet to allow data to be transmitted. +Code,Title,Description +mpls,Multi-Protocol Label Switching,A routing technique that directs data from one node to the next based on labels rather than network addresses. +ip,Internet Protocol,A network layer protocol that defines the addressing mechanism on the Internet to allow data to be transmitted. diff --git a/codelists/open/nodeType.csv b/codelists/open/nodeType.csv index 0a75d64..3e73280 100644 --- a/codelists/open/nodeType.csv +++ b/codelists/open/nodeType.csv @@ -1,13 +1,13 @@ -code,title,description -dataCentre,Data centre,"A structure, or group of structures, dedicated to the centralized accommodation, interconnection and operation of information technology and network telecommunications equipment." -cableLanding,Cable landing point,The location where a submarine or other underwater cable makes landfall. -pop,Point of Presence,"A demarcation point, access point, or physical location at which two or more networks or communication devices share a connection." -tower,Tower,A ground-based or rooftop structure that supports antennas for sending or receiving radio waves. -ixp,Internet Exchange Point,"A physical point at which networks such as internet service providers, mobile operators and content delivery networks come together to connect and exchange internet traffic." -borderCrossing,Border crossing,The point at which a fibre cable crosses either an international boundary or the coastline of the operator’s country. The countries to which this node connects should be listed in `.internationalConnections`. -cabinet,Cabinet,An distribution cabinet to which end users are connected by a standard phone line. -aggregationPoint,Aggregation point,A point at which multiple fibre optic cables are spliced together. Typically located between an exchange or POP and GPON splitters or end user premises. -exchange,Exchange,A telephone exchange. -substation,Substation,An electrical substation. -addDropSite,Add drop site,"A point at which individual digital bit streams can be added to, or dropped from, a multiplexed signal in order to redirect bit streams between network paths. " -repeaterSite,Repeater site,A point at which fibre optic signals are amplified or repeated. Also known as a regeneration facility. +Code,Title,Description +dataCentre,Data centre,"A structure, or group of structures, dedicated to the centralized accommodation, interconnection and operation of information technology and network telecommunications equipment." +cableLanding,Cable landing point,The location where a submarine or other underwater cable makes landfall. +pop,Point of Presence,"A demarcation point, access point, or physical location at which two or more networks or communication devices share a connection." +tower,Tower,A ground-based or rooftop structure that supports antennas for sending or receiving radio waves. +ixp,Internet Exchange Point,"A physical point at which networks such as internet service providers, mobile operators and content delivery networks come together to connect and exchange internet traffic." +borderCrossing,Border crossing,The point at which a fibre cable crosses either an international boundary or the coastline of the operator’s country. The countries to which this node connects should be listed in `.internationalConnections`. +cabinet,Cabinet,An distribution cabinet to which end users are connected by a standard phone line. +aggregationPoint,Aggregation point,A point at which multiple fibre optic cables are spliced together. Typically located between an exchange or POP and GPON splitters or end user premises. +exchange,Exchange,A telephone exchange. +substation,Substation,An electrical substation. +addDropSite,Add drop site,"A point at which individual digital bit streams can be added to, or dropped from, a multiplexed signal in order to redirect bit streams between network paths." +repeaterSite,Repeater site,A point at which fibre optic signals are amplified or repeated. Also known as a regeneration facility. diff --git a/codelists/open/organisationIdentifierScheme.csv b/codelists/open/organisationIdentifierScheme.csv index ea89840..b7132d7 100644 --- a/codelists/open/organisationIdentifierScheme.csv +++ b/codelists/open/organisationIdentifierScheme.csv @@ -1,11 +1,11 @@ -code,name +Code,Name AD-COA,Andorra Chart of Accounts AE-ACCI,Ajman Chamber of Commerce and Industry AE-ADCD,Abu Dhabi Commercial Directory AE-AFZ,Ajman Free Zone Authority AE-COA,United Arab Emirates (the) Chart of Accounts -AE-DCCI,Dubai Chamber of Commerce and Industry -AE-DFSA,Dubai Financial Services Authority +AE-DCCI,Dubai Chamber of Commerce and Industry +AE-DFSA,Dubai Financial Services Authority AE-DIFC,Dubai International Financial Centre AE-DMCC,Dubai Multi Commodities Centre AE-FCCI,Fujairah Chamber of Commerce and Industry @@ -18,7 +18,7 @@ AE-SCCI,Sharjah Chamber of Commerce and Industry AE-UQCCI,Umm al-Quwain Chamber of Commerce and Industry AF-CBR,Afghanistan Central Business Registry AF-COA,Afghanistan Chart of Accounts -AF-MOE,Ministry of Economy NGO Department +AF-MOE,Ministry of Economy NGO Department AF-TIN,Afghanistan Tax Identification Number AG-COA,Antigua and Barbuda Chart of Accounts AI-COA,Anguilla Chart of Accounts @@ -46,9 +46,9 @@ AZ-IVI,State Register of Commercial Entities (Ministry of Taxes of Azerbaijan Re BA-COA,Bosnia and Herzegovina Chart of Accounts BB-COA,Barbados Chart of Accounts BD-COA,Bangladesh Chart of Accounts -BD-NAB,Bangladesh NGO Affairs Bureau -BD-ROC,Bangladesh Office of the Register of Joint Stock Companies and Firms -BE-BCE_KBO,Crossroads Bank for Enterprises +BD-NAB,Bangladesh NGO Affairs Bureau +BD-ROC,Bangladesh Office of the Register of Joint Stock Companies and Firms +BE-BCE_KBO,Crossroads Bank for Enterprises BE-COA,Belgium Chart of Accounts BE-GTCF,Au Greffe du Tribunal de Commerce Francophone de Bruxelles BF-COA,Burkina Faso Chart of Accounts @@ -80,21 +80,21 @@ BY-COA,Belarus Chart of Accounts BZ-COA,Belize Chart of Accounts CA-CC,Corporations Canada CA-COA,Canada Chart of Accounts -CA-CRA_ACR,Canadian Revenue Agency +CA-CRA_ACR,Canadian Revenue Agency CA-GOV,List of legal department names (Government of Canada) -CA_AB-ABT,Corporate Registry Office -CA_BC-BRC_CBR,British Columbia Corporate Registry -CA_MB-MTB,"Manitoba Companies Office, Department of Entrepreneurship, Training and Trade " -CA_NB-NWB_NOB,Corporate Registry +CA_AB-ABT,Corporate Registry Office +CA_BC-BRC_CBR,British Columbia Corporate Registry +CA_MB-MTB,"Manitoba Companies Office, Department of Entrepreneurship, Training and Trade" +CA_NB-NWB_NOB,Corporate Registry CA_NL-NFL_TNL,"Registry of Companies, Department of Government Services" -CA_NS-NVS_NVE,Nova Scotia Registry of Joint Stock Companies -CA_NT-NWT_TNO,Canadian Provincial Corporate Registration - Northwest Territories +CA_NS-NVS_NVE,Nova Scotia Registry of Joint Stock Companies +CA_NT-NWT_TNO,Canadian Provincial Corporate Registration - Northwest Territories CA_NU-NNV,Nunavut Department of Justice - Corporate Registries -CA_ON-ONT,"ServiceOntario, Ministry of Government Services " +CA_ON-ONT,"ServiceOntario, Ministry of Government Services" CA_PE-PEI_IPE,Prince Edward Island Corporate -CA_QC-QBC,Quebec Business Registrar -CA_SK-SKN,Saskatchewan Corporate Registry -CA_YT-YKT,Yukon Corporate Affairs +CA_QC-QBC,Quebec Business Registrar +CA_SK-SKN,Saskatchewan Corporate Registry +CA_YT-YKT,Yukon Corporate Affairs CC-COA,Cocos (Keeling) Islands (the) Chart of Accounts CD-COA,Congo (the Democratic Republic of the) Chart of Accounts CF-COA,Central African Republic (the) Chart of Accounts @@ -113,9 +113,9 @@ CM-NIU,Tax Identification Number (Cameroon) CN-COA,China Chart of Accounts CN-SAIC,State Administration for Industry and Commerce (SAIC) CN-USCI,Unified Social Credit Identifier -CO-CCB,Bogota Chamber of Commerce +CO-CCB,Bogota Chamber of Commerce CO-COA,Colombia Chart of Accounts -CO-RUE,Unified Commercial and Social Registry (RUES) +CO-RUE,Unified Commercial and Social Registry (RUES) CR-COA,Costa Rica Chart of Accounts CR-RPJ,Registro de Personas Jurídicas (Costa Rica) CU-COA,Cuba Chart of Accounts @@ -126,7 +126,7 @@ CY-COA,Cyprus Chart of Accounts CY-DRCOR,Cyprus Department of Registrar of Companies and Official Receiver (DRCOR) CZ-COA,Czechia Chart of Accounts CZ-DIC,Tax ID (DIČ) Czech Republic -CZ-ICO,Access to Registers of Economic Subjects +CZ-ICO,Access to Registers of Economic Subjects DE-COA,Germany Chart of Accounts DE-CR,Common Register Portal of the German Federal States (CRP) DJ-COA,Djibouti Chart of Accounts @@ -147,7 +147,7 @@ EH-COA,Western Sahara Chart of Accounts ER-COA,Eritrea Chart of Accounts ES-COA,Spain Chart of Accounts ES-DIR3,Common Directory of Organizational Units and Offices - DIR3 -ES-MDJ,Ministerio de Justicia +ES-MDJ,Ministerio de Justicia ES-NIF,Tax Identification Number ES-RMC,Central Commercial Register of the Kingdom of Spain ET-COA,Ethiopia Chart of Accounts @@ -155,15 +155,15 @@ ET-CSA,Charities and Societies Agency (Ethiopia) ET-MFA,Ministry of Foreign Affairs ET-MOT,Ministry of Trade (Ethiopia) FI-COA,Finland Chart of Accounts -FI-PRO,Finnish Patent and Registration Office +FI-PRO,Finnish Patent and Registration Office FI-VERO,Finnish Tax Administration FJ-COA,Fiji Chart of Accounts FK-COA,Falkland Islands (the) [Malvinas] Chart of Accounts FM-COA,Micronesia (Federated States of) Chart of Accounts FO-COA,Faroe Islands (the) Chart of Accounts FR-COA,France Chart of Accounts -FR-INSEE,The National Institute of Statistics and Economic Studies -FR-RCS,Trade and Companies Register +FR-INSEE,The National Institute of Statistics and Economic Studies +FR-RCS,Trade and Companies Register GA-COA,Gabon Chart of Accounts GB-CASC,Community amateur sports clubs (CASCs) registered with HMRC GB-CHC,Charity Commission/Comisiwn Elusennau @@ -227,7 +227,7 @@ HU-AFA,Information and Electronic Company Registration Service HU-COA,Hungary Chart of Accounts ID-COA,Indonesia Chart of Accounts ID-DJP,Director General of Taxes -ID-KDN,Ministry of Home Affairs +ID-KDN,Ministry of Home Affairs ID-KHH,Ministry of Justice & Human Rights ID-KLN,Ministry of Foreign affairs ID-PRO,Indonesia - NGOs registered at Provinicial Level @@ -240,7 +240,7 @@ IL-RA,Israel Charity Registry IL-ROC,Registrar of Companies (Israel) IM-COA,Isle of Man Chart of Accounts IM-CR,Isle of Man Companies Registry -IM-GR,Isle of Man Index of Registered Charities +IM-GR,Isle of Man Index of Registered Charities IN-COA,India Chart of Accounts IN-MCA,"Government of India, Ministry of Corporate Affairs" IN-MHA,Ministry of Home Affairs (India) Foreign Contributions (Regulation) Act Register @@ -319,7 +319,7 @@ MH-COA,Marshall Islands (the) Chart of Accounts MK-COA,North Macedonia Chart of Accounts ML-CCIM,The Chamber of Commerce and Industry of Mali ML-COA,Mali Chart of Accounts -ML-MAT,Ministere de l'Administration Territoriale +ML-MAT,Ministere de l'Administration Territoriale ML-NIF,Tax Identification Number MM-COA,Myanmar Chart of Accounts MM-MHA,Ministry of Home Affairs - Central Committee for the Registration and Supervision of Organisations @@ -349,7 +349,7 @@ MZ-CR,Mozambique Commercial Registry MZ-MOJ,Mozambique Ministry of Justice MZ-NUIT,Taxpayer Single Identification Number (Mozambique) NA-COA,Namibia Chart of Accounts -NA-NAMRA,Namibia Revenue Agency +NA-NAMRA,Namibia Revenue Agency NC-COA,New Caledonia Chart of Accounts NE-COA,Niger (the) Chart of Accounts NF-COA,Norfolk Island Chart of Accounts @@ -360,7 +360,7 @@ NG-TIN,Taxpayer Identification Number NI-COA,Nicaragua Chart of Accounts NL-COA,Netherlands (the) Chart of Accounts NL-KVK,Chamber of Commerce (Netherlands) -NL-OWMS,Overheid.nl Web Metadata Standard +NL-OWMS,Overheid.nl Web Metadata Standard NO-BRC,Brønnøysundregistrene NO-COA,Norway Chart of Accounts NP-COA,Nepal Chart of Accounts @@ -375,7 +375,7 @@ PA-COA,Panama Chart of Accounts PA-PRP,Public Registry of Panama PE-COA,Peru Chart of Accounts PE-RUC,RUC Number (Peru) -PE-SUNARP,Peruvian National Superintendency of Public Registries - Registered Legal Entities +PE-SUNARP,Peruvian National Superintendency of Public Registries - Registered Legal Entities PF-COA,French Polynesia Chart of Accounts PG-COA,Papua New Guinea Chart of Accounts PH-COA,Philippines (the) Chart of Accounts @@ -404,7 +404,7 @@ QA-COA,Qatar Chart of Accounts RE-COA,Réunion Chart of Accounts RO-COA,Romania Chart of Accounts RO-CUI,National Trade Register (Romania) -RS-APR,Serbian Business Registrations Agency +RS-APR,Serbian Business Registrations Agency RS-COA,Serbia Chart of Accounts RS-PIB,Tax identification number register RU-COA,Russian Federation (the) Chart of Accounts @@ -417,7 +417,7 @@ SA-COA,Saudi Arabia Chart of Accounts SB-COA,Solomon Islands Chart of Accounts SC-COA,Seychelles Chart of Accounts SD-COA,Sudan (the) Chart of Accounts -SE-BLV,Bolagsverket +SE-BLV,Bolagsverket SE-COA,Sweden Chart of Accounts SE-KK,"Legal, Financial and Administrative Services Agency (Sweden)" SE-ON,"Business Registration Number (Organisationsnummer), Sweden" @@ -475,7 +475,7 @@ TZ-COA,"Tanzania, the United Republic of Chart of Accounts" TZ-NNCB,Tanzania National NGO Coordination Board TZ-TRA,Tanzania Revenue Agency UA-COA,Ukraine Chart of Accounts -UA-EDR,United State Register +UA-EDR,United State Register UG-204CBO,"CBO Registration number, Uganda (Jinja District)" UG-COA,Uganda Chart of Accounts UG-NGB,"NGO Board, Ministry of Internal Affairs (Uganda)" @@ -506,7 +506,7 @@ XI-EORI,Economic Operators Identification and Registration system XI-GRID,Global Research Identifiers Database XI-IATI,International Aid Transparency Initiative Organisation Identifier XI-LEI,Global Legal Entity Identifier Index -XI-PB,Public Bodies - Open Knowledge Foundation +XI-PB,Public Bodies - Open Knowledge Foundation XI-PID,PermID: Thompson Reuters Permanent Identifier XI-ROR,Research Organization Registry XI-WIKIDATA,Wikidata @@ -522,7 +522,7 @@ ZA-CIP,Companies and Intellectual Property Commission (CIPC) ZA-CIT,South African Corporate Income Tax (CIT) number ZA-COA,South Africa Chart of Accounts ZA-NPO,Nonprofit Organisation Directorate - South African Department of Social Development -ZA-PBO,SA Revenue Service Tax Exemption Unit +ZA-PBO,SA Revenue Service Tax Exemption Unit ZM-COA,Zambia Chart of Accounts ZM-PCR,Patents and Companies Registration Agency ZM-RNGO,Department of Registrar for NGOs diff --git a/codelists/open/organisationRole.csv b/codelists/open/organisationRole.csv index fd4327f..eb4514a 100644 --- a/codelists/open/organisationRole.csv +++ b/codelists/open/organisationRole.csv @@ -1,5 +1,5 @@ -code,title,description -physicalInfrastructureProvider,Physical infrastructure provider,"An organisation that owns and maintains passive network infrastructure, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites." -networkProvider,Network provider,"An organisation that operates the active network infrastructure, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure." -funder,Funder,An organisation that provides financing for the development or operation of a phase or network. -supplier,Supplier,The organisation responsible for installing the cable for a span. +Code,Title,Description +physicalInfrastructureProvider,Physical infrastructure provider,"An organisation that owns and maintains passive network infrastructure, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites." +networkProvider,Network provider,"An organisation that operates the active network infrastructure, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure." +funder,Funder,An organisation that provides financing for the development or operation of a phase or network. +supplier,Supplier,The organisation responsible for installing the cable for a span. diff --git a/codelists/open/spanTechnologies.csv b/codelists/open/spanTechnologies.csv index 0dd3e0b..d503842 100644 --- a/codelists/open/spanTechnologies.csv +++ b/codelists/open/spanTechnologies.csv @@ -1,5 +1,5 @@ -code,title,description -sdh,Synchronous Digital Hierarchy,"A standardised protocol for transferring multiple digital bit streams synchronously over optical fibre. SDH is used worldwide, with the exception of the US and Canada." -dwdm,Dense Wavelength Division Multiplexing,A technology that multiplexes a number of optical carrier signals onto a single optical fibre by using different wavelengths. -tdm,Time Division Multiplexing,A technology that multiplexes a number of optical carrier signals onto a single optical fibre by using different arrival times. -sonet,Synchronous Optical Networking,A standardised protocol for transferring multiple digital bit streams synchronously over optical fibre. SONET is used in the US and Canada. +Code,Title,Description +sdh,Synchronous Digital Hierarchy,"A standardised protocol for transferring multiple digital bit streams synchronously over optical fibre. SDH is used worldwide, with the exception of the US and Canada." +dwdm,Dense Wavelength Division Multiplexing,A technology that multiplexes a number of optical carrier signals onto a single optical fibre by using different wavelengths. +tdm,Time Division Multiplexing,A technology that multiplexes a number of optical carrier signals onto a single optical fibre by using different arrival times. +sonet,Synchronous Optical Networking,A standardised protocol for transferring multiple digital bit streams synchronously over optical fibre. SONET is used in the US and Canada. diff --git a/docs/governance/index.md b/docs/governance/index.md index 063ded6..8cbce16 100644 --- a/docs/governance/index.md +++ b/docs/governance/index.md @@ -16,8 +16,8 @@ This section describes the normative status of content within OFDS. Content is d **Normative content** is the prescriptive part of a standard. It sets the rules to be followed in order to be evaluated as compliant with the standard, and from which no deviation is permitted. The following content is normative: -* JSON schema files located in the `schema` directory, specifically `network-schema.json` -* Codelist CSV files located in the `codelists` directory and its subdirectories -* Reference markdown files located in the `docs/reference` directory and its subdirectories +- JSON schema files located in the `schema` directory, specifically `network-schema.json` +- Codelist CSV files located in the `codelists` directory and its subdirectories +- Reference markdown files located in the `docs/reference` directory and its subdirectories **Non-normative content** is the non-prescriptive, or ‘descriptive’, part of a standard. It can include analogies, synonyms, explanations, illustrations, context, and examples. In the event non-normative content contradicts normative content, the normative content takes precedence. All content not explicitly listed above is non-normative. diff --git a/docs/guidance/publication.md b/docs/guidance/publication.md index 37a4497..679f039 100644 --- a/docs/guidance/publication.md +++ b/docs/guidance/publication.md @@ -14,9 +14,9 @@ This page provides an [overview](#overview) of the process for publishing Open F The process for publishing OFDS data can be divided into three phases: -* [Plan](#plan) -* [Prepare](#prepare) -* [Publish](#publish) +- [Plan](#plan) +- [Prepare](#prepare) +- [Publish](#publish) ### Plan @@ -68,8 +68,8 @@ The suggested approach is to develop a reproducible data pipeline so that you ca For guidance on common steps in converting your data to OFDS format, see the following guides: -* [How to transform coordinates to the correct coordinate reference system](#how-to-transform-coordinates-to-the-correct-coordinate-reference-system) -* [How to generate universally unique identifiers](#how-to-generate-universally-unique-identifiers) +- [How to transform coordinates to the correct coordinate reference system](#how-to-transform-coordinates-to-the-correct-coordinate-reference-system) +- [How to generate universally unique identifiers](#how-to-generate-universally-unique-identifiers) #### Check your data @@ -101,38 +101,21 @@ There are [open issues](https://github.com/Open-Telecoms-Data/open-fibre-data-st OFDS data can be published in three [publication formats](../reference/publication_formats/index.md): -* The [JSON format](../reference/publication_formats/json.md) reflects the structure of the [schema](../reference/schema.md), is useful to developers who want to use the data to build web apps, and offers a ‘base’ format that other publication formats can be converted to and from. -* The [GeoJSON format](../reference/publication_formats/geojson.md) is useful to GIS analysts who want to import the data directly into GIS tools without any pre-processing. -* The [CSV format](../reference/publication_formats/csv.md) is useful to data analysts who want to import data directly into databases and other tabular analysis tools, and to users who want to explore the data in spreadsheet tools. +- The [JSON format](../reference/publication_formats/json.md) reflects the structure of the [schema](../reference/schema.md), is useful to developers who want to use the data to build web apps, and offers a ‘base’ format that other publication formats can be converted to and from. +- The [GeoJSON format](../reference/publication_formats/geojson.md) is useful to GIS analysts who want to import the data directly into GIS tools without any pre-processing. +- The [CSV format](../reference/publication_formats/csv.md) is useful to data analysts who want to import data directly into databases and other tabular analysis tools, and to users who want to explore the data in spreadsheet tools. To meet the widest range of use cases, you ought to publish data in all three formats. The suggested approach is to export your data in the JSON format and to use the following tools to transform it to the GeoJSON and CSV formats: ::::{tab-set} :::{tab-item} JSON to GeoJSON -The standard repository's [`manage.py`](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/blob/main/manage.py) file provides a command-line interface for transforming OFDS data from JSON to GeoJSON format. +[Lib CoVE OFDS](https://libcoveofds.readthedocs.io/en/latest/) provides a command-line interface for transforming OFDS data from JSON to GeoJSON format. -To convert a network package to GeoJSON format: - -* Clone the [repository](https://github.com/Open-Telecoms-Data/open-fibre-data-standard) -* Create a virtual environment: - -```bash -sudo apt-get install python3-venv -python3 -m venv .ve -source .ve/bin/activate -``` - -* Install requirements - -```bash -pip install -r requirements.txt -``` - -* Run the following command: +To convert a network package to GeoJSON format, follow the [installation instructions](https://github.com/Open-Telecoms-Data/lib-cove-ofds) and then run the following command: ```bash -./manage.py convert-to-geojson network-package.json +libcoveofds jsontogeojson ``` ::: @@ -142,10 +125,10 @@ pip install -r requirements.txt 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) -* 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: +- [Install Flatten Tool](https://flatten-tool.readthedocs.io/en/latest/getting-started/#getting-started) +- Download the [network schema](../../schema/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: ```bash flatten-tool flatten --truncation-length=9 --root-list-path=networks --main-sheet-name=networks --schema=network-schema.json network-package.json -f csv @@ -159,8 +142,8 @@ flatten-tool flatten --truncation-length=9 --root-list-path=networks --main-shee This section describes how to: -* Use [pagination](#pagination) to publish an **individual** network that is too large to return in a single API response -* Use [streaming](#streaming) to publish an **individual** network that is too large to load into memory. +- Use [pagination](#pagination) to publish an **individual** network that is too large to return in a single API response +- Use [streaming](#streaming) to publish an **individual** network that is too large to load into memory. For information on how to use pagination and streaming to publish **multiple** networks, see the [publication formats reference](../reference/publication_formats/index.md). @@ -309,8 +292,8 @@ If access controls are necessary, do not use access tokens that need to be refre If the API implements rate limits (throttling): -* Document the rate limits in the API documentation ([example](https://developer.twitter.com/en/docs/twitter-api/rate-limits)). -* When a user exceeds a rate limit, return a [HTTP 429 'Too Many Requests' response status code,](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) and set the [Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) HTTP header to indicate how long to wait before making a new request. +- Document the rate limits in the API documentation ([example](https://developer.twitter.com/en/docs/twitter-api/rate-limits)). +- When a user exceeds a rate limit, return a [HTTP 429 'Too Many Requests' response status code,](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) and set the [Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) HTTP header to indicate how long to wait before making a new request. ##### Completeness @@ -318,10 +301,10 @@ Ensure that all OFDS data can be accessed via the API. ##### Response format -* Put the network package or GeoJSON feature collection at the top-level of the JSON data. For example, do not embed it under a results array. -* Use a JSON library instead of implementing JSON serialisation yourself. This also guarantees that the encoding is UTF-8. -* Remove NULL characters (\u0000) from the JSON response. These characters cannot be imported by users into some SQL databases. -* If results cannot be returned, use an appropriate HTTP error code (400-599); do not return a JSON object with an error message and a 200 HTTP status code. That said, if a search request returns no results, it is appropriate to use a 200 HTTP status code, with an empty result set. +- Put the network package or GeoJSON feature collection at the top-level of the JSON data. For example, do not embed it under a results array. +- Use a JSON library instead of implementing JSON serialisation yourself. This also guarantees that the encoding is UTF-8. +- Remove NULL characters (\\u0000) from the JSON response. These characters cannot be imported by users into some SQL databases. +- If results cannot be returned, use an appropriate HTTP error code (400-599); do not return a JSON object with an error message and a 200 HTTP status code. That said, if a search request returns no results, it is appropriate to use a 200 HTTP status code, with an empty result set. ##### Monitoring @@ -333,14 +316,14 @@ To publish OFDS data, you need to specify coordinates in the `urn:ogc:def:crs:OG If your data pipeline includes a Geographic Information System such as ArcGIS or QGIS, these tools can transform coordinates from one CRS to another. If you are writing your own software, or if you prefer to use the command line, several libraries and tools are available, for example: -* [PROJ](https://proj.org/) and its associated Python interface ([PYPROJ](https://pyproj4.github.io/pyproj/stable/)) and JavaScript implementation ([PROJ4JS](http://proj4js.org/) are generic coordinate transformation tools that transform geospatial coordinates from one coordinate reference system (CRS) to another. They include command-line applications and an application programming interface. -* [GDAL](https://gdal.org/) is a translator library for raster and vector geospatial data formats. It also comes with a variety of useful command line utilities for data translation and processing. -* [Apache SIS](https://sis.apache.org/) is a free software, Java language library for developing geospatial applications. SIS provides data structures for geographic features and associated metadata along with methods to manipulate those data structures. +- [PROJ](https://proj.org/) and its associated Python interface ([PYPROJ](https://pyproj4.github.io/pyproj/stable/)) and JavaScript implementation ([PROJ4JS](http://proj4js.org/) are generic coordinate transformation tools that transform geospatial coordinates from one coordinate reference system (CRS) to another. They include command-line applications and an application programming interface. +- [GDAL](https://gdal.org/) is a translator library for raster and vector geospatial data formats. It also comes with a variety of useful command line utilities for data translation and processing. +- [Apache SIS](https://sis.apache.org/) is a free software, Java language library for developing geospatial applications. SIS provides data structures for geographic features and associated metadata along with methods to manipulate those data structures. If you prefer to use a graphical user interface, several web-based tools are available, for example: -* [MyGeodata Cloud](https://mygeodata.cloud/cs2cs/) -* [epsg.io](https://epsg.io/transform) +- [MyGeodata Cloud](https://mygeodata.cloud/cs2cs/) +- [epsg.io](https://epsg.io/transform) The `urn:ogc:def:crs:OGC::CRS84` CRS is equivalent to EPSG:4326 with reversed axes so, if it is not supported by your chosen transformation tool, you can instead transform your coordinates to EPSG:4326 and manually order your coordinates in longitude, latitude order. @@ -348,15 +331,15 @@ The `urn:ogc:def:crs:OGC::CRS84` CRS is equivalent to EPSG:4326 with reversed ax If you are writing your own software or if you prefer to use the command line, several libraries and tools are available to generate universally unique identifiers (UUIDS), for example: -* Golang - [google/uuid](https://pkg.go.dev/github.com/google/uuid) -* PHP - [ramsey/uuid](https://github.com/ramsey/uuid) -* C++ - [Boost UUID](https://www.boost.org/doc/libs/1_65_0/libs/uuid/uuid.html) -* Linux or C - [libuuid](https://linux.die.net/man/3/libuuid) -* Python - [uuid.py](https://docs.python.org/3/library/uuid.html) -* Java - [java.util.UUID](https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html) -* C# - [System.Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid) -* JavaScript - [Crypto.randomUUID](https://www.moreonfew.com/how-to-generate-uuid-in-javascript/) -* R - [uuid](https://cran.r-project.org/web/packages/uuid/index.html) +- Golang - [google/uuid](https://pkg.go.dev/github.com/google/uuid) +- PHP - [ramsey/uuid](https://github.com/ramsey/uuid) +- C++ - [Boost UUID](https://www.boost.org/doc/libs/1_65_0/libs/uuid/uuid.html) +- Linux or C - [libuuid](https://linux.die.net/man/3/libuuid) +- Python - [uuid.py](https://docs.python.org/3/library/uuid.html) +- Java - [java.util.UUID](https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html) +- C# - [System.Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid) +- JavaScript - [Crypto.randomUUID](https://www.moreonfew.com/how-to-generate-uuid-in-javascript/) +- R - [uuid](https://cran.r-project.org/web/packages/uuid/index.html) If you prefer to use a graphical user interface, several web-based tools are available, for example [Online UUID Generator](https://www.uuidgenerator.net/). @@ -366,14 +349,14 @@ Publishing OFDS data involves making choices about what data to include and excl In order for users to interpret data correctly and make effective use of it, it's important to describe your decisions and to provide guidance to data users. Your data user guide ought to include: -* [why you are publishing the data](../primer/openfibredata.md#why-publish-open-fibre-data) -* [how you prepared the data](#prepare-your-data) and how frequently it is updated -* the scope of the data -* the meaning, structure and format of any [additional fields](#how-to-add-additional-fields) -* the available [publication formats](#how-to-format-data-for-publication) and [access methods](#how-to-provide-access-to-data) -* [license information](#how-to-license-your-data) for data reuse -* any plans for changes to your publication -* your contact details +- [why you are publishing the data](../primer/openfibredata.md#why-publish-open-fibre-data) +- [how you prepared the data](#prepare-your-data) and how frequently it is updated +- the scope of the data +- the meaning, structure and format of any [additional fields](#how-to-add-additional-fields) +- the available [publication formats](#how-to-format-data-for-publication) and [access methods](#how-to-provide-access-to-data) +- [license information](#how-to-license-your-data) for data reuse +- any plans for changes to your publication +- your contact details Your data user guide ought to be made available as a public web page. You ought to link to the web page wherever you publish links to your data. @@ -383,8 +366,8 @@ Publishing your data under an open license is important because it prevents rest You are encouraged to use either a public domain dedication/certification or an attribution-only license: -* A public domain dedication asserts no copyright, database rights or contractual rights over the data. For example, [Creative Commons' public domain tools](https://creativecommons.org/publicdomain/). -* Attribution-only licenses allow for use and reuse, with the only restriction being that attribution (credit) be given to the original publisher. For example, [Creative Commons Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/). +- A public domain dedication asserts no copyright, database rights or contractual rights over the data. For example, [Creative Commons' public domain tools](https://creativecommons.org/publicdomain/). +- Attribution-only licenses allow for use and reuse, with the only restriction being that attribution (credit) be given to the original publisher. For example, [Creative Commons Attribution 4.0 International](http://creativecommons.org/licenses/by/4.0/). The Open Knowledge Foundation maintains a list of [licenses that conform to the open definition](https://opendefinition.org/licenses/). If you use a custom license, you ought to check that it conforms to the [open definition](https://opendefinition.org/od/2.1/en/). diff --git a/docs/guidance/use.md b/docs/guidance/use.md index 1f8c937..2188ba4 100644 --- a/docs/guidance/use.md +++ b/docs/guidance/use.md @@ -21,8 +21,8 @@ The example QGIS file shows how to use [QGIS](https://qgis.org/) to visualise th To explore the example file: 1. Clone the [OFDS GitHub repository](https://github.com/Open-Telecoms-Data/open-fibre-data-standard). -2. Open `examples/qgis/geojson.qgs` in QGIS. -3. Explore the [attribute table](https://docs.qgis.org/3.22/en/docs/user_manual/working_with_vector/attribute_table.html) for the nodes and spans layers and use the [schema reference](../reference/schema.md) to look up the meaning of each attribute. +1. Open `examples/qgis/geojson.qgs` in QGIS. +1. Explore the [attribute table](https://docs.qgis.org/3.22/en/docs/user_manual/working_with_vector/attribute_table.html) for the nodes and spans layers and use the [schema reference](../reference/schema.md) to look up the meaning of each attribute. Alternatively, you can download the [example QGIS file](../../examples/qgis/geojson.qgs) and the example [nodes.geojson](../../examples/geojson/nodes.geojson) and [spans.geojson](../../examples/geojson/spans.geojson) files separately. However, when you open the example QGIS file you will need to use the [Handle Unavailable Layers](https://docs.qgis.org/3.22/en/docs/user_manual/introduction/project_files.html#handling-broken-file-paths) dialog to locate the nodes and spans files. @@ -30,8 +30,8 @@ To recreate the example file: 1. [Load the `.geojson` files as vector data sources](https://docs.qgis.org/3.22/en/docs/user_manual/managing_data_source/opening_data.html#loading-a-layer-from-a-file) with the `FLATTEN_NESTED_ATTRIBUTES` option enabled. For more information on the options for loading GeoJSON data, see the [GDAL GeoJSON driver documentation](https://gdal.org/drivers/vector/geojson.html). 1. In the [symbology properties](https://docs.qgis.org/3.22/en/docs/user_manual/working_with_vector/vector_properties.html#symbology-properties) for each layer, choose the [categorized renderer](https://docs.qgis.org/3.22/en/docs/user_manual/working_with_vector/vector_properties.html#categorized-renderer) with the following classification values: - * spans: `darkFibre` - * nodes: `accessPoint` + - spans: `darkFibre` + - nodes: `accessPoint` 1. Add a vector tile layer using the OpenStreetMap [XYZ Tile service](https://docs.qgis.org/3.22/en/docs/user_manual/managing_data_source/opening_data.html#using-xyz-tile-services). ### Leaflet diff --git a/docs/history/changelog.md b/docs/history/changelog.md index 8a02c10..8139710 100644 --- a/docs/history/changelog.md +++ b/docs/history/changelog.md @@ -7,71 +7,80 @@ We want to hear your feedback on the standard and its documentation. For general To comment on or create discussions and issues, you need to [sign up for a free GitHub account](https://github.com/signup). If you prefer to provide feedback privately, you can email [info@opentelecomdata.net](mailto:info@opentelecomdata.net). ``` + This page lists the changes in each version of the Open Fibre Data Standard. ## Iterative improvements Iterative improvements are made outside of the release cycle. They do not involve changes to normative content. For more information, see [normative and non-normative content](../governance/index.md#normative-and-non-normative-content). -* [#184](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/184) - Fix broken schema browser. -* [#196](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/196) - Add link to the OFDS Convert, Validate, Explore tool (CoVE). -* [#197](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/197) - Update pull request template. +- [#184](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/184) - Fix broken schema browser. +- [#196](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/196) - Add link to the OFDS Convert, Validate, Explore tool (CoVE). +- [#197](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/197) - Update pull request template. ## 0.1.0-beta - 2022-11-10 ### Schema -* [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141) - Add `Span.fibreTypeDetails.fibreSubtype` field. -* [#144](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/144) - Clarify norms in the description of `links.start` and `links.end`. -* [#154](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/154) - Rename links to spans, related resources to links and pages to links. -* [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Correct erroneous reference in `Span.capacityDetails`. + +- [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141) - Add `Span.fibreTypeDetails.fibreSubtype` field. +- [#144](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/144) - Clarify norms in the description of `links.start` and `links.end`. +- [#154](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/154) - Rename links to spans, related resources to links and pages to links. +- [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Correct erroneous reference in `Span.capacityDetails`. + * [#157](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/157) - Use `links` to identify the version of the standard that describes the structure of the data. -* [#145](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/145) - Add validation rule for additional properties of `Geometry`. + +- [#145](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/145) - Add validation rule for additional properties of `Geometry`. + * [#168](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/168), [#173](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/173), [#180](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/180) - Update schema URLs. ### Codelists -* [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Add CSV file for organisationIdentifierScheme. +- [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Add CSV file for organisationIdentifierScheme. ### Normative documentation -* [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141): - * Update for latest schema. -* [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158): - * Refactor publication formats reference to reduce page length. - * Update schema reference: - * Add list of referencing properties for each component. - * Add more examples to schema reference. - * Update for latest schema. - * Add list of referencing properties for each codelist in codelist reference + +- [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141): + - Update for latest schema. +- [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158): + - Refactor publication formats reference to reduce page length. + - Update schema reference: + - Add list of referencing properties for each component. + - Add more examples to schema reference. + - Update for latest schema. + - Add list of referencing properties for each codelist in codelist reference + * [#180](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/180) - Collapse links in top-level schema reference table. ### Non-normative documentation -* [#140](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/140) - Update actor definitions in the primer, and include translatable text in SVGs. -* [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141): - * Update CSV template and examples to match latest schema. - * Update network package for latest schema. - * Update GeoJSON examples. -* [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158): - * Update CSV template and examples to match latest schema. - * Update network package for latest schema. - * Update GeoJSON examples. - * Remove unused blank JSON example. +- [#140](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/140) - Update actor definitions in the primer, and include translatable text in SVGs. +- [#141](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/141): + - Update CSV template and examples to match latest schema. + - Update network package for latest schema. + - Update GeoJSON examples. +- [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158): + - Update CSV template and examples to match latest schema. + - Update network package for latest schema. + - Update GeoJSON examples. + - Remove unused blank JSON example. + * [#168](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/168) - Update release and issue admonitions. * [#177](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/177): - * Add an invalid network package that fails validation against an instance of each validation keyword, type and format used in the schema - * Add a network package that does not conform to each normative rule that is not encoded in the schema + - Add an invalid network package that fails validation against an instance of each validation keyword, type and format used in the schema + - Add a network package that does not conform to each normative rule that is not encoded in the schema * [#180](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/180) - Update release admonition, fix notebook viewer link, fix links in Leaflet notebook. ### Build -* [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Update `manage.py`: - * Generate CSV publication format reference docs. - * Generate CSV template and examples. - * Generate schema reference documentation. - * Refactor - * Use OFDS Kit to generate GeoJSON examples. +- [#158](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/158) - Update `manage.py`: + - Generate CSV publication format reference docs. + - Generate CSV template and examples. + - Generate schema reference documentation. + - Refactor + - Use OFDS Kit to generate GeoJSON examples. + * [#168](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/pull/168) - Update version in `conf.py`. ## 0.1.0-alpha - 2022-09-22 -`0.1.0-alpha` was the first version of the standard. \ No newline at end of file +`0.1.0-alpha` was the first version of the standard. diff --git a/docs/primer/index.md b/docs/primer/index.md index 0a2ecbd..ab70de4 100644 --- a/docs/primer/index.md +++ b/docs/primer/index.md @@ -10,9 +10,9 @@ To comment on or create discussions and issues, you need to [sign up for a free This Primer provides an introduction to: -* [Open fibre data](openfibredata), the reasons for publishing it and the differences between maps and data. -* [The Open Fibre Data Standard](openfibredatastandard) (OFDS), the reasons for using it and what OFDS data looks like. -* [The scope of OFDS and key concepts](scopeandkeyconcepts) that you need to understand. +- [Open fibre data](openfibredata), the reasons for publishing it and the differences between maps and data. +- [The Open Fibre Data Standard](openfibredatastandard) (OFDS), the reasons for using it and what OFDS data looks like. +- [The scope of OFDS and key concepts](scopeandkeyconcepts) that you need to understand. Do you want to learn how to publish or use open fibre data? Read the [guidance](../guidance/index). diff --git a/docs/primer/scopeandkeyconcepts.md b/docs/primer/scopeandkeyconcepts.md index e51fd91..aeade5e 100644 --- a/docs/primer/scopeandkeyconcepts.md +++ b/docs/primer/scopeandkeyconcepts.md @@ -34,13 +34,13 @@ Depending on the [business model](#network-business-models) used in a network, t OFDS defines a physical infrastructure provider as: ->An organisation that owns and maintains passive network infrastructure, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites. +> An organisation that owns and maintains passive network infrastructure, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites. #### Network provider OFDS defines a network provider as: ->An organisation that operates the active network infrastructure, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure. +> An organisation that operates the active network infrastructure, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure. #### Service provider diff --git a/docs/reference/codelists.md b/docs/reference/codelists.md index 818d2c9..098c311 100644 --- a/docs/reference/codelists.md +++ b/docs/reference/codelists.md @@ -31,7 +31,8 @@ Codes are case-sensitive, and are generally provided as English language camelCa The contract type codelist is used to categorise contracts based on the World Bank PPPLRC's [types of PPP arrangement](https://ppp.worldbank.org/public-private-partnership/agreements). This codelist is referenced by the following properties: -* [`Contract/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,type) + +- [`Contract/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,type) This codelist has the following codes: @@ -46,7 +47,8 @@ This codelist has the following codes: The language codelist is used to provide the default language used in text fields and the language of linked documents, using two-letter codes from ISO639-1. This codelist is referenced by the following properties: -* [`language`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,language) + +- [`language`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,language) This codelist has the following codes: @@ -61,7 +63,8 @@ This codelist has the following codes: The link relation type codelist consists of extensions to the [IANA Link Relationship Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1) constructed according to the [tag URI scheme](https://www.rfc-editor.org/rfc/rfc4151). This codelist is referenced by the following properties: -* [`Link/rel`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Link,rel) + +- [`Link/rel`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Link,rel) This codelist has the following codes: @@ -76,7 +79,8 @@ This codelist has the following codes: The mediaType codelist is based on the [IANA Media Types list](https://www.iana.org/assignments/media-types/media-types.xhtml). The media type codelist adds an exceptional code for printed documents ('offline/print'), and omits any media type that is marked as deprecated or obsolete by IANA. This codelist is referenced by the following properties: -* [`Document/format`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Document,format) + +- [`Document/format`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Document,format) This codelist has the following codes: @@ -91,7 +95,8 @@ This codelist has the following codes: The node technologies codelist is used to indicate the technologies used in a node. This codelist is referenced by the following properties: -* [`Node/technologies`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,technologies) + +- [`Node/technologies`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,technologies) This codelist has the following codes: @@ -106,7 +111,8 @@ This codelist has the following codes: The node type codelist is used to categorise the nodes in a network. This codelist is referenced by the following properties: -* [`Node/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,type) + +- [`Node/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,type) This codelist has the following codes: @@ -121,7 +127,8 @@ This codelist has the following codes: The organisation identifier scheme codelist uses the codes from [org-id.guide](http://org-id.guide/) to identify the register from which an organisation's identifier is drawn. You can search for codes by browsing the website or you can download the latest version of the codelist as a [CSV file](http://org-id.guide/download.csv). This codelist is referenced by the following properties: -* [`Identifier/scheme`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Identifier,scheme) + +- [`Identifier/scheme`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Identifier,scheme) This codelist has the following codes: @@ -136,7 +143,8 @@ This codelist has the following codes: The organisation role codelist is used to identify an organisation's roles in a network. An organisation can have one or more roles. This codelist is referenced by the following properties: -* [`Organisation/roles`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,roles) + +- [`Organisation/roles`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,roles) This codelist has the following codes: @@ -151,7 +159,8 @@ This codelist has the following codes: The span technologies codelist is used to indicate the technologies used on a span. This codelist is referenced by the following properties: -* [`Span/technologies`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,technologies) + +- [`Span/technologies`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,technologies) This codelist has the following codes: @@ -168,9 +177,10 @@ This codelist has the following codes: The country codelist uses uppercase two-letter codes from [ISO3166-1](https://www.iso.org/iso-3166-country-codes.html). The country codelist adds a user-assigned code for Kosovo ('XK'). This codelist is referenced by the following properties: -* [`Span/countries`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,countries) -* [`Organisation/country`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,country) -* [`Address/country`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Address,country) + +- [`Span/countries`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,countries) +- [`Organisation/country`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,country) +- [`Address/country`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Address,country) This codelist has the following codes: @@ -185,7 +195,8 @@ This codelist has the following codes: The currency codelist uses uppercase 3-letter codes from [ISO4217](https://www.iso.org/iso-4217-currency-codes.html). This codelist is referenced by the following properties: -* [`Value/currency`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Value,currency) + +- [`Value/currency`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Value,currency) This codelist has the following codes: @@ -200,7 +211,8 @@ This codelist has the following codes: The deployment codelist is used to categorise the deployment of spans. This codelist is referenced by the following properties: -* [`Span/deployment`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,deployment) + +- [`Span/deployment`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,deployment) This codelist has the following codes: @@ -215,7 +227,8 @@ This codelist has the following codes: The fibre type codelist is a subset of [ITU-T recommendations](https://www.itu.int/rec/T-REC-G/en) that describe characteristics of optical fibre and cables. It is used to categorise the type of fibre used in a span. This codelist is referenced by the following properties: -* [`Span/fibreType`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,fibreType) + +- [`Span/fibreType`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,fibreType) This codelist has the following codes: @@ -230,7 +243,8 @@ This codelist has the following codes: The geometry type codelist is used to categorise the type of geometry represented by the geometry object. This codelist is referenced by the following properties: -* [`Geometry/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Geometry,type) + +- [`Geometry/type`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Geometry,type) This codelist has the following codes: @@ -245,7 +259,8 @@ This codelist has the following codes: The node status codelist is used to identify the operational status of a node. This codelist is referenced by the following properties: -* [`Node/status`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,status) + +- [`Node/status`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,status) This codelist has the following codes: @@ -260,7 +275,8 @@ This codelist has the following codes: The span status codelist is used to indicate the operational status of a span. This codelist is referenced by the following properties: -* [`Span/status`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,status) + +- [`Span/status`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,status) This codelist has the following codes: @@ -275,7 +291,8 @@ This codelist has the following codes: The transmission medium codelist is used to categorise the physical media of a span. This codelist is referenced by the following properties: -* [`Span/transmissionMedium`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,transmissionMedium) + +- [`Span/transmissionMedium`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,transmissionMedium) This codelist has the following codes: @@ -284,4 +301,3 @@ This codelist has the following codes: :widths: auto :file: ../../codelists/closed/transmissionMedium.csv ``` - diff --git a/docs/reference/identifiers.md b/docs/reference/identifiers.md index c39cf44..63535e1 100644 --- a/docs/reference/identifiers.md +++ b/docs/reference/identifiers.md @@ -14,8 +14,8 @@ In OFDS, there are two types of identifier: global identifiers and local identif The following identifiers are globally unique: -* [Network identifier](#network-identifier) -* [Organisation identifiers](#organisation-identifiers) +- [Network identifier](#network-identifier) +- [Organisation identifiers](#organisation-identifiers) ### Network identifier diff --git a/docs/reference/publication_formats/geojson.md b/docs/reference/publication_formats/geojson.md index 653b69b..62dc5e5 100644 --- a/docs/reference/publication_formats/geojson.md +++ b/docs/reference/publication_formats/geojson.md @@ -138,4 +138,4 @@ Get the `Node` object in `nodes` whose `.id` is equal to the ID. ### Reference implementation -A reference implementation of the transformation is [available in Python on Github](https://github.com/Open-Telecoms-Data/open-fibre-data-standard/blob/main/manage.py). We strongly encourage any re-implementations to read its commented code, to ensure correctness. +A reference implementation of the transformation is [available in Python on Github](https://github.com/Open-Telecoms-Data/lib-cove-ofds/). We strongly encourage any re-implementations to read its commented code, to ensure correctness. diff --git a/docs/reference/schema.md b/docs/reference/schema.md index 5d1d9ee..7b9e26c 100644 --- a/docs/reference/schema.md +++ b/docs/reference/schema.md @@ -10,7 +10,7 @@ To comment on or create discussions and issues, you need to [sign up for a free The schema provides the authoritative definition of the structure of Open Fibre Data Standard (OFDS) data, the meaning of each field, and the rules that must be followed to publish OFDS data. It is used to validate the structure and format of OFDS data. -For this version of OFDS, the canonical URL of the schema is [https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json](https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/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. +For this version of OFDS, the canonical URL of the schema is [https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0\_\_1\_\_0\_\_beta/schema/network-schema.json](https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/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). @@ -22,7 +22,7 @@ This page presents the schema in an [interactive browser](#browser) and in [refe Click on schema elements to expand the tree, or use the '+' icon to expand all elements. Use { } to view the underlying schema for any section. Required fields are indicated in **bold**. - + ## Reference tables @@ -32,11 +32,11 @@ This section presents each field in the schema in tables with additional informa This section describes the overall structure of the OFDS schema. The top-level object in OFDS data is a `Network`. A network has the following sections: -* [Nodes](#nodes) -* [Spans](#spans) -* [Phases](#phases) -* [Organisations](#organisations) -* [Contracts](#contracts) +- [Nodes](#nodes) +- [Spans](#spans) +- [Phases](#phases) +- [Organisations](#organisations) +- [Contracts](#contracts) In addition to the above sections, there are several top-level metadata fields: @@ -113,7 +113,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`nodes`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,nodes) + +- [`nodes`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,nodes) Each `Node` has the following fields: @@ -161,7 +162,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`spans`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,spans) + +- [`spans`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,spans) Each `Span` has the following fields: @@ -197,7 +199,8 @@ Each `Span` has the following fields: ``` This component is referenced by the following properties: -* [`phases`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,phases) + +- [`phases`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,phases) Each `Phase` has the following fields: @@ -238,8 +241,9 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`organisations`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,organisations) -* [`publisher`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,publisher) + +- [`organisations`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,organisations) +- [`publisher`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,publisher) Each `Organisation` has the following fields: @@ -286,7 +290,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`contracts`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,contracts) + +- [`contracts`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,contracts) Each `Contract` has the following fields: @@ -322,8 +327,9 @@ Each `Contract` has the following fields: ``` This component is referenced by the following properties: -* [`Node/location`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,location) -* [`Span/route`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,route) + +- [`Node/location`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,location) +- [`Span/route`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,route) Each `Geometry` has the following fields: @@ -365,12 +371,13 @@ Each `Geometry` has the following fields: ``` This component is referenced by the following properties: -* [`Node/physicalInfrastructureProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,physicalInfrastructureProvider) -* [`Node/networkProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,networkProvider) -* [`Span/physicalInfrastructureProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,physicalInfrastructureProvider) -* [`Span/networkProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,networkProvider) -* [`Span/supplier`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,supplier) -* [`Phase/funders`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Phase,funders) + +- [`Node/physicalInfrastructureProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,physicalInfrastructureProvider) +- [`Node/networkProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,networkProvider) +- [`Span/physicalInfrastructureProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,physicalInfrastructureProvider) +- [`Span/networkProvider`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,networkProvider) +- [`Span/supplier`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,supplier) +- [`Phase/funders`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Phase,funders) Each `OrganisationReference` has the following fields: @@ -436,9 +443,10 @@ Each `OrganisationReference` has the following fields: ``` This component is referenced by the following properties: -* [`Node/phase`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,phase) -* [`Span/phase`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,phase) -* [`Contract/relatedPhases`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,relatedPhases) + +- [`Node/phase`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,phase) +- [`Span/phase`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,phase) +- [`Contract/relatedPhases`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,relatedPhases) Each `PhaseReference` has the following fields: @@ -486,8 +494,9 @@ Each `PhaseReference` has the following fields: ``` This component is referenced by the following properties: -* [`Node/address`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,address) -* [`Node/internationalConnections`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,internationalConnections) + +- [`Node/address`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,address) +- [`Node/internationalConnections`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Node,internationalConnections) Each `Address` has the following fields: @@ -529,7 +538,8 @@ Each `Address` has the following fields: ``` This component is referenced by the following properties: -* [`Contract/value`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,value) + +- [`Contract/value`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,value) Each `Value` has the following fields: @@ -565,7 +575,8 @@ Each `Value` has the following fields: ``` This component is referenced by the following properties: -* [`Contract/documents`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,documents) + +- [`Contract/documents`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Contract,documents) Each `Document` has the following fields: @@ -601,7 +612,8 @@ Each `Document` has the following fields: ``` This component is referenced by the following properties: -* [`Organisation/identifier`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,identifier) + +- [`Organisation/identifier`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Organisation,identifier) Each `Identifier` has the following fields: @@ -638,12 +650,12 @@ Each `Identifier` has the following fields: Coordinates in all OFDS data must be specified in the coordinate reference system [required by GeoJSON](https://datatracker.ietf.org/doc/html/rfc7946#section-4): -> The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84. +> The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 [WGS 84](https://datatracker.ietf.org/doc/html/rfc7946#ref-WGS84) datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84. The `CoordinateReferenceSystem` object references the CRS by `name` and `uri`. Its properties must be set to the following values: -* `name`: urn:ogc:def:crs:OGC::CRS84 -* `uri`: +- `name`: urn:ogc:def:crs:OGC::CRS84 +- `uri`: `urn:ogc:def:crs:OGC::CRS84` denotes WGS84 with the order longitude, latitude. It is equivalent to EPSG:4326 with reversed axes. @@ -661,7 +673,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`crs`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,crs) + +- [`crs`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,crs) Each `CoordinateReferenceSystem` has the following fields: @@ -703,7 +716,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`links`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,links) + +- [`links`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,,links) Each `Link` has the following fields: @@ -739,7 +753,8 @@ Each `Link` has the following fields: ``` This component is referenced by the following properties: -* [`Span/fibreTypeDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,fibreTypeDetails) + +- [`Span/fibreTypeDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,fibreTypeDetails) Each `FibreTypeDetails` has the following fields: @@ -780,7 +795,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`Span/deploymentDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,deploymentDetails) + +- [`Span/deploymentDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,deploymentDetails) Each `DeploymentDetails` has the following fields: @@ -821,7 +837,8 @@ The following issues relate to this component or its fields: ``` This component is referenced by the following properties: -* [`Span/capacityDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,capacityDetails) + +- [`Span/capacityDetails`](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/schema.html#network-schema.json,/definitions/Span,capacityDetails) Each `CapacityDetails` has the following fields: @@ -847,4 +864,3 @@ Each `CapacityDetails` has the following fields: ::: :::: - diff --git a/examples/csv/contracts.csv b/examples/csv/contracts.csv index c38ca6a..765ab6c 100644 --- a/examples/csv/contracts.csv +++ b/examples/csv/contracts.csv @@ -1,2 +1,2 @@ -id,contracts/0/id,contracts/0/title,contracts/0/description,contracts/0/type,contracts/0/value/amount,contracts/0/value/currency,contracts/0/dateSigned -a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1 Construction Contract,Contract for the construction of phase 1 of the NextGen network.,private,1537459500.00,GHS,2016-06-30 +id,contracts/0/id,contracts/0/title,contracts/0/description,contracts/0/type,contracts/0/value/amount,contracts/0/value/currency,contracts/0/dateSigned +a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1 Construction Contract,Contract for the construction of phase 1 of the NextGen network.,private,1537459500.0,GHS,2016-06-30 diff --git a/examples/csv/contracts_documents.csv b/examples/csv/contracts_documents.csv index 30d0a9a..3b09293 100644 --- a/examples/csv/contracts_documents.csv +++ b/examples/csv/contracts_documents.csv @@ -1,2 +1,2 @@ -id,contracts/0/id,contracts/0/documents/0/title,contracts/0/documents/0/description,contracts/0/documents/0/url,contracts/0/documents/0/format -a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1 Construction Contract,Signed contract.,http://example.com/contracts/nextgen-phase1-construction.pdf,application/pdf +id,contracts/0/id,contracts/0/documents/0/title,contracts/0/documents/0/description,contracts/0/documents/0/url,contracts/0/documents/0/format +a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1 Construction Contract,Signed contract.,http://example.com/contracts/nextgen-phase1-construction.pdf,application/pdf diff --git a/examples/csv/contracts_relatedPhases.csv b/examples/csv/contracts_relatedPhases.csv index bf38581..9e837e5 100644 --- a/examples/csv/contracts_relatedPhases.csv +++ b/examples/csv/contracts_relatedPhases.csv @@ -1,2 +1,2 @@ -id,contracts/0/id,contracts/0/relatedPhases/0/id,contracts/0/relatedPhases/0/name -a096d627-72e1-4f9b-b129-951b1737bff4,1,1,NextGen Phase 1 +id,contracts/0/id,contracts/0/relatedPhases/0/id,contracts/0/relatedPhases/0/name +a096d627-72e1-4f9b-b129-951b1737bff4,1,1,NextGen Phase 1 diff --git a/examples/csv/links.csv b/examples/csv/links.csv index f239346..29ab953 100644 --- a/examples/csv/links.csv +++ b/examples/csv/links.csv @@ -1,2 +1,2 @@ -id,links/0/href,links/0/rel -a096d627-72e1-4f9b-b129-951b1737bff4,https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json,describedby +id,links/0/href,links/0/rel +a096d627-72e1-4f9b-b129-951b1737bff4,https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json,describedby diff --git a/examples/csv/networks.csv b/examples/csv/networks.csv index 9f8e656..9eabb73 100644 --- a/examples/csv/networks.csv +++ b/examples/csv/networks.csv @@ -1,2 +1,2 @@ -id,name,website,publisher/id,publisher/name,publisher/identifier/id,publisher/identifier/scheme,publisher/identifier/legalName,publisher/identifier/uri,publisher/country,publisher/roles,publisher/roleDetails,publisher/website,publisher/logo,publicationDate,collectionDate,crs/name,crs/uri,accuracy,accuracyDetails,language -a096d627-72e1-4f9b-b129-951b1737bff4,Ghana Fibre Network,http://example.com/network,GH-RGD-CS111111111,FibreCo,CS111111111,GH-RGD,FibreCo Ghana Limited,https://example.com/companies/CS111111111,GH,,,https://www.example.com,https://www.example.com/logo.png,2022-01-01,2021-09-30,urn:ogc:def:crs:OGC::CRS84,http://www.opengis.net/def/crs/OGC/1.3/CRS84,250,Measured according to the US National Standard for Spatial Data Accuracy.,en +id,name,website,publisher/id,publisher/name,publisher/identifier/id,publisher/identifier/scheme,publisher/identifier/legalName,publisher/identifier/uri,publisher/country,publisher/roles,publisher/roleDetails,publisher/website,publisher/logo,publicationDate,collectionDate,crs/name,crs/uri,accuracy,accuracyDetails,language +a096d627-72e1-4f9b-b129-951b1737bff4,Ghana Fibre Network,http://example.com/network,GH-RGD-CS111111111,FibreCo,CS111111111,GH-RGD,FibreCo Ghana Limited,https://example.com/companies/CS111111111,GH,,,https://www.example.com,https://www.example.com/logo.png,2022-01-01,2021-09-30,urn:ogc:def:crs:OGC::CRS84,http://www.opengis.net/def/crs/OGC/1.3/CRS84,250,Measured according to the US National Standard for Spatial Data Accuracy.,en diff --git a/examples/csv/nodes.csv b/examples/csv/nodes.csv index 65474ca..d446b1c 100644 --- a/examples/csv/nodes.csv +++ b/examples/csv/nodes.csv @@ -1,3 +1,3 @@ -id,nodes/0/id,nodes/0/name,nodes/0/phase/id,nodes/0/phase/name,nodes/0/status,nodes/0/location/type,nodes/0/location/coordinates,nodes/0/address/streetAddress,nodes/0/address/locality,nodes/0/address/region,nodes/0/address/postalCode,nodes/0/address/country,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider/id,nodes/0/physicalInfrastructureProvider/name,nodes/0/networkProvider/id,nodes/0/networkProvider/name -a096d627-72e1-4f9b-b129-951b1737bff4,1,Accra,1,NextGen Phase 1,operational,Point,-0.174;5.625,Boundary Rd,Shiashie,Accra,12345,GH,pop,True,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb -a096d627-72e1-4f9b-b129-951b1737bff4,2,Kumasi,1,NextGen Phase 1,operational,Point,-1.628;6.711,Kejetia Road,Bantama,Kumasi,00000,GH,pop,False,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb +id,nodes/0/id,nodes/0/name,nodes/0/phase/id,nodes/0/phase/name,nodes/0/status,nodes/0/location/type,nodes/0/location/coordinates,nodes/0/address/streetAddress,nodes/0/address/locality,nodes/0/address/region,nodes/0/address/postalCode,nodes/0/address/country,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider/id,nodes/0/physicalInfrastructureProvider/name,nodes/0/networkProvider/id,nodes/0/networkProvider/name +a096d627-72e1-4f9b-b129-951b1737bff4,1,Accra,1,NextGen Phase 1,operational,Point,-0.174;5.625,Boundary Rd,Shiashie,Accra,12345,GH,pop,True,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb +a096d627-72e1-4f9b-b129-951b1737bff4,2,Kumasi,1,NextGen Phase 1,operational,Point,-1.628;6.711,Kejetia Road,Bantama,Kumasi,00000,GH,pop,False,True,ip,GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb diff --git a/examples/csv/nodes_internationalConnections.csv b/examples/csv/nodes_internationalConnections.csv index 6546dcd..3324cb3 100644 --- a/examples/csv/nodes_internationalConnections.csv +++ b/examples/csv/nodes_internationalConnections.csv @@ -1,2 +1,2 @@ -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 -a096d627-72e1-4f9b-b129-951b1737bff4,1,,,Lomé,,TG +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 +a096d627-72e1-4f9b-b129-951b1737bff4,1,,,Lomé,,TG diff --git a/examples/csv/organisations.csv b/examples/csv/organisations.csv index 04397ea..4ea9e18 100644 --- a/examples/csv/organisations.csv +++ b/examples/csv/organisations.csv @@ -1,5 +1,5 @@ -id,organisations/0/id,organisations/0/name,organisations/0/identifier/id,organisations/0/identifier/scheme,organisations/0/identifier/legalName,organisations/0/identifier/uri,organisations/0/country,organisations/0/roles,organisations/0/roleDetails,organisations/0/website,organisations/0/logo -a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS111111111,FibreCo,CS111111111,GH-RGD,FibreCo Ghana Limited,https://example.com/companies/CS111111111,GH,physicalInfrastructureProvider,FibreCo owns and maintains the physical infrastructure.,https://www.example.com,https://www.example.com/logo.png -a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS222222222,FastWeb,CS222222222,GH-RGD,FastWeb Ghana Limited,https://example.com/companies/CS222222222,GH,networkProvider,FastWeb provides wholesale services to service providers and dark fibre access to other network providers.,https://www.example.com,https://www.example.com/logo.png -a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS333333333,ProjectCo,CS333333333,GH-RGD,ProjectCo Ghana Limited,https://example.com/companies/CS333333333,GH,supplier,ProjectCo was responsible for the construction of phase 1 of the NextGen network.,https://www.example.com,https://www.example.com/logo.png -a096d627-72e1-4f9b-b129-951b1737bff4,1,Ghana Infrastructure Investment Fund,,,,,GH,funder,The Ghana Infrastructure Investment Fund provided equity financing for the construction of phase 1 of the NextGen network.,https://www.example.com,https://www.example.com/logo.png +id,organisations/0/id,organisations/0/name,organisations/0/identifier/id,organisations/0/identifier/scheme,organisations/0/identifier/legalName,organisations/0/identifier/uri,organisations/0/country,organisations/0/roles,organisations/0/roleDetails,organisations/0/website,organisations/0/logo +a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS111111111,FibreCo,CS111111111,GH-RGD,FibreCo Ghana Limited,https://example.com/companies/CS111111111,GH,physicalInfrastructureProvider,FibreCo owns and maintains the physical infrastructure.,https://www.example.com,https://www.example.com/logo.png +a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS222222222,FastWeb,CS222222222,GH-RGD,FastWeb Ghana Limited,https://example.com/companies/CS222222222,GH,networkProvider,FastWeb provides wholesale services to service providers and dark fibre access to other network providers.,https://www.example.com,https://www.example.com/logo.png +a096d627-72e1-4f9b-b129-951b1737bff4,GH-RGD-CS333333333,ProjectCo,CS333333333,GH-RGD,ProjectCo Ghana Limited,https://example.com/companies/CS333333333,GH,supplier,ProjectCo was responsible for the construction of phase 1 of the NextGen network.,https://www.example.com,https://www.example.com/logo.png +a096d627-72e1-4f9b-b129-951b1737bff4,1,Ghana Infrastructure Investment Fund,,,,,GH,funder,The Ghana Infrastructure Investment Fund provided equity financing for the construction of phase 1 of the NextGen network.,https://www.example.com,https://www.example.com/logo.png diff --git a/examples/csv/phases.csv b/examples/csv/phases.csv index 48d54c3..ff530fb 100644 --- a/examples/csv/phases.csv +++ b/examples/csv/phases.csv @@ -1,2 +1,2 @@ -id,phases/0/id,phases/0/name,phases/0/description -a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1,The first phase of the Ghana Fibre Network NextGen roll-out. +id,phases/0/id,phases/0/name,phases/0/description +a096d627-72e1-4f9b-b129-951b1737bff4,1,NextGen Phase 1,The first phase of the Ghana Fibre Network NextGen roll-out. diff --git a/examples/csv/phases_funders.csv b/examples/csv/phases_funders.csv index acac887..adeb51d 100644 --- a/examples/csv/phases_funders.csv +++ b/examples/csv/phases_funders.csv @@ -1,2 +1,2 @@ -id,phases/0/id,phases/0/funders/0/id,phases/0/funders/0/name -a096d627-72e1-4f9b-b129-951b1737bff4,1,1,Ghana Infrastructure Investment Fund +id,phases/0/id,phases/0/funders/0/id,phases/0/funders/0/name +a096d627-72e1-4f9b-b129-951b1737bff4,1,1,Ghana Infrastructure Investment Fund diff --git a/examples/csv/spans.csv b/examples/csv/spans.csv index a459bbc..cf5fb07 100644 --- a/examples/csv/spans.csv +++ b/examples/csv/spans.csv @@ -1,2 +1,2 @@ -id,spans/0/id,spans/0/name,spans/0/phase/id,spans/0/phase/name,spans/0/status,spans/0/readyForServiceDate,spans/0/start,spans/0/end,spans/0/directed,spans/0/route/type,spans/0/route/coordinates,spans/0/physicalInfrastructureProvider/id,spans/0/physicalInfrastructureProvider/name,spans/0/networkProvider/id,spans/0/networkProvider/name,spans/0/supplier/id,spans/0/supplier/name,spans/0/transmissionMedium,spans/0/deployment,spans/0/deploymentDetails/description,spans/0/darkFibre,spans/0/fibreType,spans/0/fibreTypeDetails/fibreSubtype,spans/0/fibreTypeDetails/description,spans/0/fibreCount,spans/0/fibreLength,spans/0/technologies,spans/0/capacity,spans/0/capacityDetails/description,spans/0/countries -a096d627-72e1-4f9b-b129-951b1737bff4,1,Accra to Kumasi,1,NextGen Phase 1,operational,2018-01-01,1,2,False,LineString,"-0.173,5.626;-0.178,5.807;-0.112,5.971;-0.211,5.963;-0.321,6.170;-0.488,6.290;-0.560,6.421;-0.752,6.533;-0.867,6.607;-1.101,6.585;-1.304,6.623;-1.461,6.727;-1.628,6.713",GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb,GH-RGD-CS333333333,ProjectCo,fibre,belowGround,Buried in ducts,True,G.652,G.652.D,"CABLED STANDARD ENHANCED SINGLEMODE FIBRE ESMF, LOW WATER PEAK SINGLE MODE FIBRE G.652.D, OS2",24,276000,sdh,4.976,2xSTM-16,GH +id,spans/0/id,spans/0/name,spans/0/phase/id,spans/0/phase/name,spans/0/status,spans/0/readyForServiceDate,spans/0/start,spans/0/end,spans/0/directed,spans/0/route/type,spans/0/route/coordinates,spans/0/physicalInfrastructureProvider/id,spans/0/physicalInfrastructureProvider/name,spans/0/networkProvider/id,spans/0/networkProvider/name,spans/0/supplier/id,spans/0/supplier/name,spans/0/transmissionMedium,spans/0/deployment,spans/0/deploymentDetails/description,spans/0/darkFibre,spans/0/fibreType,spans/0/fibreTypeDetails/fibreSubtype,spans/0/fibreTypeDetails/description,spans/0/fibreCount,spans/0/fibreLength,spans/0/technologies,spans/0/capacity,spans/0/capacityDetails/description,spans/0/countries +a096d627-72e1-4f9b-b129-951b1737bff4,1,Accra to Kumasi,1,NextGen Phase 1,operational,2018-01-01,1,2,False,LineString,"-0.173,5.626;-0.178,5.807;-0.112,5.971;-0.211,5.963;-0.321,6.17;-0.488,6.29;-0.56,6.421;-0.752,6.533;-0.867,6.607;-1.101,6.585;-1.304,6.623;-1.461,6.727;-1.628,6.713",GH-RGD-CS111111111,FibreCo,GH-RGD-CS222222222,FastWeb,GH-RGD-CS333333333,ProjectCo,fibre,belowGround,Buried in ducts,True,G.652,G.652.D,"CABLED STANDARD ENHANCED SINGLEMODE FIBRE ESMF, LOW WATER PEAK SINGLE MODE FIBRE G.652.D, OS2",24,276000,sdh,4.976,2xSTM-16,GH diff --git a/examples/csv/template/contracts.csv b/examples/csv/template/contracts.csv index 4a20e6c..c84421b 100644 --- a/examples/csv/template/contracts.csv +++ b/examples/csv/template/contracts.csv @@ -1 +1 @@ -id,contracts/0/id,contracts/0/title,contracts/0/description,contracts/0/type,contracts/0/value/amount,contracts/0/value/currency,contracts/0/dateSigned +id,contracts/0/id,contracts/0/title,contracts/0/description,contracts/0/type,contracts/0/value/amount,contracts/0/value/currency,contracts/0/dateSigned diff --git a/examples/csv/template/contracts_documents.csv b/examples/csv/template/contracts_documents.csv index 30955bf..d807af5 100644 --- a/examples/csv/template/contracts_documents.csv +++ b/examples/csv/template/contracts_documents.csv @@ -1 +1 @@ -id,contracts/0/id,contracts/0/documents/0/title,contracts/0/documents/0/description,contracts/0/documents/0/url,contracts/0/documents/0/format +id,contracts/0/id,contracts/0/documents/0/title,contracts/0/documents/0/description,contracts/0/documents/0/url,contracts/0/documents/0/format diff --git a/examples/csv/template/contracts_relatedPhases.csv b/examples/csv/template/contracts_relatedPhases.csv index b60910c..8607aaf 100644 --- a/examples/csv/template/contracts_relatedPhases.csv +++ b/examples/csv/template/contracts_relatedPhases.csv @@ -1 +1 @@ -id,contracts/0/id,contracts/0/relatedPhases/0/id,contracts/0/relatedPhases/0/name +id,contracts/0/id,contracts/0/relatedPhases/0/id,contracts/0/relatedPhases/0/name diff --git a/examples/csv/template/links.csv b/examples/csv/template/links.csv index 2c4c671..092b444 100644 --- a/examples/csv/template/links.csv +++ b/examples/csv/template/links.csv @@ -1 +1 @@ -id,links/0/href,links/0/rel +id,links/0/href,links/0/rel diff --git a/examples/csv/template/networks.csv b/examples/csv/template/networks.csv index 31c4bbd..3243956 100644 --- a/examples/csv/template/networks.csv +++ b/examples/csv/template/networks.csv @@ -1 +1 @@ -id,name,website,publisher/id,publisher/name,publisher/identifier/id,publisher/identifier/scheme,publisher/identifier/legalName,publisher/identifier/uri,publisher/country,publisher/roles,publisher/roleDetails,publisher/website,publisher/logo,publicationDate,collectionDate,crs/name,crs/uri,accuracy,accuracyDetails,language +id,name,website,publisher/id,publisher/name,publisher/identifier/id,publisher/identifier/scheme,publisher/identifier/legalName,publisher/identifier/uri,publisher/country,publisher/roles,publisher/roleDetails,publisher/website,publisher/logo,publicationDate,collectionDate,crs/name,crs/uri,accuracy,accuracyDetails,language diff --git a/examples/csv/template/nodes.csv b/examples/csv/template/nodes.csv index 3822065..3d410df 100644 --- a/examples/csv/template/nodes.csv +++ b/examples/csv/template/nodes.csv @@ -1 +1 @@ -id,nodes/0/id,nodes/0/name,nodes/0/phase/id,nodes/0/phase/name,nodes/0/status,nodes/0/location/type,nodes/0/location/coordinates,nodes/0/address/streetAddress,nodes/0/address/locality,nodes/0/address/region,nodes/0/address/postalCode,nodes/0/address/country,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider/id,nodes/0/physicalInfrastructureProvider/name,nodes/0/networkProvider/id,nodes/0/networkProvider/name +id,nodes/0/id,nodes/0/name,nodes/0/phase/id,nodes/0/phase/name,nodes/0/status,nodes/0/location/type,nodes/0/location/coordinates,nodes/0/address/streetAddress,nodes/0/address/locality,nodes/0/address/region,nodes/0/address/postalCode,nodes/0/address/country,nodes/0/type,nodes/0/accessPoint,nodes/0/power,nodes/0/technologies,nodes/0/physicalInfrastructureProvider/id,nodes/0/physicalInfrastructureProvider/name,nodes/0/networkProvider/id,nodes/0/networkProvider/name diff --git a/examples/csv/template/nodes_internationalConnections.csv b/examples/csv/template/nodes_internationalConnections.csv index 8aed12d..85e4d0f 100644 --- a/examples/csv/template/nodes_internationalConnections.csv +++ b/examples/csv/template/nodes_internationalConnections.csv @@ -1 +1 @@ -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 +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 diff --git a/examples/csv/template/organisations.csv b/examples/csv/template/organisations.csv index bd69c0d..4022469 100644 --- a/examples/csv/template/organisations.csv +++ b/examples/csv/template/organisations.csv @@ -1 +1 @@ -id,organisations/0/id,organisations/0/name,organisations/0/identifier/id,organisations/0/identifier/scheme,organisations/0/identifier/legalName,organisations/0/identifier/uri,organisations/0/country,organisations/0/roles,organisations/0/roleDetails,organisations/0/website,organisations/0/logo +id,organisations/0/id,organisations/0/name,organisations/0/identifier/id,organisations/0/identifier/scheme,organisations/0/identifier/legalName,organisations/0/identifier/uri,organisations/0/country,organisations/0/roles,organisations/0/roleDetails,organisations/0/website,organisations/0/logo diff --git a/examples/csv/template/phases.csv b/examples/csv/template/phases.csv index 1b8927f..28db90f 100644 --- a/examples/csv/template/phases.csv +++ b/examples/csv/template/phases.csv @@ -1 +1 @@ -id,phases/0/id,phases/0/name,phases/0/description +id,phases/0/id,phases/0/name,phases/0/description diff --git a/examples/csv/template/phases_funders.csv b/examples/csv/template/phases_funders.csv index 302d9c6..117aba3 100644 --- a/examples/csv/template/phases_funders.csv +++ b/examples/csv/template/phases_funders.csv @@ -1 +1 @@ -id,phases/0/id,phases/0/funders/0/id,phases/0/funders/0/name +id,phases/0/id,phases/0/funders/0/id,phases/0/funders/0/name diff --git a/examples/csv/template/spans.csv b/examples/csv/template/spans.csv index 813573d..36dfa8b 100644 --- a/examples/csv/template/spans.csv +++ b/examples/csv/template/spans.csv @@ -1 +1 @@ -id,spans/0/id,spans/0/name,spans/0/phase/id,spans/0/phase/name,spans/0/status,spans/0/readyForServiceDate,spans/0/start,spans/0/end,spans/0/directed,spans/0/route/type,spans/0/route/coordinates,spans/0/physicalInfrastructureProvider/id,spans/0/physicalInfrastructureProvider/name,spans/0/networkProvider/id,spans/0/networkProvider/name,spans/0/supplier/id,spans/0/supplier/name,spans/0/transmissionMedium,spans/0/deployment,spans/0/deploymentDetails/description,spans/0/darkFibre,spans/0/fibreType,spans/0/fibreTypeDetails/fibreSubtype,spans/0/fibreTypeDetails/description,spans/0/fibreCount,spans/0/fibreLength,spans/0/technologies,spans/0/capacity,spans/0/capacityDetails/description,spans/0/countries +id,spans/0/id,spans/0/name,spans/0/phase/id,spans/0/phase/name,spans/0/status,spans/0/readyForServiceDate,spans/0/start,spans/0/end,spans/0/directed,spans/0/route/type,spans/0/route/coordinates,spans/0/physicalInfrastructureProvider/id,spans/0/physicalInfrastructureProvider/name,spans/0/networkProvider/id,spans/0/networkProvider/name,spans/0/supplier/id,spans/0/supplier/name,spans/0/transmissionMedium,spans/0/deployment,spans/0/deploymentDetails/description,spans/0/darkFibre,spans/0/fibreType,spans/0/fibreTypeDetails/fibreSubtype,spans/0/fibreTypeDetails/description,spans/0/fibreCount,spans/0/fibreLength,spans/0/technologies,spans/0/capacity,spans/0/capacityDetails/description,spans/0/countries diff --git a/examples/json/api-response.json b/examples/json/api-response.json index 89d0bfc..b5b4419 100644 --- a/examples/json/api-response.json +++ b/examples/json/api-response.json @@ -25,4 +25,4 @@ "next": "http://example.com/networks?cursor=100", "prev": "http://example.com/networks?cursor=96" } -} \ No newline at end of file +} diff --git a/examples/json/multiple-networks.json b/examples/json/multiple-networks.json index 2e3a9c8..79cdbb2 100644 --- a/examples/json/multiple-networks.json +++ b/examples/json/multiple-networks.json @@ -21,4 +21,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/network-embedded.json b/examples/json/network-embedded.json index e058f55..db3500c 100644 --- a/examples/json/network-embedded.json +++ b/examples/json/network-embedded.json @@ -14,4 +14,4 @@ "href": "https://raw.githubusercontent.com/Open-Telecoms-Data/open-fibre-data-standard/0__1__0__beta/schema/network-schema.json" } ] -} \ No newline at end of file +} diff --git a/examples/json/network-package-additional-checks.json b/examples/json/network-package-additional-checks.json index bc02dbf..c73843f 100644 --- a/examples/json/network-package-additional-checks.json +++ b/examples/json/network-package-additional-checks.json @@ -44,7 +44,7 @@ [ 0, 0 - ] + ] ] }, "phase": { @@ -126,4 +126,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/network-package-invalid.json b/examples/json/network-package-invalid.json index 85395d4..9953ff4 100644 --- a/examples/json/network-package-invalid.json +++ b/examples/json/network-package-invalid.json @@ -11,7 +11,9 @@ "type": "LineString", "properties": "" }, - "transmissionMedium": ["cable"], + "transmissionMedium": [ + "cable" + ], "directed": "yes", "fibreCount": "52" } @@ -49,4 +51,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/network-package.json b/examples/json/network-package.json index 2ab420f..b4a14bc 100644 --- a/examples/json/network-package.json +++ b/examples/json/network-package.json @@ -123,14 +123,14 @@ ], [ -0.321, - 6.170 + 6.17 ], [ -0.488, - 6.290 + 6.29 ], [ - -0.560, + -0.56, 6.421 ], [ @@ -284,7 +284,7 @@ "description": "Contract for the construction of phase 1 of the NextGen network.", "type": "private", "value": { - "amount": 1537459500.00, + "amount": 1537459500.0, "currency": "GHS" }, "dateSigned": "2016-06-30", @@ -335,4 +335,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/network-separate-endpoints.json b/examples/json/network-separate-endpoints.json index d70d895..6fcf456 100644 --- a/examples/json/network-separate-endpoints.json +++ b/examples/json/network-separate-endpoints.json @@ -19,4 +19,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/network-separate-files.json b/examples/json/network-separate-files.json index fccea6c..4d267cd 100644 --- a/examples/json/network-separate-files.json +++ b/examples/json/network-separate-files.json @@ -19,4 +19,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/examples/json/nodes-endpoint.json b/examples/json/nodes-endpoint.json index 0174ba9..6cb4407 100644 --- a/examples/json/nodes-endpoint.json +++ b/examples/json/nodes-endpoint.json @@ -7,4 +7,4 @@ "next": "http://example.com/network/1/nodes?cursor=100", "prev": "http://example.com/network/1/nodes?cursor=96" } -} \ No newline at end of file +} diff --git a/examples/json/spans-endpoint.json b/examples/json/spans-endpoint.json index 5650561..26438ee 100644 --- a/examples/json/spans-endpoint.json +++ b/examples/json/spans-endpoint.json @@ -7,4 +7,4 @@ "next": "http://example.com/network/1/spans?cursor=100", "prev": "http://example.com/network/1/spans?cursor=96" } -} \ No newline at end of file +} diff --git a/manage.py b/manage.py index 01e7730..0fddf17 100755 --- a/manage.py +++ b/manage.py @@ -325,7 +325,7 @@ def get_codelist_references(schema, codelist, parents=None, network_schema=None) def generate_codelist_markdown(codelist, type, references, definitions): """Generate reference markdown for codelist""" - markdown = ["This codelist is referenced by the following properties:\n"] + markdown = ["This codelist is referenced by the following properties:\n\n"] for ref in references: # Remove array indices because they do not appear in the HTML anchors generated by the json schema directive @@ -343,7 +343,7 @@ def generate_codelist_markdown(codelist, type, references, definitions): continue url += ','.join(ref) - markdown.append(f"* [`{'/'.join(ref)}`]({url})\n") + markdown.append(f"- [`{'/'.join(ref)}`]({url})\n") markdown.extend([ "\nThis codelist has the following codes:\n\n" @@ -480,7 +480,7 @@ def update_schema_docs(schema): # Add a list of properties that reference this definition definition["references"] = get_definition_references(schema, defn) - definition["content"].append("This component is referenced by the following properties:\n") + definition["content"].append("This component is referenced by the following properties:\n\n") for ref in definition["references"]: # Remove array indices because they do not appear in the HTML anchors generated by the json schema directive @@ -498,7 +498,7 @@ def update_schema_docs(schema): continue url += ','.join(ref) - definition["content"].append(f"* [`{'/'.join(ref)}`]({url})\n") + definition["content"].append(f"- [`{'/'.join(ref)}`]({url})\n") # Add schema table definition["content"].extend([ @@ -699,7 +699,7 @@ def update_from_airtable(): subdir = "open" with open(codelistdir / subdir / filename, 'w', newline='') as f: - fieldnames = ['code', 'title', 'description'] + fieldnames = ['Code', 'Title', 'Description'] writer = csv.DictWriter(f, fieldnames=fieldnames) writer.writeheader() @@ -736,8 +736,8 @@ def pre_commit(): # Generate network-schema.csv schema_table = mapping_sheet(schema, include_codelist=True, include_definitions=True) - with (schemadir / 'network-schema.csv').open('w') as f: - writer = csv.DictWriter(f, fieldnames=schema_table[0]) + with (schemadir / 'network-schema.csv').open('w', newline='') as f: + writer = csv.DictWriter(f, fieldnames=schema_table[0], lineterminator='\n') writer.writeheader() for row in schema_table[1]: @@ -752,7 +752,8 @@ def pre_commit(): output_format='csv', main_sheet_name="networks", truncation_length=9, - root_list_path='networks' + root_list_path='networks', + line_terminator='LF' ) # Update examples/csv/template @@ -762,7 +763,8 @@ def pre_commit(): output_format="csv", main_sheet_name="networks", truncation_length=9, - no_deprecated_fields=True + no_deprecated_fields=True, + line_terminator='LF' ) # Update docs/reference/publication_formats/csv.md diff --git a/requirements.in b/requirements.in index 8bc92eb..fca74c8 100644 --- a/requirements.in +++ b/requirements.in @@ -12,4 +12,8 @@ PyGithub ocdskit sphinx-design ofdskit -flattentool \ No newline at end of file +flattentool +mdformat +pytest +jsonschema +jscc diff --git a/requirements.txt b/requirements.txt index bd6e022..3abe2bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,14 +11,16 @@ appdirs==1.4.4 attrs==22.1.0 # via # cattrs + # jsonschema + # pytest # requests-cache babel==2.10.3 # via # sphinx # sphinx-intl -backports-datetime-fromisoformat==1.0.0 +backports-datetime-fromisoformat==2.0.0 # via flattentool -btrees==4.10.1 +btrees==4.11.3 # via zodb cattrs==22.1.0 # via requests-cache @@ -50,8 +52,10 @@ docutils==0.17.1 et-xmlfile==1.1.0 # via openpyxl exceptiongroup==1.0.0rc9 - # via cattrs -flattentool==0.18.1 + # via + # cattrs + # pytest +flattentool==0.19.0 # via -r requirements.in gitdb==4.0.9 # via gitpython @@ -66,35 +70,51 @@ ijson==3.1.4 imagesize==1.4.1 # via sphinx importlib-metadata==4.12.0 - # via sphinx + # via + # mdformat + # sphinx +iniconfig==1.1.1 + # via pytest jinja2==3.1.2 # via # myst-parser # sphinx +jscc==0.1.0 + # via -r requirements.in json-merge-patch==0.2 - # via ocdsextensionregistry + # via + # jscc + # ocdsextensionregistry jsonpointer==2.3 # via # sphinxcontrib-opendataservices # sphinxcontrib-opendataservices-jsonschema -jsonref==0.2 +jsonref==1.0.1 # via # -r requirements.in # flattentool + # jscc # ocdsextensionregistry # ocdskit # ocdsmerge # sphinxcontrib-opendataservices-jsonschema +jsonschema==4.17.3 + # via + # -r requirements.in + # jscc livereload==2.6.3 # via sphinx-autobuild lxml==4.9.1 # via flattentool markdown-it-py==2.1.0 # via + # mdformat # mdit-py-plugins # myst-parser markupsafe==2.1.1 # via jinja2 +mdformat==0.7.16 + # via -r requirements.in mdit-py-plugins==0.3.0 # via myst-parser mdurl==0.1.1 @@ -117,11 +137,15 @@ ofdskit==0.0.0 openpyxl==3.0.10 # via flattentool packaging==21.3 - # via sphinx -persistent==4.9.1 + # via + # pytest + # sphinx +persistent==4.9.3 # via # btrees # zodb +pluggy==1.0.0 + # via pytest pyairtable==1.3.0 # via -r requirements.in pycparser==2.21 @@ -136,6 +160,10 @@ pynacl==1.5.0 # via pygithub pyparsing==3.0.9 # via packaging +pyrsistent==0.19.2 + # via jsonschema +pytest==7.2.0 + # via -r requirements.in python-slugify==4.0.1 # via transifex-client pytz==2022.1 @@ -146,6 +174,7 @@ pyyaml==6.0 # via myst-parser requests==2.28.1 # via + # jscc # ocdsextensionregistry # ocdsmerge # pyairtable @@ -155,11 +184,16 @@ requests==2.28.1 # transifex-client requests-cache==0.9.6 # via ocdsextensionregistry +rfc3339-validator==0.1.4 + # via jscc +rfc3986-validator==0.1.1 + # via jscc schema==0.7.5 # via flattentool six==1.16.0 # via # livereload + # rfc3339-validator # transifex-client # url-normalize # zodb @@ -204,6 +238,10 @@ sphinxcontrib-serializinghtml==1.1.5 # via sphinx text-unidecode==1.3 # via python-slugify +tomli==2.0.1 + # via + # mdformat + # pytest tornado==6.2 # via livereload transaction==3.0.1 @@ -231,13 +269,13 @@ zconfig==3.6.0 # via zodb zipp==3.8.1 # via importlib-metadata -zodb==5.7.0 +zodb==5.8.0 # via # flattentool # zc-zlibstorage -zodbpickle==2.4 +zodbpickle==2.6 # via zodb -zope-interface==5.5.0 +zope-interface==5.5.2 # via # btrees # persistent diff --git a/schema/codelist-schema.json b/schema/codelist-schema.json new file mode 100644 index 0000000..9d64ebc --- /dev/null +++ b/schema/codelist-schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Codelist schema", + "description": "Schema for OFDS codelist CSV files.", + "type": "array", + "items": { + "type": "object", + "required": [ + "Code", + "Title" + ], + "additionalProperties": false, + "properties": { + "Code": { + "title": "Code", + "description": "The value to use in OFDS data. Codes should match the letter case of external codes (e.g. ISO 4217, JSON Schema, GeoJSON, IANA Media Types) and should be camel case, otherwise.", + "type": "string", + "pattern": "^([a-z]+([A-Z][a-z]+)*|[A-Z]+[0-9]?|[a-z]+(.[a-z]+)*|LineString|Point|(application|audio|font|example|image|message|model|multipart|text|video)/[\\w.+-]+|[A-Z]{2}([-_][A-Z]+)+|G.65[1-9](.1)?|tag:opentelecomdata.net,2022:(nodes|spans)(API|File))$" + }, + "Title": { + "title": "Title", + "description": "A short title for the code.", + "type": "string", + "minLength": 1 + }, + "Description": { + "title": "Description", + "description": "A longer-form description of the code.", + "type": "string", + "minLength": 1 + }, + "Valid Until": { + "title": "Valid Until", + "description": "The date past which the code is no longer valid for use.", + "type": [ + "string", + "null" + ], + "pattern": "^(\\d{4}/\\d{4}|\\d{4}-\\d{2}(/\\d{4}-\\d{2})?)$" + } + }, + "minProperties": 1 + }, + "minItems": 1, + "uniqueItems": true +} diff --git a/schema/network-schema.csv b/schema/network-schema.csv index 00c62a3..5f1a89b 100644 --- a/schema/network-schema.csv +++ b/schema/network-schema.csv @@ -1,118 +1,117 @@ -section,path,title,description,type,range,values,links,deprecated,deprecationNotes,codelist -,id,Identifier,"A universally unique identifier for this network, as defined by RFC 4122. For more information, see the identifier reference.",string,1..1,uuid,"https://datatracker.ietf.org/doc/html/rfc4122, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/identifiers.html",,, -,name,Network name,A name for this network.,string,0..1,,,,, +section,path,title,description,type,range,values,links,deprecated,deprecationNotes,codelist +,id,Identifier,"A universally unique identifier for this network, as defined by RFC 4122. For more information, see the identifier reference.",string,1..1,uuid,"https://datatracker.ietf.org/doc/html/rfc4122, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/identifiers.html",,, +,name,Network name,A name for this network.,string,0..1,,,,, ,nodes,Nodes,"Information about the nodes that belong to this network. Information about nodes should be embedded in this field unless: * The network is too large to load in to memory, in which case a link to a streamable bulk nodes file may be provided in `.links` * The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated nodes endpoint may be provided in `.links`. -For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, +For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, ,spans,Spans,"Information about the spans that belong to this network. Information about spans should be embedded in this field unless: * The network is too large to load in to memory, in which case a link to a streamable bulk spans file may be provided in `.links` * The data is published via an API and the network is too large to return in a single API response, in which case a link to a paginated spans endpoint may be provided in `.links`. -For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, -,phases,Phases,Information about the phases in which this network is deployed.,array,0..n,,,,, -,organisations,Organisations,Information about the organisations involved in this network. Organisation references elsewhere in the schema are used to refer back to this entries in this list.,array,0..n,,,,, -,contracts,Contracts,Information about contracts related to this network.,array,0..n,,,,, -,website,Website,The URL of the website for this network.,string,0..1,iri,,,, -,publisher,Publisher,The organisation that published this network.,unknown,0..1,,,,, -,publicationDate,Publication date,The date when this network was published.,string,0..1,date,,,, -,collectionDate,Collection date,"The date when the location data was collected. If a dataset was produced by digitising a map, the date that the data for the map was collected.",string,0..1,date,,,, -,crs,Coordinate reference system,The coordinate reference system used in this network. If this network includes any coordinate data (in `Node.location` or `Span.route`) then this field must be provided.,unknown,0..1,,,,, -,accuracy,Accuracy,"The horizontal uncertainty, in metres, of the coordinates in this dataset relative to the datum of the coordinate reference system specified in `crs`. Further details about the accuracy of coordinates in this dataset can be provided in `.accuracyDetails`.",number,0..1,,,,, -,accuracyDetails,Accuracy details,"Further details about the accuracy specified in `accuracy`. For example, the confidence level of the accuracy measurement, the methodology used to calculate the accuracy, or a local classification of accuracy.",string,0..1,,,,, -,language,Language,"The default language of this network,from the open language codelist. A BCP47 language tag is allowed, if there is a user need for the additional information.",string,0..1,,"https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#language, https://www.w3.org/International/articles/language-tags/",,,language.csv -,links,Links,"Links to related resources. The first item in the links array must be a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see how to publish large networks.",array,1..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks,,, -Node,id,Identifier,An identifier for this node. The identifier must be unique within the scope of the `nodes` array.,string,1..1,,,,, -Node,name,Node name,A name for this node.,string,0..1,,,,, -Node,phase,Phase,The phase to which this node belongs.,unknown,0..1,,,,, -Node,status,Status,"The status of this node, from the closed nodeStatus codelist.",string,0..1,"Enum: proposed, planned, underConstruction, operational, decommissioned, inactive",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeStatus,,,nodeStatus.csv -Node,location,Node location,A GeoJSON Point geometry describing the physical location of this node.,unknown,0..1,,https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4,,, -Node,address,Node address,The physical address of this node.,unknown,0..1,,,,, -Node,type,Node type,"The type of this node, from the open nodeType codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeType,,,nodeType.csv -Node,accessPoint,Access point,Whether active or passive transmission equipment is installed at this node which is capable of providing access to the network.,boolean,0..1,,,,, -Node,internationalConnections,International connections,"The international connections available at this node. For all connections, `.country` is required.",array,0..n,,,,, -Node,power,Power availability,Whether power for active network equipment is available at this node.,boolean,0..1,,,,, -Node,technologies,Technologies,"The active technologies used at this node, from the open nodeTechnologies codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeTechnologies,,,nodeTechnologies.csv -Node,physicalInfrastructureProvider,Physical infrastructure provider,"The organisation that owns the passive network infrastructure for this node, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites.",unknown,0..1,,,,, -Node,networkProvider,Network provider,"The organisation that operates the active network infrastructure for this node, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure.",unknown,0..1,,,,, -Span,id,Identifier,An identifier for this span. The identifier must be unique within the scope of the `spans` array.,string,1..1,,,,, -Span,name,Span name,A name for this span.,string,0..1,,,,, -Span,phase,Phase,The phase to which this span belongs.,unknown,0..1,,,,, -Span,status,Span status,"The status of the network infrastructure for this span, from the closed spanStatus codelist.",string,0..1,"Enum: operational, underConstruction, planned, decommissioned, proposed, inactive",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanStatus,,,spanStatus.csv -Span,readyForServiceDate,Ready for service date,The date this span was ready to carry traffic.,string,0..1,date,,,, -Span,start,Start,"The identifier of one of two nodes that this span connects. It must match the `.id` of a node in the `nodes` array. If `directed == true`, it represents the starting point of the span. Otherwise, the distinction between `start` and `end` is arbitrary.",string,0..1,,,,, -Span,end,End,"The identifier of one of two nodes that this span connects. It must match the `.id` of a node in the `nodes` array. If `directed == true`, it represents the end point of the span. Otherwise, the distinction between `start` and `end` is arbitrary.",string,0..1,,,,, -Span,directed,Directed,"Whether this span is directed. If `True`, then `.start` represents the start of the span and `.end` represents the end. Otherwise, `.start` and `.end` reference this span's endpoints with no direction implied.",boolean,0..1,,,,, -Span,route,Span route,A GeoJSON LineString geometry describing the route of this span.,unknown,0..1,,https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4,,, -Span,physicalInfrastructureProvider,Physical infrastructure provider,"The organisation that owns the passive network infrastructure for this span, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites.",unknown,0..1,,,,, -Span,networkProvider,Network provider,"The organisation that operates the active network infrastructure for this span, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure.",unknown,0..1,,,,, -Span,supplier,Supplier,The organisation responsible for installing the cable for this span.,unknown,0..1,,,,, -Span,transmissionMedium,Transmission medium,"The physical media of this span, from the closed transmissionMedium codelist.",array,0..n,"Enum: fibre, microwave, copper, coaxial",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#transmissionMedium,,,transmissionMedium.csv -Span,deployment,Deployment,"The physical deployment of this span, from the closed deployment codelist. Further details of this span's deployment can be provided in `.deploymentDetails`.",array,0..n,"Enum: aerial, underground, aboveGround, belowGround",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#deployment,,,deployment.csv -Span,deploymentDetails,Deployment details,Further details of this span's deployment.,unknown,0..1,,,,, -Span,darkFibre,Dark fibre availability,Whether access to dark fibre is available on this span.,boolean,0..1,,,,, -Span,fibreType,Fibre type,"The type of fibre used in this span, from the closed fibreType codelist. Further details of the span's fibre type can be provided in `.fibreTypeDetails`.",string,0..1,"Enum: G.651.1, G.652, G.653, G.654, G.655, G.656, G.657",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#fibreType,,,fibreType.csv -Span,fibreTypeDetails,Fibre type details,Further details about this span's fibre type.,unknown,0..1,,,,, -Span,fibreCount,Fibre count,The number of individual optical fibres in this span.,integer,0..1,,,,, -Span,fibreLength,Fibre length,The physical length of fibre optic cable used in this span.,number,0..1,,,,, -Span,technologies,Technologies,"The active technologies used on this span,from the open spanTechnologies codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanTechnologies,,,spanTechnologies.csv -Span,capacity,Capacity,"The transmission rate, or throughput, of this span, expressed in Gbit/sec (Gbps). The equipped capacity is the total capacity of the circuits (e.g. E1, DS3, STM-1 etc.) which have been activated in the network transmission equipment of the span. Further details of this span's capacity can be provided in `.capacityDetails`.",number,0..1,,,,, -Span,capacityDetails,Capacity details,Further details about this span's capacity,unknown,0..1,,,,, -Span,countries,Countries,"The countries in which this span is physically located, from the closed country codelist.",array,0..n,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv -Phase,id,Identifier,An identifier for this phase. The identifier must be unique within the scope of the `phases` array.,string,1..1,,,,, -Phase,name,Name,A name for this phase.,string,0..1,,,,, -Phase,description,Description,A description for this phase.,string,0..1,,,,, -Phase,funders,Funders,"Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers. -",array,0..n,,,,, -Organisation,id,Local identifier,A local identifier for this organisation. The identifier must be unique within the scope of the `organisations` array.,string,1..1,,,,, -Organisation,name,Name,A name for this organisation.,string,0..1,,,,, -Organisation,identifier,Organisation identifier,An identifier for this organisation.,unknown,0..1,,,,, -Organisation,country,Country,"The country in which this organisation is legally registered, from the closed country codelist.",string,0..1,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv -Organisation,roles,Roles,"This organisation's roles in this network, from the open organisationRole codelist. Further details about this organisation's roles can be provided in `.roleDetails`.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationRole,,,organisationRole.csv -Organisation,roleDetails,Role details,Further details about this organisation's roles in the network,string,0..1,,,,, -Organisation,website,Website,The URL of the website for this organisation.,string,0..1,iri,,,, -Organisation,logo,Logo,The URL of the logo for this organisation.,string,0..1,iri,,,, -Contract,id,Identifier,An identifier for this contract. The identifier must be unique within the scope of the `contracts` array.,string,1..1,,,,, -Contract,title,Contract title,A title for this contract.,string,0..1,,,,, -Contract,description,Contract description,A description for this contract.,string,0..1,,,,, -Contract,type,Contract type,"The type of this contract, from the open contractType codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#contractType,,,contractType.csv -Contract,value,Contract value,The value of this contract.,unknown,0..1,,,,, -Contract,dateSigned,Date signed,The date this contract was signed.,string,0..1,date,,,, -Contract,documents,Contract documents,The documents related to this contract.,array,0..n,,,,, -Contract,relatedPhases,Related phases,The phases to which this contract relates.,array,0..n,,,,, -Geometry,type,Type,"The GeoJSON geometry type that is described by `.coordinates`, from the closed geometryType codelist. This must be 'Point' when referenced by `Node.location`, and 'LineString' when referenced by `Span.route`.",string,1..1,"Enum: LineString, Point","https://datatracker.ietf.org/doc/html/rfc7946#section-1.4, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#geometryType",,,geometryType.csv +For more information, see how to format data for publication.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-format-data-for-publication,,, +,phases,Phases,Information about the phases in which this network is deployed.,array,0..n,,,,, +,organisations,Organisations,Information about the organisations involved in this network. Organisation references elsewhere in the schema are used to refer back to this entries in this list.,array,0..n,,,,, +,contracts,Contracts,Information about contracts related to this network.,array,0..n,,,,, +,website,Website,The URL of the website for this network.,string,0..1,iri,,,, +,publisher,Publisher,The organisation that published this network.,unknown,0..1,,,,, +,publicationDate,Publication date,The date when this network was published.,string,0..1,date,,,, +,collectionDate,Collection date,"The date when the location data was collected. If a dataset was produced by digitising a map, the date that the data for the map was collected.",string,0..1,date,,,, +,crs,Coordinate reference system,The coordinate reference system used in this network. If this network includes any coordinate data (in `Node.location` or `Span.route`) then this field must be provided.,unknown,0..1,,,,, +,accuracy,Accuracy,"The horizontal uncertainty, in metres, of the coordinates in this dataset relative to the datum of the coordinate reference system specified in `crs`. Further details about the accuracy of coordinates in this dataset can be provided in `.accuracyDetails`.",number,0..1,,,,, +,accuracyDetails,Accuracy details,"Further details about the accuracy specified in `accuracy`. For example, the confidence level of the accuracy measurement, the methodology used to calculate the accuracy, or a local classification of accuracy.",string,0..1,,,,, +,language,Language,"The default language of this network,from the open language codelist. A BCP47 language tag is allowed, if there is a user need for the additional information.",string,0..1,,"https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#language, https://www.w3.org/International/articles/language-tags/",,,language.csv +,links,Links,"Links to related resources. The first item in the links array must be a link to the canonical JSON schema that describes the structure of the data. Links to API endpoints for nodes and spans should be provided when a network is too large to return in a single API response and links to bulk files should be provided when a network is too large to load into memory, for more information, see how to publish large networks.",array,1..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/guidance/publication.html#how-to-publish-large-networks,,, +Node,id,Identifier,An identifier for this node. The identifier must be unique within the scope of the `nodes` array.,string,1..1,,,,, +Node,name,Node name,A name for this node.,string,0..1,,,,, +Node,phase,Phase,The phase to which this node belongs.,unknown,0..1,,,,, +Node,status,Status,"The status of this node, from the closed nodeStatus codelist.",string,0..1,"Enum: proposed, planned, underConstruction, operational, decommissioned, inactive",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeStatus,,,nodeStatus.csv +Node,location,Node location,A GeoJSON Point geometry describing the physical location of this node.,unknown,0..1,,https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4,,, +Node,address,Node address,The physical address of this node.,unknown,0..1,,,,, +Node,type,Node type,"The type of this node, from the open nodeType codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeType,,,nodeType.csv +Node,accessPoint,Access point,Whether active or passive transmission equipment is installed at this node which is capable of providing access to the network.,boolean,0..1,,,,, +Node,internationalConnections,International connections,"The international connections available at this node. For all connections, `.country` is required.",array,0..n,,,,, +Node,power,Power availability,Whether power for active network equipment is available at this node.,boolean,0..1,,,,, +Node,technologies,Technologies,"The active technologies used at this node, from the open nodeTechnologies codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeTechnologies,,,nodeTechnologies.csv +Node,physicalInfrastructureProvider,Physical infrastructure provider,"The organisation that owns the passive network infrastructure for this node, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites.",unknown,0..1,,,,, +Node,networkProvider,Network provider,"The organisation that operates the active network infrastructure for this node, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure.",unknown,0..1,,,,, +Span,id,Identifier,An identifier for this span. The identifier must be unique within the scope of the `spans` array.,string,1..1,,,,, +Span,name,Span name,A name for this span.,string,0..1,,,,, +Span,phase,Phase,The phase to which this span belongs.,unknown,0..1,,,,, +Span,status,Span status,"The status of the network infrastructure for this span, from the closed spanStatus codelist.",string,0..1,"Enum: operational, underConstruction, planned, decommissioned, proposed, inactive",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanStatus,,,spanStatus.csv +Span,readyForServiceDate,Ready for service date,The date this span was ready to carry traffic.,string,0..1,date,,,, +Span,start,Start,"The identifier of one of two nodes that this span connects. It must match the `.id` of a node in the `nodes` array. If `directed == true`, it represents the starting point of the span. Otherwise, the distinction between `start` and `end` is arbitrary.",string,0..1,,,,, +Span,end,End,"The identifier of one of two nodes that this span connects. It must match the `.id` of a node in the `nodes` array. If `directed == true`, it represents the end point of the span. Otherwise, the distinction between `start` and `end` is arbitrary.",string,0..1,,,,, +Span,directed,Directed,"Whether this span is directed. If `True`, then `.start` represents the start of the span and `.end` represents the end. Otherwise, `.start` and `.end` reference this span's endpoints with no direction implied.",boolean,0..1,,,,, +Span,route,Span route,A GeoJSON LineString geometry describing the route of this span.,unknown,0..1,,https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.4,,, +Span,physicalInfrastructureProvider,Physical infrastructure provider,"The organisation that owns the passive network infrastructure for this span, i.e. the non-electrical elements, such as dark fibre, ducts and physical sites.",unknown,0..1,,,,, +Span,networkProvider,Network provider,"The organisation that operates the active network infrastructure for this span, i.e. the electrical elements, such as optical transceivers, switches and routers. In open business models, network providers provide wholesale access to service providers such as retail internet service providers. Network providers can own or lease the active network infrastructure.",unknown,0..1,,,,, +Span,supplier,Supplier,The organisation responsible for installing the cable for this span.,unknown,0..1,,,,, +Span,transmissionMedium,Transmission medium,"The physical media of this span, from the closed transmissionMedium codelist.",array,0..n,"Enum: fibre, microwave, copper, coaxial",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#transmissionMedium,,,transmissionMedium.csv +Span,deployment,Deployment,"The physical deployment of this span, from the closed deployment codelist. Further details of this span's deployment can be provided in `.deploymentDetails`.",array,0..n,"Enum: aboveGround, belowGround",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#deployment,,,deployment.csv +Span,deploymentDetails,Deployment details,Further details of this span's deployment.,unknown,0..1,,,,, +Span,darkFibre,Dark fibre availability,Whether access to dark fibre is available on this span.,boolean,0..1,,,,, +Span,fibreType,Fibre type,"The type of fibre used in this span, from the closed fibreType codelist. Further details of the span's fibre type can be provided in `.fibreTypeDetails`.",string,0..1,"Enum: G.651.1, G.652, G.653, G.654, G.655, G.656, G.657",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#fibreType,,,fibreType.csv +Span,fibreTypeDetails,Fibre type details,Further details about this span's fibre type.,unknown,0..1,,,,, +Span,fibreCount,Fibre count,The number of individual optical fibres in this span.,integer,0..1,,,,, +Span,fibreLength,Fibre length,The physical length of fibre optic cable used in this span.,number,0..1,,,,, +Span,technologies,Technologies,"The active technologies used on this span,from the open spanTechnologies codelist.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanTechnologies,,,spanTechnologies.csv +Span,capacity,Capacity,"The transmission rate, or throughput, of this span, expressed in Gbit/sec (Gbps). The equipped capacity is the total capacity of the circuits (e.g. E1, DS3, STM-1 etc.) which have been activated in the network transmission equipment of the span. Further details of this span's capacity can be provided in `.capacityDetails`.",number,0..1,,,,, +Span,capacityDetails,Capacity details,Further details about this span's capacity,unknown,0..1,,,,, +Span,countries,Countries,"The countries in which this span is physically located, from the closed country codelist.",array,0..n,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv +Phase,id,Identifier,An identifier for this phase. The identifier must be unique within the scope of the `phases` array.,string,1..1,,,,, +Phase,name,Name,A name for this phase.,string,0..1,,,,, +Phase,description,Description,A description for this phase.,string,0..1,,,,, +Phase,funders,Funders,"Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers.",array,0..n,,,,, +Organisation,id,Local identifier,A local identifier for this organisation. The identifier must be unique within the scope of the `organisations` array.,string,1..1,,,,, +Organisation,name,Name,A name for this organisation.,string,0..1,,,,, +Organisation,identifier,Organisation identifier,An identifier for this organisation.,unknown,0..1,,,,, +Organisation,country,Country,"The country in which this organisation is legally registered, from the closed country codelist.",string,0..1,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv +Organisation,roles,Roles,"This organisation's roles in this network, from the open organisationRole codelist. Further details about this organisation's roles can be provided in `.roleDetails`.",array,0..n,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationRole,,,organisationRole.csv +Organisation,roleDetails,Role details,Further details about this organisation's roles in the network,string,0..1,,,,, +Organisation,website,Website,The URL of the website for this organisation.,string,0..1,iri,,,, +Organisation,logo,Logo,The URL of the logo for this organisation.,string,0..1,iri,,,, +Contract,id,Identifier,An identifier for this contract. The identifier must be unique within the scope of the `contracts` array.,string,1..1,,,,, +Contract,title,Contract title,A title for this contract.,string,0..1,,,,, +Contract,description,Contract description,A description for this contract.,string,0..1,,,,, +Contract,type,Contract type,"The type of this contract, from the open contractType codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#contractType,,,contractType.csv +Contract,value,Contract value,The value of this contract.,unknown,0..1,,,,, +Contract,dateSigned,Date signed,The date this contract was signed.,string,0..1,date,,,, +Contract,documents,Contract documents,The documents related to this contract.,array,0..n,,,,, +Contract,relatedPhases,Related phases,The phases to which this contract relates.,array,0..n,,,,, +Geometry,type,Type,"The GeoJSON geometry type that is described by `.coordinates`, from the closed geometryType codelist. This must be 'Point' when referenced by `Node.location`, and 'LineString' when referenced by `Span.route`.",string,1..1,"Enum: LineString, Point","https://datatracker.ietf.org/doc/html/rfc7946#section-1.4, https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#geometryType",,,geometryType.csv Geometry,coordinates,Coordinates,"One or more GeoJSON positions. For geometries of type 'Point', the coordinates member must be a single position. For geometries of type 'LineString' the coordinates member must be an array of positions. Each position is an array of numbers with two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order. Longitude and latitude must be expressed using the World Geodetic System 1984 WGS 84 datum in units of decimal degrees. Altitude or elevation may be included as an optional third element and must be expressed as the height in meters above or below the WGS 84 reference ellipsoid -Therefore, geometries of type 'Point' must be a single array, e.g. [longitude, latitude], and geometries of type 'LineString' must be an array of arrays, e.g. [[longitude, latitude], [longitude, latitude]].",array,1..n,,"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1, https://datatracker.ietf.org/doc/html/rfc7946#ref-WGS84",,, -OrganisationReference,id,Local identifier,The local identifier of the organisation being referenced. This must match the `.id` of an organisation in the `organisations` array.,string,1..1,,,,, -OrganisationReference,name,Name,The name of the organisation being referenced. This must match the `.name` of the organisation in the `organisations` array whose `.id` matches the `.id` of this organisation reference.,string,0..1,,,,, -PhaseReference,id,Identifier,The identifier of the phase being referenced. This must match the `.id` of a phase in the `phases` array.,string,1..1,,,,, -PhaseReference,name,Name,The name of the phase being referenced. This must match the `.name` of the phase in the `phases` array whose `.id` matches the `.id` of this phase reference.,string,0..1,,,,, -Address,streetAddress,Street address,"The street address. For example, 1600 Amphitheatre Pkwy.",string,0..1,,,,, -Address,locality,Locality,"The locality. For example, Mountain View.",string,0..1,,,,, -Address,region,Region,"The region. For example, CA.",string,0..1,,,,, -Address,postalCode,Postal code,"The postal code. For example, 94043.",string,0..1,,,,, -Address,country,Country,"The country in which the address is physically located, from the closed country codelist.",string,0..1,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv -Value,amount,Amount,The amount of this value.,number,0..1,,,,, -Value,currency,Currency,"The currency of this value, from the closed currency codelist.",string,0..1,"Enum: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UYW, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL, ADP, AFA, ALK, AOK, AON, AOR, ARA, ARP, ARY, ATS, AYM, AZM, BAD, BEC, BEF, BEL, BGJ, BGK, BGL, BOP, BRB, BRC, BRE, BRN, BRR, BUK, BYB, BYR, CHC, CSD, CSJ, CSK, CYP, DDM, DEM, ECS, ECV, EEK, ESA, ESB, ESP, FIM, FRF, GEK, GHC, GHP, GNE, GNS, GQE, GRD, GWE, GWP, HRD, IEP, ILP, ILR, ISJ, ITL, LAJ, LSM, LTL, LTT, LUC, LUF, LUL, LVL, LVR, MGF, MLF, MRO, MTL, MTP, MVQ, MXP, MZE, MZM, NIC, NLG, PEH, PEI, PES, PLZ, PTE, RHD, ROK, ROL, RUR, SDD, SDP, SIT, SKK, SRG, STD, SUR, TJR, TMM, TPE, TRL, UAK, UGS, UGW, USS, UYN, UYP, VEB, VEF, VNC, XEU, XFO, XFU, XRE, YDD, YUD, YUM, YUN, ZAL, ZMK, ZRN, ZRZ, ZWC, ZWD, ZWN, ZWR",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#currency,,,currency.csv -Document,title,Title,A title for this document.,string,0..1,,,,, -Document,description,Description,"A description of this document. Descriptions should not exceed 250 words. If the document is not accessible online, the description should describe how to access a copy of the document.",string,0..1,,,,, -Document,url,URL,A web address for accessing this document.,string,0..1,iri,,,, -Document,format,Format,"The format of this document, from the open mediaType codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#mediaType,,,mediaType.csv -Identifier,id,Identifier,The identifier assigned to the organisation in the register identified in `.scheme`.,string,0..1,,,,, -Identifier,scheme,Scheme,"The register from which the identifier in `.id` is drawn, from the open organisationIdentifierScheme codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationIdentifierScheme,,,organisationIdentifierScheme.csv -Identifier,legalName,Legal name,The legally registered name of the organisation,string,0..1,,,,, -Identifier,uri,URI,"A canonical URI for this identifier, such as those provided by Open Corporates. Do not use this field to provide the website of the organisation: instead, use `Organisation.website`.",string,0..1,iri,,,, -CoordinateReferenceSystem,name,Name,The name of the coordinate reference system.,string,1..1,uri,,,, -CoordinateReferenceSystem,uri,Uniform Resource Identifier,A URI for the coordinate reference system.,string,1..1,uri,,,, -Link,href,Link target,The URL of this related resource.,string,1..1,iri,,,, -Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist. The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.",string,1..1,Pattern: ^(?!(describedby)),https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv -FibreTypeDetails,fibreSubtype,Fibre subtype,"The sub-category of the fibre type. For example, G.652.B.",string,0..1,,,,, -FibreTypeDetails,description,Description,A description of this span's fibre type.,string,0..1,,,,, -DeploymentDetails,description,Description,A description of this span's deployment.,string,0..1,,,,, -CapacityDetails,description,Description,A description of this span's capacity.,string,0..1,,,,, +Therefore, geometries of type 'Point' must be a single array, e.g. [longitude, latitude], and geometries of type 'LineString' must be an array of arrays, e.g. [[longitude, latitude], [longitude, latitude]].",array,1..n,,"https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1, https://datatracker.ietf.org/doc/html/rfc7946#ref-WGS84",,, +OrganisationReference,id,Local identifier,The local identifier of the organisation being referenced. This must match the `.id` of an organisation in the `organisations` array.,string,1..1,,,,, +OrganisationReference,name,Name,The name of the organisation being referenced. This must match the `.name` of the organisation in the `organisations` array whose `.id` matches the `.id` of this organisation reference.,string,0..1,,,,, +PhaseReference,id,Identifier,The identifier of the phase being referenced. This must match the `.id` of a phase in the `phases` array.,string,1..1,,,,, +PhaseReference,name,Name,The name of the phase being referenced. This must match the `.name` of the phase in the `phases` array whose `.id` matches the `.id` of this phase reference.,string,0..1,,,,, +Address,streetAddress,Street address,"The street address. For example, 1600 Amphitheatre Pkwy.",string,0..1,,,,, +Address,locality,Locality,"The locality. For example, Mountain View.",string,0..1,,,,, +Address,region,Region,"The region. For example, CA.",string,0..1,,,,, +Address,postalCode,Postal code,"The postal code. For example, 94043.",string,0..1,,,,, +Address,country,Country,"The country in which the address is physically located, from the closed country codelist.",string,0..1,"Enum: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#country,,,country.csv +Value,amount,Amount,The amount of this value.,number,0..1,,,,, +Value,currency,Currency,"The currency of this value, from the closed currency codelist.",string,0..1,"Enum: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UYW, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW, ZWL, ADP, AFA, ALK, AOK, AON, AOR, ARA, ARP, ARY, ATS, AYM, AZM, BAD, BEC, BEF, BEL, BGJ, BGK, BGL, BOP, BRB, BRC, BRE, BRN, BRR, BUK, BYB, BYR, CHC, CSD, CSJ, CSK, CYP, DDM, DEM, ECS, ECV, EEK, ESA, ESB, ESP, FIM, FRF, GEK, GHC, GHP, GNE, GNS, GQE, GRD, GWE, GWP, HRD, IEP, ILP, ILR, ISJ, ITL, LAJ, LSM, LTL, LTT, LUC, LUF, LUL, LVL, LVR, MGF, MLF, MRO, MTL, MTP, MVQ, MXP, MZE, MZM, NIC, NLG, PEH, PEI, PES, PLZ, PTE, RHD, ROK, ROL, RUR, SDD, SDP, SIT, SKK, SRG, STD, SUR, TJR, TMM, TPE, TRL, UAK, UGS, UGW, USS, UYN, UYP, VEB, VEF, VNC, XEU, XFO, XFU, XRE, YDD, YUD, YUM, YUN, ZAL, ZMK, ZRN, ZRZ, ZWC, ZWD, ZWN, ZWR",https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#currency,,,currency.csv +Document,title,Title,A title for this document.,string,0..1,,,,, +Document,description,Description,"A description of this document. Descriptions should not exceed 250 words. If the document is not accessible online, the description should describe how to access a copy of the document.",string,0..1,,,,, +Document,url,URL,A web address for accessing this document.,string,0..1,iri,,,, +Document,format,Format,"The format of this document, from the open mediaType codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#mediaType,,,mediaType.csv +Identifier,id,Identifier,The identifier assigned to the organisation in the register identified in `.scheme`.,string,0..1,,,,, +Identifier,scheme,Scheme,"The register from which the identifier in `.id` is drawn, from the open organisationIdentifierScheme codelist.",string,0..1,,https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationIdentifierScheme,,,organisationIdentifierScheme.csv +Identifier,legalName,Legal name,The legally registered name of the organisation,string,0..1,,,,, +Identifier,uri,URI,"A canonical URI for this identifier, such as those provided by Open Corporates. Do not use this field to provide the website of the organisation: instead, use `Organisation.website`.",string,0..1,iri,,,, +CoordinateReferenceSystem,name,Name,The name of the coordinate reference system.,string,1..1,uri,,,, +CoordinateReferenceSystem,uri,Uniform Resource Identifier,A URI for the coordinate reference system.,string,1..1,uri,,,, +Link,href,Link target,The URL of this related resource.,string,1..1,iri,,,, +Link,rel,Link relation type,"The relationship with this related resource, from the open linkRelationType codelist. The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.",string,1..1,Pattern: ^(?!(describedby)),https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype,,,linkRelationType.csv +FibreTypeDetails,fibreSubtype,Fibre subtype,"The sub-category of the fibre type. For example, G.652.B.",string,0..1,,,,, +FibreTypeDetails,description,Description,A description of this span's fibre type.,string,0..1,,,,, +DeploymentDetails,description,Description,A description of this span's deployment.,string,0..1,,,,, +CapacityDetails,description,Description,A description of this span's capacity.,string,0..1,,,,, diff --git a/schema/network-schema.json b/schema/network-schema.json index b682f73..a7d3c5e 100644 --- a/schema/network-schema.json +++ b/schema/network-schema.json @@ -189,7 +189,7 @@ }, "status": { "title": "Status", - "description": "The status of this node, from the closed [nodeStatus codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeStatus).", + "description": "The status of this node, from the closed [nodeStatus codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodestatus).", "type": "string", "$comment": "", "codelist": "nodeStatus.csv", @@ -217,7 +217,7 @@ }, "type": { "title": "Node type", - "description": "The type of this node, from the open [nodeType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeType).", + "description": "The type of this node, from the open [nodeType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodetype).", "type": "array", "$comment": "", "items": { @@ -256,7 +256,7 @@ }, "technologies": { "title": "Technologies", - "description": "The active technologies used at this node, from the open [nodeTechnologies codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodeTechnologies).", + "description": "The active technologies used at this node, from the open [nodeTechnologies codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#nodetechnologies).", "type": "array", "$comment": "", "items": { @@ -316,7 +316,7 @@ }, "status": { "title": "Span status", - "description": "The status of the network infrastructure for this span, from the closed [spanStatus codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanStatus).", + "description": "The status of the network infrastructure for this span, from the closed [spanStatus codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanstatus).", "type": "string", "$comment": "", "codelist": "spanStatus.csv", @@ -383,7 +383,7 @@ }, "transmissionMedium": { "title": "Transmission medium", - "description": "The physical media of this span, from the closed [transmissionMedium codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#transmissionMedium).", + "description": "The physical media of this span, from the closed [transmissionMedium codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#transmissionmedium).", "type": "array", "$comment": "", "items": { @@ -413,8 +413,6 @@ "string" ], "enum": [ - "aerial", - "underground", "aboveGround", "belowGround" ], @@ -439,7 +437,7 @@ }, "fibreType": { "title": "Fibre type", - "description": "The type of fibre used in this span, from the closed [fibreType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#fibreType). Further details of the span's fibre type can be provided in `.fibreTypeDetails`.", + "description": "The type of fibre used in this span, from the closed [fibreType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#fibretype). Further details of the span's fibre type can be provided in `.fibreTypeDetails`.", "type": "string", "$comment": "", "codelist": "fibreType.csv", @@ -474,7 +472,7 @@ }, "technologies": { "title": "Technologies", - "description": "The active technologies used on this span,from the open [spanTechnologies codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spanTechnologies).", + "description": "The active technologies used on this span,from the open [spanTechnologies codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#spantechnologies).", "type": "array", "$comment": "", "items": { @@ -803,7 +801,7 @@ }, "funders": { "title": "Funders", - "description": "Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers.\n", + "description": "Information about the organisations that provide financing for the development or operation of this phase, also known as investors or financers.", "type": "array", "$comment": "", "items": { @@ -1106,7 +1104,7 @@ }, "roles": { "title": "Roles", - "description": "This organisation's roles in this network, from the open [organisationRole codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationRole). Further details about this organisation's roles can be provided in `.roleDetails`.", + "description": "This organisation's roles in this network, from the open [organisationRole codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationrole). Further details about this organisation's roles can be provided in `.roleDetails`.", "type": "array", "$comment": "", "items": { @@ -1176,7 +1174,7 @@ }, "type": { "title": "Contract type", - "description": "The type of this contract, from the open [contractType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#contractType).", + "description": "The type of this contract, from the open [contractType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#contracttype).", "type": "string", "$comment": "", "codelist": "contractType.csv", @@ -1232,7 +1230,7 @@ "properties": { "type": { "title": "Type", - "description": "The [GeoJSON geometry type](https://datatracker.ietf.org/doc/html/rfc7946#section-1.4) that is described by `.coordinates`, from the closed [geometryType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#geometryType). This must be 'Point' when referenced by `Node.location`, and 'LineString' when referenced by `Span.route`.", + "description": "The [GeoJSON geometry type](https://datatracker.ietf.org/doc/html/rfc7946#section-1.4) that is described by `.coordinates`, from the closed [geometryType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#geometrytype). This must be 'Point' when referenced by `Node.location`, and 'LineString' when referenced by `Span.route`.", "type": "string", "$comment": "", "codelist": "geometryType.csv", @@ -1971,7 +1969,7 @@ }, "format": { "title": "Format", - "description": "The format of this document, from the open [mediaType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#mediaType).", + "description": "The format of this document, from the open [mediaType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#mediatype).", "type": "string", "$comment": "", "codelist": "mediaType.csv", @@ -1996,7 +1994,7 @@ }, "scheme": { "title": "Scheme", - "description": "The register from which the identifier in `.id` is drawn, from the open [organisationIdentifierScheme codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationIdentifierScheme).", + "description": "The register from which the identifier in `.id` is drawn, from the open [organisationIdentifierScheme codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#organisationidentifierscheme).", "type": "string", "$comment": "", "codelist": "organisationIdentifierScheme.csv", @@ -2064,7 +2062,7 @@ }, "rel": { "title": "Link relation type", - "description": "The relationship with this related resource, from the open [linkRelationType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype). The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data." , + "description": "The relationship with this related resource, from the open [linkRelationType codelist](https://open-fibre-data-standard.readthedocs.io/en/latest/reference/codelists.html#linkrelationtype). The 'describedby' code must only be used in the first item in the `links` array to link to the schema that describes the structure of the data.", "type": "string", "$comment": "", "codelist": "linkRelationType.csv", diff --git a/tests/test_csv.py b/tests/test_csv.py new file mode 100644 index 0000000..e9c8460 --- /dev/null +++ b/tests/test_csv.py @@ -0,0 +1,92 @@ +import csv +import json +import os +import warnings +from io import StringIO + +import pytest +from jscc.schema import is_codelist +from jscc.testing.checks import get_invalid_csv_files +from jscc.testing.filesystem import walk_csv_data +from jscc.testing.util import warn_and_assert +from jsonschema import FormatChecker +from jsonschema.validators import Draft4Validator as validator + + +cwd = os.getcwd() + + +def formatwarning(message, category, filename, lineno, line=None): + return str(message).replace(cwd + os.sep, '') + + +warnings.formatwarning = formatwarning +pytestmark = pytest.mark.filterwarnings('always') + + +def test_csv_valid(): + warn_and_assert(get_invalid_csv_files(), '{0} is not valid CSV: {1}', + 'CSV files are invalid. See warnings below.') + + +def test_valid(): + """ + Ensures all CSV files are valid: no empty rows or columns, no leading or trailing whitespace in cells, same number + of cells in each row. + """ + errors = 0 + + for path, name, text, fieldnames, rows in walk_csv_data(): + codelist = is_codelist(fieldnames) + width = len(fieldnames) + columns = [] + + for row_index, row in enumerate(rows, 2): + if len(row) != width: + errors += 1 + warnings.warn("ERROR: {} has {} not {} columns in row {}".format(path, len(row), width, row_index)) + if not any(row.values()): + errors += 1 + warnings.warn("ERROR: {} has empty row {}".format(path, row_index)) + else: + for col_index, (header, cell) in enumerate(row.items(), 1): + if col_index > len(columns): + columns.append([]) + + columns[col_index - 1].append(cell) + + # Extra cells are added to a None columns. + if header is None and isinstance(cell, list): + cells = cell + else: + cells = [cell] + + for cell in cells: + if cell is not None and cell != cell.strip(): + errors += 1 + warnings.warn( + 'ERROR: {} {} "{}" has leading or trailing whitespace at {},{}'.format( + path, header, cell, row_index, col_index + ) + ) + + # Column 4 (technical note) can be empty, but check the others + for col_index, column in enumerate(columns, 1): + if col_index != 4 and not any(column) and codelist: + errors += 1 + warnings.warn("ERROR: {} has empty column {}".format(path, col_index)) + + output = StringIO() + writer = csv.DictWriter(output, fieldnames=fieldnames, lineterminator="\n") + writer.writeheader() + writer.writerows(rows) + expected = output.getvalue() + + if text != expected: + errors += 1 + warnings.warn( + "ERROR: {} is improperly formatted (e.g. missing trailing newline, extra quoting " + 'characters, non-"\\n" line terminator):\n{!r}\n{!r}'.format(path, text, expected) + ) + + assert errors == 0, "One or more codelist CSV files are invalid. See warnings below." diff --git a/tests/test_json.py b/tests/test_json.py new file mode 100644 index 0000000..0d38099 --- /dev/null +++ b/tests/test_json.py @@ -0,0 +1,173 @@ +from warnings import warn +from collections import Counter +from jscc.testing.checks import get_empty_files, get_misindented_files, get_invalid_json_files +from jscc.testing.util import warn_and_assert +from jscc.testing.filesystem import walk_json_data, walk_csv_data +from jscc.schema import is_json_schema +from jscc.testing.checks import validate_items_type, validate_letter_case, validate_schema + +import pytest +import os +import json + + +this_dir = os.path.dirname(os.path.realpath(__file__)) +absolute_source_schema_dir = this_dir + '/../schema/' +absolute_source_codelist_dir = this_dir + '/../codelists/' + + +def test_empty(): + empty_files_paths = [path for path in get_empty_files() if "src/" not in path[0]] + warn_and_assert(empty_files_paths, "{0} is empty, run: rm {0}", "Files are empty. See warnings below.") + + +def test_indent(): + misindented_files_paths = [path for path in get_misindented_files() if "src/" not in path[0]] + warn_and_assert( + misindented_files_paths, + "{0} is not indented as expected", + "Files are not indented as expected. See warnings below", + ) + + +def test_invalid_json(): + warn_and_assert( + get_invalid_json_files(excluded=('.git', '.ve', '_static', 'build', 'fixtures', "_build")), "{0} is not valid JSON: {1}", "JSON files are invalid. See warnings below." + ) + + +schemas = [(path, name, data) for path, name, _, data in walk_json_data(top=absolute_source_schema_dir) if is_json_schema(data) and not path.endswith('tests/schema/meta-schema.json')] +# with open(os.path.join(this_dir, 'schema', 'meta-schema.json')) as fp: +# metaschema = json.load(fp) + + +# @pytest.mark.parametrize("path,name,data", schemas) +# def test_schema_valid(path, name, data): + +# # skip schemas generated by tests for now +# if "schema/testing" in path or "src/" in path: +# return +# validate_json_schema(path, name, data, metaschema) + + +@pytest.mark.parametrize("path,name,data", schemas) +def test_codelist_enums(path, name, data): + """ + Make sure the codes in the codelist CSVs match the equivalent enums in the schema. + """ + if "src/" in path: + return + + errors = 0 + + codelist_codes = collect_codelist_codes() + codelist_info = collect_codelist_enums(path, data) + + for codelist_file, codes in codelist_codes.items(): + if codelist_file in codelist_info: + codelist_enum = codelist_info[codelist_file][0] + open_codelist = codelist_info[codelist_file][1] + if not open_codelist and Counter(codelist_enum) != Counter(codes): + errors += 1 + warn("""Codelist mismatch:\n + {}: \n + {}\n + {} enum:\n + {}\n + """.format(codelist_file, codes, name, codelist_enum)) + + assert not errors, "Codelist files and schema enums out of sync, see warnings below." + + +def test_codelists_used(): + codelist_files = collect_codelist_files(absolute_source_codelist_dir) + + print('potato', codelist_files) + + codelists = set() + for path, name, data in schemas: + codelists.update(collect_codelist_values(path, data)) + + unused_codelists = [codelist for codelist in codelist_files if codelist not in codelists] + missing_codelists = [codelist for codelist in codelists if codelist not in codelist_files] + + assert len(unused_codelists) == 0, "Codelist files found not in schema: {}".format(unused_codelists) + assert len(missing_codelists) == 0, "Codelists in schema missing CSVs: {}".format(missing_codelists) + + +def validate_json_schema(path, name, data, schema): + if name == "codelist-schema.json": + return + errors = 0 + errors += validate_schema(path, data, schema) + errors += validate_items_type(path, data) + errors += validate_letter_case(path, data) + assert not errors, "One or more JSON Schema files are invalid. See warnings below." + + +def collect_codelist_values(path, data, pointer=''): + """ + Collects ``codelist`` values from JSON Schema. + From https://github.com/open-contracting/jscc/blob/main/jscc/testing/checks.py#L674 + """ + codelists = set() + + if isinstance(data, list): + for index, item in enumerate(data): + codelists.update(collect_codelist_values(path, item, pointer='{}/{}'.format(pointer, index))) + elif isinstance(data, dict): + if 'codelist' in data: + codelists.add(data['codelist']) + + for key, value in data.items(): + codelists.update(collect_codelist_values(path, value, pointer='{}/{}'.format(pointer, key))) + + return codelists + + +def collect_codelist_enums(path, data, pointer=''): + """ + Collects values of ``codelist``, ``enum`` and ``openCodelist`` from JSON Schema. + Adapted from collect_codelist_values + """ + codelists = {} + + if isinstance(data, list): + for index, item in enumerate(data): + codelists.update(collect_codelist_enums(path, item, pointer='{}/{}'.format(pointer, index))) + elif isinstance(data, dict): + if 'codelist' in data: + if data.get('type') == 'array' and 'items' in data: + codelists[data.get('codelist')] = ((data['items'].get('enum'), data.get('openCodelist'))) + else: + codelists[data.get('codelist')] = ((data.get('enum'), data.get('openCodelist'))) + + for key, value in data.items(): + codelists.update(collect_codelist_enums(path, value, pointer='{}/{}'.format(pointer, key))) + + return codelists + + +def collect_codelist_files(schema_dir): + codelist_files = set() + for csvpath, csvname, _, fieldnames, _ in walk_csv_data(top=schema_dir): + if 'Code' in fieldnames: + codelist_files.add(csvname) + + return codelist_files + + +def collect_codelist_codes(): + """ + Walk through all the codelist CSV files and get just the codes + """ + codelist_codes = {} + codelist_csvs = walk_csv_data(top=absolute_source_codelist_dir) + # (file path, file name, text content, fieldnames, rows) + for _, codelist_file, _, _, rows in codelist_csvs: + codes = [] + for row in rows: + codes.append(row.get('Code')) + codelist_codes[codelist_file] = codes + + return codelist_codes