diff --git a/docs/source/conf.py b/docs/source/conf.py index 7126a483de6d439e044f42153ee3af80afe710af..329a95dd76cd94377903a5b1e2f40d3ad2076455 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 diff --git a/docs/source/modules.rst b/docs/source/modules.rst index 2a4c409bd19b1175b67bf0d7023eeaff19e1f6b2..37bab35941863cced5a394247e5da7262b6f9f92 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -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 ----------- diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 5b6c8ac2d9c996876ab0bf5aa6723450b2d7e0b1..bc9d7e0fb5d15dcabc903fde0f2b05ed99601f04 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -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: diff --git a/docs/vale/.vale.ini b/docs/vale/.vale.ini index 1f9ef177232fd1fd139e04c04d44ab48cb824450..9cac78e330bb4b69cce5b1dd546c9d8fb8167170 100644 --- a/docs/vale/.vale.ini +++ b/docs/vale/.vale.ini @@ -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 diff --git a/gso/cli/netbox.py b/gso/cli/netbox.py index 97acdcf84bf0bd70320594c022087a6400f07486..08694be5d27679cc71c041999fc064d1888231b2 100644 --- a/gso/cli/netbox.py +++ b/gso/cli/netbox.py @@ -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.") diff --git a/gso/services/infoblox.py b/gso/services/infoblox.py index c148007414c339272073d2272fd1ed438f22ac41..7e902e9456ca07f8aa54fb862df81dc3e51f9164 100644 --- a/gso/services/infoblox.py +++ b/gso/services/infoblox.py @@ -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) diff --git a/gso/services/netbox_client.py b/gso/services/netbox_client.py index a66aae8692b91249a1c460b5aa5d120c74df6237..f13fe47741111c9be68c31abe5e6005349499ce4 100644 --- a/gso/services/netbox_client.py +++ b/gso/services/netbox_client.py @@ -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) diff --git a/gso/workflows/iptrunk/migrate_iptrunk.py b/gso/workflows/iptrunk/migrate_iptrunk.py index b492606b5641274d94f26bb90ef88f9152af9ceb..a92dc29c6e78d3043cd52bd1508b4355630812b4 100644 --- a/gso/workflows/iptrunk/migrate_iptrunk.py +++ b/gso/workflows/iptrunk/migrate_iptrunk.py @@ -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):