Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions and tests #166

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
512395f
actions: Link check
Nov 2, 2022
546f28c
actions: Link check - continue-on-error
Nov 2, 2022
41b9c5c
actions: Test mdformat action
Nov 2, 2022
8c76049
actions: Reformat mdformat
Nov 2, 2022
85c0489
actions: Sphinx-build action
Nov 2, 2022
4d01d56
actions: Rename sphinx build
Nov 2, 2022
0096ca7
actions: Add mdformat, and set up action
Nov 2, 2022
7a7c1d8
tests: Add basic CSV tests
Nov 2, 2022
0d50c35
actions: Add action to run all tests
Nov 2, 2022
b611567
tests: Add generic JSON tests
Nov 2, 2022
c21bd40
tests: Ensure paths are correct for schema and codelists
Nov 3, 2022
1ea4598
docs: Run mdformat
duncandewhurst Nov 4, 2022
a8bccff
docs/reference/schema.md: Run mdformat
duncandewhurst Nov 4, 2022
458b6ff
csv: Fix line endings and whitespace
Nov 25, 2022
d31960d
Revert "csv: Fix line endings and whitespace"
duncandewhurst Nov 28, 2022
e7448a5
codelists: Capitalise headers
duncandewhurst Nov 28, 2022
b51a10f
examples/csv: Fix line endings
duncandewhurst Nov 28, 2022
7e888ff
tests/test_json.py: Capitalise CSV headers
duncandewhurst Nov 28, 2022
7967416
manage.py: Capitalise codelist headers
duncandewhurst Nov 28, 2022
d0a6b1c
codelists/open/mediaType.csv: Add trailing newline
duncandewhurst Nov 28, 2022
667f33e
examples/csv: Fix line endings
duncandewhurst Nov 28, 2022
48f2920
schema: Remove trailing newline in phase.funders description
duncandewhurst Nov 28, 2022
6c0188e
manage.py: Make output compliant with mdformat
duncandewhurst Nov 29, 2022
d42b767
Run ./manage.py pre-commit
duncandewhurst Nov 29, 2022
63a3afc
codelists: Remove trailing whitespace
duncandewhurst Nov 29, 2022
fec0870
Use LF line terminator
duncandewhurst Nov 29, 2022
fb2c054
examples/json: Indent
duncandewhurst Nov 29, 2022
1a76441
network-schema.json: Fix enum for Span.deployment
duncandewhurst Nov 29, 2022
cbc8166
tests/test_json.py: Remove BODS-specific code
duncandewhurst Nov 29, 2022
42a772f
test/test_json.py: Don't check enums for open codelists, handle arrays
duncandewhurst Nov 29, 2022
788dbde
Merge branch '0.1-dev' into github-actions
duncandewhurst Nov 29, 2022
4b5c9d7
Run ocdskit indent -r
duncandewhurst Nov 29, 2022
81d7ea9
Fix broken links
duncandewhurst Nov 29, 2022
16eb4b0
Run mdformat
duncandewhurst Nov 29, 2022
6c987ce
Fix more broken links
duncandewhurst Nov 29, 2022
0844712
schema: WIP Codelist Schema
Nov 29, 2022
23af43f
requirements: Simplify files
Nov 30, 2022
de2a6f4
fix
Nov 30, 2022
e0d05f3
schema: Add a codelist schema
Nov 30, 2022
d193f7f
tests: Exclude the linkcheck build directory from json tests
Nov 30, 2022
ded3cb3
actions: Fix requirements change
Nov 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions .github/workflows/mdformat.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .github/workflows/sphinx-build.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.ve
*.swp
*~
_build
_build
.pyest*
__pycache__
6 changes: 3 additions & 3 deletions codelists/closed/deployment.csv
Original file line number Diff line number Diff line change
@@ -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."
16 changes: 8 additions & 8 deletions codelists/closed/fibreType.csv
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 3 additions & 3 deletions codelists/closed/geometryType.csv
Original file line number Diff line number Diff line change
@@ -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."
14 changes: 7 additions & 7 deletions codelists/closed/nodeStatus.csv
Original file line number Diff line number Diff line change
@@ -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."
14 changes: 7 additions & 7 deletions codelists/closed/spanStatus.csv
Original file line number Diff line number Diff line change
@@ -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."
10 changes: 5 additions & 5 deletions codelists/closed/transmissionMedium.csv
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 4 additions & 4 deletions codelists/open/contractType.csv
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 6 additions & 6 deletions codelists/open/linkRelationType.csv
Original file line number Diff line number Diff line change
@@ -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.
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.
2 changes: 1 addition & 1 deletion codelists/open/mediaType.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
offline/print,print
6 changes: 3 additions & 3 deletions codelists/open/nodeTechnologies.csv
Original file line number Diff line number Diff line change
@@ -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.
26 changes: 13 additions & 13 deletions codelists/open/nodeType.csv
Original file line number Diff line number Diff line change
@@ -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.
Loading