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:
- 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:
......
......@@ -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
#!/bin/bash
vale --config=vale/.vale.ini sync
vale --glob='!*/migrations/*' --config=vale/.vale.ini source ../gso
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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]
......
"""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
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment