Exemplo n.º 1
0
        for (name, node) in self:
            node.prepare_simseries(ramflag)

    def prepare_obsseries(self, ramflag=True):
        for (name, node) in self:
            node.prepare_obsseries(ramflag)


class Elements(Devices):

    _contentclass = Element

    def prepare_allseries(self, ramflag=True):
        for (name, element) in self:
            element.prepare_allseries(ramflag)

    def prepare_inputseries(self, ramflag=True):
        for (name, element) in self:
            element.prepare_inputseries(ramflag)

    def prepare_fluxseries(self, ramflag=True):
        for (name, element) in self:
            element.prepare_fluxseries(ramflag)

    def prepare_stateseries(self, ramflag=True):
        for (name, element) in self:
            element.prepare_stateseries(ramflag)


autodoctools.autodoc_module()
Exemplo n.º 2
0
        warnings.filterwarnings(
            action="ignore",
            category=FutureWarning,
        )
        from hydpy import auxs
        from hydpy import core
        from hydpy import cythons
        from hydpy import exe
        from hydpy.core import autodoctools

        substituter = autodoctools.prepare_mainsubstituter()
        for subpackage in (auxs, core, cythons, exe):
            subpackagepath = subpackage.__path__[0]
            for filename in sorted(os.listdir(subpackagepath)):
                if filename.endswith(".py") and not filename.startswith("_"):
                    module = importlib.import_module(
                        f"{subpackage.__name__}.{filename[:-3]}"
                    )
                    autodoctools.autodoc_module(module)
        autodoctools.autodoc_module(importlib.import_module("hydpy.examples"))
        modelpath: str = models.__path__[0]
        for filename in sorted(os.listdir(modelpath)):
            path = os.path.join(modelpath, filename)
            if os.path.isdir(path) and not filename.startswith("_"):
                module = importlib.import_module(f"{models.__name__}.{filename}")
                autodoctools.autodoc_basemodel(module)
        for filename in sorted(os.listdir(modelpath)):
            if filename.endswith(".py") and not filename.startswith("_"):
                module = importlib.import_module(f"{models.__name__}.{filename[:-3]}")
                autodoctools.autodoc_applicationmodel(module)