Skip to content

Commit

Permalink
Update file headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Sep 3, 2024
1 parent 1f44f8b commit 23687c2
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 12 deletions.
6 changes: 4 additions & 2 deletions etrago/cluster/electrical.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
""" electrical.py defines the methods to cluster power grid networks
spatially for applications within the tool eTraGo."""

import logging
import os

logger = logging.getLogger(__name__)

if "READTHEDOCS" not in os.environ:
import logging


from pypsa import Network
from pypsa.clustering.spatial import (
Expand All @@ -50,7 +53,6 @@
)
from etrago.tools.utilities import set_control_strategies

logger = logging.getLogger(__name__)

__copyright__ = (
"Flensburg University of Applied Sciences, "
Expand Down
2 changes: 1 addition & 1 deletion etrago/cluster/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
""" gas.py defines the methods to cluster gas grid networks
spatially for applications within the tool eTraGo."""

import logging
import os

if "READTHEDOCS" not in os.environ:
import logging

from pypsa.clustering.spatial import (
aggregatebuses,
Expand Down
4 changes: 2 additions & 2 deletions etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
# File description for read-the-docs
""" spatial.py defines the methods to run spatial clustering on networks."""

import logging
import os

if "READTHEDOCS" not in os.environ:
from itertools import product
from math import ceil
import logging
import multiprocessing as mp

from networkx import NetworkXNoPath
Expand All @@ -49,7 +49,7 @@
connected_transformer,
)

logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)

__copyright__ = (
"Flensburg University of Applied Sciences, "
Expand Down
43 changes: 40 additions & 3 deletions etrago/disaggregate/spatial.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2023 Flensburg University of Applied Sciences,
# Europa-Universität Flensburg,
# Centre for Sustainable Energy Systems,
# DLR-Institute for Networked Energy Systems
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# File description
"""
spatial.py defines the methods to run spatial disaggregation on networks.
"""

from functools import reduce
from itertools import product
from operator import methodcaller as mc, mul as multiply
Expand All @@ -9,9 +33,22 @@
from pypsa import Network
import pandas as pd

from etrago.tools import noops
from etrago.tools.utilities import residual_load

if "READTHEDOCS" not in os.environ:
from etrago.tools import noops
from etrago.tools.utilities import residual_load

__copyright__ = (
"Flensburg University of Applied Sciences, "
"Europa-Universität Flensburg, "
"Centre for Sustainable Energy Systems, "
"DLR-Institute for Networked Energy Systems"
)
__license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)"
__author__ = (
"MGlauer, MarlonSchlemminger, mariusves, BartelsJ, gnn, lukasoldi, "
"ulfmueller, lukasol, ClaraBuettner, CarlosEpia, KathiEsterl, "
"pieterhexen, fwitte, AmeliaNadal, cjbernal071421"
)

class Disaggregation:
def __init__(self, original_network, clustered_network, busmap, skip=()):
Expand Down
2 changes: 1 addition & 1 deletion etrago/disaggregate/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# File description
"""
execute.py defines optimization and simulation methods for the etrago object.
temporal.py defines the methods to run temporal disaggregation on networks.
"""
import logging
import os
Expand Down
8 changes: 5 additions & 3 deletions etrago/tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,21 @@
__author__ = "ulfmueller, mariusves, pieterhexen, ClaraBuettner"

from importlib import import_module
import logging
import os

import numpy as np
import pandas as pd
import pypsa

if "READTHEDOCS" not in os.environ:
import logging
logger = logging.getLogger(__name__)

if "READTHEDOCS" not in os.environ:

from sqlalchemy.orm.exc import NoResultFound
import saio

logger = logging.getLogger(__name__)


carr_ormclass = "Source"

Expand Down

0 comments on commit 23687c2

Please sign in to comment.