Skip to content
Snippets Groups Projects
Commit 917dc095 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update Vale config, resolve a bunch of errors, warnings and suggestions

parent cb2d99a6
Branches
Tags
1 merge request!80Feature/update documentation
......@@ -19,7 +19,7 @@ html_css_files = ['custom.css']
html_js_files = ['custom.js']
html_logo = 'static/geant_logo_white.svg'
# Both the class' and the __init__ method's docstring are concatenated and inserted.
# Both the class' and the ``__init__`` method's docstring are concatenated and inserted.
autoclass_content = 'both'
# Display todos by setting to True
......
......@@ -2,7 +2,7 @@
Sub-packages and -modules
=========================
This page contains references to the documentation of all sub-packages and -modules that make up :term:`GSO`.
This page lists references to the documentation of all sub-packages and -modules that make up :term:`GSO`.
Subpackages
-----------
......
......@@ -4,7 +4,7 @@ Quickstart
Development environment and dependencies
----------------------------------------
- Install python 3.10 if you don't have it already:
- Install python 3.10 if you do not have it already:
- ``add-apt-repository ppa:deadsnakes/ppa``
- ``apt install python3.10 python3.10-distutils``
- Follow Steps 1 and 2 from here to install dependencies and setup DB:
......
......@@ -6,8 +6,8 @@ Vocab = geant-jargon, Sphinx
Packages = proselint, Microsoft
[*.{md,py}]
; We only lint .md and .py files
[*.{py,rst}]
; We only lint .rst and .py files
BasedOnStyles = Vale, proselint, Microsoft
; Some headers are generated and we have no real influence over them
Microsoft.Headings = NO
......@@ -22,10 +22,13 @@ proselint.Typography = warning
; Same applies for not using contractions
Microsoft.Contractions = NO
custom.Contractions = YES
; Using a "regular" - instead of an en dash is totally fine
Microsoft.Negative = NO
Microsoft.RangeFormat = NO
TokenIgnores = (:term:), (:param \S+:), (:type \S+:)
TokenIgnores = (:term:`\S+`), (:param \S+(?: \S+)?:), (:type \S+:), (:return \S+:), (:rtype: \S+)
[*/glossary.md]
[*/glossary.rst]
; Ignore acronyms being undefined in the file that defines all acronyms by definition.
Microsoft.Acronyms = NO
Microsoft.Contractions = NO
......@@ -33,4 +36,4 @@ custom.Contractions = YES
Microsoft.Passive = NO
[formats]
py = md
py = rst
......@@ -11,7 +11,7 @@ def netbox_initial_setup() -> None:
"""Set up NetBox for the first time.
It includes:
- Creating a default site (GEANT)
- Creating a default site (GÉANT)
- Creating device roles (Router)
"""
typer.echo("Initial setup of NetBox ...")
......@@ -19,7 +19,7 @@ def netbox_initial_setup() -> None:
nbclient = NetBoxClient()
typer.echo("Creating GEANT site ...")
typer.echo("Creating GÉANT site ...")
try:
nbclient.create_device_site("GEANT", "geant")
typer.echo("Site created successfully.")
......
......@@ -72,8 +72,7 @@ def _allocate_network(
def hostname_available(hostname: str) -> bool:
"""Check whether a hostname is still available **in Infoblox**.
Check whether Infoblox already contains a :class:`infoblox_client.objects.HostRecord` that matches the given
hostname.
Check whether Infoblox already has a :class:`infoblox_client.objects.HostRecord` that matches the given hostname.
.. warning::
This method only checks within the Infoblox instance, and not the rest of the internet. The hostname could
......@@ -260,7 +259,7 @@ def delete_host_by_fqdn(fqdn: str) -> None:
Delete a host record in Infoblox, by providing the :term:`FQDN` that is associated with the record. Raises a
:class:`DeletionError` if no record can be found in Infoblox.
:param fqdn: The FQDN of the host record that should get deleted.
:param fqdn: The :term:`FQDN` of the host record that should get deleted.
:type fqdn: str
"""
host = find_host_by_fqdn(fqdn)
......
......@@ -70,9 +70,8 @@ class NetBoxClient:
def create_interface(self, iface_name: str, type: str, speed: str, device_name: str) -> Interfaces:
"""Create new interface on a device, where device is defined by name.
The type parameter can be 1000base-t, 10gbase-t, lag...
For more details on type definition have a look in
choices.py in the netbox API implementation in module DCIM.
The type parameter can be 1000base-t, 10gbase-t, lag, etc.
For more details on type definition have a look in choices.py in the netbox API implementation in module DCIM.
Returns the new interface object as dict.
"""
device = self.get_device_by_name(device_name)
......
......@@ -285,19 +285,6 @@ def deploy_new_isis(
}
# Leaving it like this as a placeholder
# @step("Check ISIS metric")
# def check_isis(subscription: Iptrunk, process_id: UUIDstr) -> State:
# provisioning_proxy.check_ip_trunk(subscription, process_id, "VERB NEEDS TO BE UPDATED")
#
# logger.warning("Playbook verb is not yet properly set.")
#
# return {
# "subscription": subscription,
# "label_text": "Checking ISIS functionality, please refresh to get the results of the playbook.",
# }
@inputstep("Wait for confirmation", assignee=Assignee.SYSTEM)
def confirm_continue_restore_isis() -> FormGenerator:
class ProvisioningResultPage(FormPage):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment