Commit 65e28252 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Added missing docstrings to __init__ methods

parent 6837868b
Pipeline #28965 passed with stage
in 1 minute and 50 seconds
......@@ -53,6 +53,12 @@ class AggregatedExposureModel(abc.ABC):
"""
def __init__(self, configuration):
"""
Args:
configuration (Configuration object):
Instance of the Configuration class.
"""
self.model_name = configuration.model_name
self.exposure_format = configuration.exposure_format
self.occupancy_cases = None
......
......@@ -44,6 +44,22 @@ class DataUnit:
"""
def __init__(self, dataunit_id, geometries_table, target_column_name):
"""
Args:
dataunit_id (str):
ID of the DataUnit (e.g. ID of the administrative unit it represents).
geometries_table (GeoPandas GeoDataFrame):
GeoPandas GeoDataFrame containing at least two columns:
target_column_name (str):
Column where the ID of the Data Unit will be sought. The data type of
the elements of this column needs to be 'string', otherwise the function
might fail to find the name of the Data Unit in it.
geometry (Shapely geometry):
Geometry.
target_column_name (str):
Name of the column in which the ID of the Data Unit will be sought.
"""
self.id = dataunit_id
self.geometry = self.get_data_unit_geometry(geometries_table, target_column_name)
self.data_unit_tiles = None
......
......@@ -82,6 +82,14 @@ class ExposureEntity:
"""
def __init__(self, name, config_code):
"""
Args:
name (str):
Name of the exposure entity.
config_code (str or dict):
Either "ISO3" (str) or a dictionary, of which name needs to be a key.
"""
self.name = name
self.code = self._interpret_exposure_entities_code(config_code)
self.occupancy_cases = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment