diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5dca71c934b84438e405d413e539524a77b132b8..f04ddf50b0dc96d9a73942114f9c85f0585e9809 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,7 +79,7 @@ lint-documentation: - vale sync script: - - vale --glob='!*/migrations/*' $CI_PROJECT_DIR/docs/ $CI_PROJECT_DIR/gso/ + - vale --glob='!*/migrations/*' $CI_PROJECT_DIR/docs/source $CI_PROJECT_DIR/gso/ ##### Publish documentation artefacts publish-docs-prod-1: diff --git a/docs/includes/glossary.md b/docs/includes/glossary.md index fc93b30caecde6546772b606aefa4819a95def96..4df9f9940521f78574c848c2f49bcfa76dd7899f 100644 --- a/docs/includes/glossary.md +++ b/docs/includes/glossary.md @@ -3,6 +3,7 @@ *[BGP]: Border Gateway Protocol *[BSS]: Business Support Systems *[CFS]: Customer Facing Service +*[CIDR]: Classless Inter-Domain Routing *[DCIM]: Datacenter Infrastructure Manager *[DHCP]: Dynamic Host Configuration Protocol *[DNS]: Domain Name System @@ -24,6 +25,7 @@ *[IS-IS]: Intermediate System to Intermediate System *[ISO]: International Standards Organisations *[L3VPN]: Layer 3 VPN +*[LACP]: Link Aggregation Control Protocol *[LLDP]: Link-Layer Discovery Protocol *[LSO]: Lightweight Service Orchestrator *[MAC]: Medium Access Control @@ -43,4 +45,6 @@ *[TBA]: To be added *[UAT]: User Acceptance Testing *[VM]: Virtual Machine +*[VRF]: Virtual Routing and Forwarding +*[WAN]: Wide Area Network *[WFO]: Workflow Orchestrator diff --git a/docs/test-docs.sh b/docs/test-docs.sh deleted file mode 100755 index 55ce69cfa7c84fe5151c157dc3e3df4b66240dd4..0000000000000000000000000000000000000000 --- a/docs/test-docs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -vale --config=vale/.vale.ini sync -vale --glob='!*/migrations/*' --config=vale/.vale.ini source ../gso diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index 544ed75c86ba74850525b59570ba3f089c65e783..06742e1a587711316b5140adf0c4bb7a86099bab 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -17,6 +17,7 @@ Microsoft.Passive = NO ; We are not a general audience Microsoft.GeneralURL = NO Microsoft.We = NO +Microsoft.Vocab = NO [*.py] ; We only lint .rst and .py files @@ -30,7 +31,9 @@ Microsoft.Negative = NO Microsoft.RangeFormat = NO Microsoft.SentenceLength = NO -TokenIgnores = (:term:`\S+`), (:param \S+(?: \S+)?:), (:type \S+:), (:return \S+:), (:rtype: \S+), (:class:`\S+`) +; This statement ignores the names of parameters in docstrings, the four spaces that prepend it and the one following it +; are necessary. +TokenIgnores = \S+: [*.md] BasedOnStyles = Vale, proselint, Microsoft diff --git a/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt b/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt index f6c9a3eb5e5976cbb5c73f33353a95b944600df9..6373503d95c7d4af174b0bb9a34cb988ec00a402 100644 --- a/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt +++ b/docs/vale/styles/config/vocabularies/geant-jargon/accept.txt @@ -7,7 +7,9 @@ Ansible BFD BGP BSS +CIDR CFS +CNAME DCIM DDI DHCP @@ -38,6 +40,7 @@ IS-?IS ISO Kentik L3VPN +LACP LAG LLDP LSO @@ -71,7 +74,9 @@ UTC UUID V?LAN VM +VRF Vereniging +WAN WFO [Aa]ddress [Aa]llocate diff --git a/gso/auth/oidc.py b/gso/auth/oidc.py index 1a10f6ca94964da0015bb63717db734e41208203..02720fe170e55250218f5bdc2f722add2b88d3ad 100644 --- a/gso/auth/oidc.py +++ b/gso/auth/oidc.py @@ -144,7 +144,7 @@ class OIDCAuthentication(OIDCAuth): raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail=response.text) if "active" not in data: - logger.error("Token doesn't have the mandatory 'active' key, probably caused by a caching problem") + logger.error("Token does not have the mandatory 'active' key, probably caused by a caching problem") raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail="Missing active key") if not data.get("active", False): logger.info("User is not active", user_info=data) diff --git a/gso/workflows/l3_core_service/modify_l3_core_service.py b/gso/workflows/l3_core_service/modify_l3_core_service.py index 630418f7897079b50c587dfeb61c4463d521b784..7dbeb4860ff5c322e1b6714572db2ab4fa6c8815 100644 --- a/gso/workflows/l3_core_service/modify_l3_core_service.py +++ b/gso/workflows/l3_core_service/modify_l3_core_service.py @@ -154,7 +154,7 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: geant_sid: str = current_sbp.geant_sid is_tagged: bool = current_sbp.is_tagged - # The SBP model doesn't require these five fields, but in the case of GÉANT IP OR IAS this will never + # The SBP model does not require these five fields, but in the case of GÉANT IP or IAS this will never # occur since it's a layer 3 service. The ignore statements are there to put our type checker at ease. vlan_id: VLAN_ID = current_sbp.vlan_id # type: ignore[assignment] ipv4_address: IPv4AddressType = current_sbp.ipv4_address # type: ignore[assignment] diff --git a/gso/workflows/tasks/validate_geant_products.py b/gso/workflows/tasks/validate_geant_products.py index ecbedb7933e4340a8a38265b91a125c2288c4057..a7bfcdaaaaca2a1b7d3b84766629829716530e3b 100644 --- a/gso/workflows/tasks/validate_geant_products.py +++ b/gso/workflows/tasks/validate_geant_products.py @@ -1,5 +1,6 @@ """A task that checks for all products in the database to be well-kept.""" +# .. vale off # Copyright 2019-2020 SURF. # Copyright 2024 GÉANT Vereniging. # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,6 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# .. vale on from orchestrator.targets import Target from orchestrator.workflow import StepList, done, init, workflow diff --git a/test/cli/test_imports.py b/test/cli/test_imports.py index 17a1bc13fa3deb71efe359e10c26c82cbb016966..fa378703d422aa49287eb0ff8f8c5c3794ae677f 100644 --- a/test/cli/test_imports.py +++ b/test/cli/test_imports.py @@ -555,7 +555,7 @@ def test_import_iptrunk_successful(mock_start_process, mock_sleep, iptrunk_data) @patch("gso.cli.imports.time.sleep") @patch("gso.cli.imports.start_process") def test_import_iptrunk_invalid_router_id_side_a_and_b(mock_start_process, mock_sleep, iptrunk_data, capfd): - broken_data = iptrunk_data(side_a_node="Doesn't exist", side_b_node="Also doesn't exist") + broken_data = iptrunk_data(side_a_node="Does not exist", side_b_node="Also does not exist") import_iptrunks(broken_data["path"]) captured_output, _ = capfd.readouterr()