Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
soaressgabriel committed Jun 30, 2021
1 parent 5a12cf6 commit a498ce0
Show file tree
Hide file tree
Showing 10 changed files with 132 additions and 267 deletions.
33 changes: 12 additions & 21 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,10 @@
#
# Contact: rubem.hydrological@labsid.eng.br

"""
/***************************************************************************
**RUBEM Hydrological
A Rainfall rUnoff Balance Enhanced Model wizard
**Description
-------------------
begin : **2021
copyright : **Laboratório de Sistemas de Suporte a
: Decisões Aplicados à Engenharia Ambiental e
: de Recursos Hídricos (LabSid) PHA-EPUSP
email : **rubem.hydrological@labsid.eng.br
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* any later version. *
* *
***************************************************************************/
"""RUBEM Hydrological plugin starting point.
This file is required by Python’s import system.
Also, QGIS requires that this file contains a `classFactory()` function, which is called when the plugin gets loaded into QGIS.
"""

__author__ = "LabSid PHA EPUSP"
Expand All @@ -49,6 +32,14 @@


def classFactory(iface):
"""Call when the plugin gets loaded into QGIS.
:param iface: Reference to the instance of `QgisInterface`.
:type iface: class
:return: Object of RUBEM Hydrological plugin’s class from the `rubem_hydrological.py` (`RUBEMHydrological`).
:rtype: class
"""
from .rubem_hydrological import RUBEMHydrological

return RUBEMHydrological(iface)
23 changes: 1 addition & 22 deletions help/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,7 @@
#
# Contact: rubem.hydrological@labsid.eng.br

"""
/***************************************************************************
**RUBEM Hydrological
A Rainfall rUnoff Balance Enhanced Model wizard
**Description
-------------------
begin : **2021
copyright : **Laboratório de Sistemas de Suporte a
: Decisões Aplicados à Engenharia Ambiental e
: de Recursos Hídricos (LabSid) PHA-EPUSP
email : **rubem.hydrological@labsid.eng.br
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* any later version. *
* *
***************************************************************************/
"""
"""RUBEM Hydrological help setup."""

__author__ = "LabSid PHA EPUSP"
__email__ = "rubem.hydrological@labsid.eng.br"
Expand Down
23 changes: 1 addition & 22 deletions rubem_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,7 @@
#
# Contact: rubem.hydrological@labsid.eng.br

"""
/***************************************************************************
**RUBEM Hydrological
A Rainfall rUnoff Balance Enhanced Model wizard
**Description
-------------------
begin : **2021
copyright : **Laboratório de Sistemas de Suporte a
: Decisões Aplicados à Engenharia Ambiental e
: de Recursos Hídricos (LabSid) PHA-EPUSP
email : **rubem.hydrological@labsid.eng.br
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* any later version. *
* *
***************************************************************************/
"""
"""RUBEM Hydrological plugin settings schemas."""

__author__ = "LabSid PHA EPUSP"
__email__ = "rubem.hydrological@labsid.eng.br"
Expand Down
33 changes: 6 additions & 27 deletions rubem_hydrological.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,9 @@
#
# Contact: rubem.hydrological@labsid.eng.br

"""
/***************************************************************************
**RUBEM Hydrological
A Rainfall rUnoff Balance Enhanced Model wizard
**Description
-------------------
begin : **2021
copyright : **Laboratório de Sistemas de Suporte a
: Decisões Aplicados à Engenharia Ambiental e
: de Recursos Hídricos (LabSid) PHA-EPUSP
email : **rubem.hydrological@labsid.eng.br
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* any later version. *
* *
***************************************************************************/
"""RUBEM Hydrological plugin main working code.
Contains all the information about the actions of the plugin and the main code.
"""

__author__ = "LabSid PHA EPUSP"
Expand Down Expand Up @@ -68,7 +50,7 @@ class RUBEMHydrological:
"""QGIS Plugin Implementation."""

def __init__(self, iface):
"""Constructor.
"""Initialize plugin setup.
:param iface: An interface instance that will be passed to this class
which provides the hook by which you can manipulate the QGIS
Expand Down Expand Up @@ -163,7 +145,6 @@ def add_action(
added to self.actions list.
:rtype: QAction
"""

icon = QIcon(icon_path)
action = QAction(icon, text, parent)
action.triggered.connect(callback)
Expand All @@ -188,7 +169,6 @@ def add_action(

def initGui(self):
"""Create the menu entries and toolbar icons inside the QGIS GUI."""

icon_path = ":/imgBase/images/icon.png"
self.add_action(
icon_path,
Expand All @@ -201,14 +181,13 @@ def initGui(self):
self.first_start = True

def unload(self):
"""Removes the plugin menu item and icon from QGIS GUI."""
"""Remove the plugin menu item and icon from QGIS GUI."""
for action in self.actions:
self.iface.removePluginMenu(self.tr("&RUBEM Hydrological"), action)
self.iface.removeToolBarIcon(action)

def run(self):
"""Run method that performs all the real work"""

"""Run method that performs all the real work."""
# Create the dialog with elements (after translation) and keep reference
# Only create GUI ONCE in callback, so that it will only load when the plugin is started
if self.first_start == True:
Expand Down
Loading

0 comments on commit a498ce0

Please sign in to comment.