Skip to content
Snippets Groups Projects
Verified Commit 1c2b47fa authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Update CI, add missing acronyms, update ignored tokens for now docstring style

parent e016ae60
No related branches found
No related tags found
1 merge request!316Replace Sphinx with MkDocs
Pipeline #90742 failed
...@@ -79,7 +79,7 @@ lint-documentation: ...@@ -79,7 +79,7 @@ lint-documentation:
- vale sync - vale sync
script: 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 documentation artefacts
publish-docs-prod-1: publish-docs-prod-1:
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*[BGP]: Border Gateway Protocol *[BGP]: Border Gateway Protocol
*[BSS]: Business Support Systems *[BSS]: Business Support Systems
*[CFS]: Customer Facing Service *[CFS]: Customer Facing Service
*[CIDR]: Classless Inter-Domain Routing
*[DCIM]: Datacenter Infrastructure Manager *[DCIM]: Datacenter Infrastructure Manager
*[DHCP]: Dynamic Host Configuration Protocol *[DHCP]: Dynamic Host Configuration Protocol
*[DNS]: Domain Name System *[DNS]: Domain Name System
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
*[IS-IS]: Intermediate System to Intermediate System *[IS-IS]: Intermediate System to Intermediate System
*[ISO]: International Standards Organisations *[ISO]: International Standards Organisations
*[L3VPN]: Layer 3 VPN *[L3VPN]: Layer 3 VPN
*[LACP]: Link Aggregation Control Protocol
*[LLDP]: Link-Layer Discovery Protocol *[LLDP]: Link-Layer Discovery Protocol
*[LSO]: Lightweight Service Orchestrator *[LSO]: Lightweight Service Orchestrator
*[MAC]: Medium Access Control *[MAC]: Medium Access Control
...@@ -43,4 +45,6 @@ ...@@ -43,4 +45,6 @@
*[TBA]: To be added *[TBA]: To be added
*[UAT]: User Acceptance Testing *[UAT]: User Acceptance Testing
*[VM]: Virtual Machine *[VM]: Virtual Machine
*[VRF]: Virtual Routing and Forwarding
*[WAN]: Wide Area Network
*[WFO]: Workflow Orchestrator *[WFO]: Workflow Orchestrator
#!/bin/bash
vale --config=vale/.vale.ini sync
vale --glob='!*/migrations/*' --config=vale/.vale.ini source ../gso
...@@ -17,6 +17,7 @@ Microsoft.Passive = NO ...@@ -17,6 +17,7 @@ Microsoft.Passive = NO
; We are not a general audience ; We are not a general audience
Microsoft.GeneralURL = NO Microsoft.GeneralURL = NO
Microsoft.We = NO Microsoft.We = NO
Microsoft.Vocab = NO
[*.py] [*.py]
; We only lint .rst and .py files ; We only lint .rst and .py files
...@@ -30,7 +31,9 @@ Microsoft.Negative = NO ...@@ -30,7 +31,9 @@ Microsoft.Negative = NO
Microsoft.RangeFormat = NO Microsoft.RangeFormat = NO
Microsoft.SentenceLength = 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] [*.md]
BasedOnStyles = Vale, proselint, Microsoft BasedOnStyles = Vale, proselint, Microsoft
......
...@@ -7,7 +7,9 @@ Ansible ...@@ -7,7 +7,9 @@ Ansible
BFD BFD
BGP BGP
BSS BSS
CIDR
CFS CFS
CNAME
DCIM DCIM
DDI DDI
DHCP DHCP
...@@ -38,6 +40,7 @@ IS-?IS ...@@ -38,6 +40,7 @@ IS-?IS
ISO ISO
Kentik Kentik
L3VPN L3VPN
LACP
LAG LAG
LLDP LLDP
LSO LSO
...@@ -71,7 +74,9 @@ UTC ...@@ -71,7 +74,9 @@ UTC
UUID UUID
V?LAN V?LAN
VM VM
VRF
Vereniging Vereniging
WAN
WFO WFO
[Aa]ddress [Aa]ddress
[Aa]llocate [Aa]llocate
......
...@@ -144,7 +144,7 @@ class OIDCAuthentication(OIDCAuth): ...@@ -144,7 +144,7 @@ class OIDCAuthentication(OIDCAuth):
raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail=response.text) raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail=response.text)
if "active" not in data: 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") raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail="Missing active key")
if not data.get("active", False): if not data.get("active", False):
logger.info("User is not active", user_info=data) logger.info("User is not active", user_info=data)
......
...@@ -154,7 +154,7 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: ...@@ -154,7 +154,7 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
geant_sid: str = current_sbp.geant_sid geant_sid: str = current_sbp.geant_sid
is_tagged: bool = current_sbp.is_tagged 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. # 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] vlan_id: VLAN_ID = current_sbp.vlan_id # type: ignore[assignment]
ipv4_address: IPv4AddressType = current_sbp.ipv4_address # type: ignore[assignment] ipv4_address: IPv4AddressType = current_sbp.ipv4_address # type: ignore[assignment]
......
"""A task that checks for all products in the database to be well-kept.""" """A task that checks for all products in the database to be well-kept."""
# .. vale off
# Copyright 2019-2020 SURF. # Copyright 2019-2020 SURF.
# Copyright 2024 GÉANT Vereniging. # Copyright 2024 GÉANT Vereniging.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# .. vale on
from orchestrator.targets import Target from orchestrator.targets import Target
from orchestrator.workflow import StepList, done, init, workflow from orchestrator.workflow import StepList, done, init, workflow
......
...@@ -555,7 +555,7 @@ def test_import_iptrunk_successful(mock_start_process, mock_sleep, iptrunk_data) ...@@ -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.time.sleep")
@patch("gso.cli.imports.start_process") @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): 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"]) import_iptrunks(broken_data["path"])
captured_output, _ = capfd.readouterr() captured_output, _ = capfd.readouterr()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment