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

resolve some sphinx warnings

parent e397b568
No related branches found
No related tags found
1 merge request!80Feature/update documentation
......@@ -34,15 +34,15 @@ def import_site(site: SiteImportModel) -> Dict[str, Any]:
"""Import a site by running the import_site workflow.
Args:
----
-----
site (SiteImportModel): The site information to be imported.
Returns:
-------
--------
dict: A dictionary containing the process id of the started process and detail message.
Raises:
------
-------
HTTPException: If the site already exists or if there's an error in the process.
"""
try:
......@@ -63,15 +63,15 @@ def import_router(router_data: RouterImportModel) -> Dict[str, Any]:
"""Import a router by running the import_router workflow.
Args:
----
-----
router_data (RouterImportModel): The router information to be imported.
Returns:
-------
--------
dict: A dictionary containing the process id of the started process and detail message.
Raises:
------
-------
HTTPException: If there's an error in the process.
"""
......@@ -84,15 +84,15 @@ def import_iptrunk(iptrunk_data: IptrunkImportModel) -> Dict[str, Any]:
"""Import an iptrunk by running the import_iptrunk workflow.
Args:
----
-----
iptrunk_data (IptrunkImportModel): The iptrunk information to be imported.
Returns:
-------
--------
dict: A dictionary containing the process id of the started process and detail message.
Raises:
------
-------
HTTPException: If there's an error in the process.
"""
......
......@@ -55,7 +55,7 @@ class SiteBlock(SiteBlockProvisioning, lifecycle=[SubscriptionLifecycle.ACTIVE])
site_name: str
"""The name of the site, that will dictate part of the :term:`FQDN` of routers that are hosted at this site. For
example: `router.X.Y.geant.net`, where X denotes the name of the site."""
example: ``router.X.Y.geant.net``, where X denotes the name of the site."""
site_city: str
"""The city at which the site is located."""
site_country: str
......
......@@ -7,8 +7,8 @@ from pydantic import ConstrainedStr
class LatitudeCoordinate(ConstrainedStr):
"""A latitude coordinate, modeled as a constrained string.
The coordinate must match the format conforming to the latitude
range of `-`90 to +90 degrees. It can be a floating-point number or an integer.
The coordinate must match the format conforming to the latitude range of -90 to +90 degrees. It can be a
floating-point number or an integer.
Valid examples: 40.7128, -74.0060, 90, -90, 0
"""
......@@ -26,7 +26,7 @@ class LongitudeCoordinate(ConstrainedStr):
"""A longitude coordinate, modeled as a constrained string.
The coordinate must match the format conforming to the longitude
range of `-`180 to 180 degrees. It can be a floating point number or an integer.
range of -180 to +180 degrees. It can be a floating point number or an integer.
Valid examples: 40.7128, -74.0060, 180, -180, 0
"""
......
......@@ -19,12 +19,12 @@ def get_active_subscriptions(
"""Retrieve active subscriptions for a specific product type.
Args:
----
-----
product_type (str): The type of the product for which to retrieve subscriptions.
fields (list[str]): List of fields to be included in the returned Subscription objects.
Returns:
-------
--------
list[Subscription]: A list of Subscription objects that match the query.
"""
dynamic_fields = [getattr(SubscriptionTable, field) for field in fields]
......@@ -44,11 +44,11 @@ def get_active_site_subscriptions(fields: list[str]) -> list[Subscription]:
"""Retrieve active subscriptions specifically for sites.
Args:
----
-----
fields (list[str]): The fields to be included in the returned Subscription objects.
Returns:
-------
--------
list[Subscription]: A list of Subscription objects for sites.
"""
return get_active_subscriptions(ProductType.SITE, fields)
......@@ -58,11 +58,11 @@ def get_active_router_subscriptions(fields: list[str]) -> list[Subscription]:
"""Retrieve active subscriptions specifically for routers.
Args:
----
-----
fields (list[str]): The fields to be included in the returned Subscription objects.
Returns:
-------
--------
list[Subscription]: A list of Subscription objects for routers.
"""
return get_active_subscriptions(product_type=ProductType.ROUTER, fields=fields)
......@@ -72,11 +72,11 @@ def get_product_id_by_name(product_name: ProductType) -> UUID:
"""Retrieve the :term:`UUID` of a product by its name.
Args:
----
-----
product_name (ProductType): The name of the product.
Returns:
-------
--------
:term:`UUID`: The :term:`UUID` of the product.
"""
return ProductTable.query.filter_by(name=product_name).first().product_id
......@@ -86,11 +86,11 @@ def get_active_site_subscription_by_name(site_name: str) -> Subscription:
"""Retrieve an active subscription for a site by the site's name.
Args:
----
-----
site_name (str): The name of the site for which to retrieve the subscription.
Returns:
-------
--------
Subscription: The Subscription object for the site.
"""
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment