Compare 82e7b23 ... +5 ... 0afa1a8

Coverage Reach
component_models/abstract_models/branch_models.py component_models/abstract_models/branch_w_internals_models.py component_models/abstract_models/const_flow_models.py component_models/abstract_models/branch_wo_internals_models.py component_models/abstract_models/circulation_pump.py component_models/abstract_models/component_models.py component_models/abstract_models/branch_wzerolength_models.py component_models/abstract_models/node_models.py component_models/abstract_models/__init__.py component_models/abstract_models/node_element_models.py component_models/pipe_component.py component_models/auxiliaries/build_system_matrix.py component_models/auxiliaries/derivative_toolbox.py component_models/auxiliaries/component_toolbox.py component_models/auxiliaries/__init__.py component_models/heat_exchanger_component.py component_models/valve_component.py component_models/ext_grid_component.py component_models/junction_component.py component_models/pump_component.py component_models/circulation_pump_pressure_component.py component_models/circulation_pump_mass_component.py component_models/__init__.py component_models/sink_component.py component_models/source_component.py plotting/collections.py plotting/patch_makers.py plotting/simple_plot.py plotting/generic_geodata.py plotting/__init__.py plotting/plotting_toolbox.py create.py networks/simple_water_networks.py networks/simple_gas_networks.py networks/simple_heat_transfer_networks.py networks/nw_aux.py networks/__init__.py properties/fluids.py properties/properties_toolbox.py properties/__init__.py pipeflow_setup.py pipeflow.py toolbox.py io/io_utils.py io/file_io.py io/convert_format.py io/__init__.py std_types/std_type.py std_types/std_type_toolbox.py std_types/__init__.py topology/create_graph.py topology/__init__.py timeseries/run_time_series.py timeseries/__init__.py idx_branch.py internals_toolbox.py pandapipes_net.py idx_node.py control/run_control.py control/__init__.py __init__.py constants.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -135,8 +135,7 @@
Loading
135 135
        >>> net = pandapipes.from_json_string(json_str)
136 136
137 137
    """
138 -
    net = create_empty_network()
139 -
    net = json.loads(json_string, cls=PPJSONDecoder, object_hook=partial(pp_hook, net=net,
138 +
    net = json.loads(json_string, cls=PPJSONDecoder, object_hook=partial(pp_hook,
140 139
                                                                         registry_class=FromSerializableRegistryPpipe))
141 140
142 141
    if convert:

@@ -241,7 +241,7 @@
Loading
241 241
        return d
242 242
243 243
    @classmethod
244 -
    def from_dict(cls, d, net):
244 +
    def from_dict(cls, d):
245 245
        obj = JSONSerializableClass.__new__(cls)
246 246
        d2 = {cls.prop_getter_entries[k]: v for k, v in d.items()
247 247
              if k in cls.prop_getter_entries.keys()}

@@ -7,9 +7,8 @@
Loading
7 7
from functools import partial
8 8
from inspect import isclass
9 9
10 -
import pandapower as pp
11 10
from pandapipes.component_models.abstract_models import Component
12 -
from pandapipes.create import create_empty_network as create_fluid_network
11 +
from pandapipes.create import create_empty_network
13 12
from pandapipes.pandapipes_net import pandapipesNet
14 13
from pandapower.io_utils import pp_hook
15 14
from pandapower.io_utils import with_signature, to_serializable, JSONSerializableClass, \
@@ -35,18 +34,8 @@
Loading
35 34
    class_name = ''
36 35
    module_name = ''
37 36
38 -
    def __init__(self, obj, d, net, ppipes_hook):
39 -
        super().__init__(obj, d, net, ppipes_hook)
40 -
41 -
    @from_serializable.register(class_name='pandapowerNet', module_name='pandapower.auxiliary')
42 -
    def pandapowerNet(self):
43 -
        if isinstance(self.obj, str):  # backwards compatibility
44 -
            from pandapower import from_json_string
45 -
            return from_json_string(self.obj)
46 -
        else:
47 -
            net = pp.create_empty_network()
48 -
            net.update(self.obj)
49 -
            return net
37 +
    def __init__(self, obj, d, ppipes_hook):
38 +
        super().__init__(obj, d, ppipes_hook)
50 39
51 40
    @from_serializable.register(class_name="method")
52 41
    def method(self):
@@ -62,8 +51,9 @@
Loading
62 51
            from pandapipes import from_json_string
63 52
            return from_json_string(self.obj)
64 53
        else:
65 -
            self.net.update(self.obj)
66 -
            return self.net
54 +
            net = create_empty_network()
55 +
            net.update(self.obj)
56 +
            return net
67 57
68 58
    @from_serializable.register()
69 59
    def rest(self):
@@ -72,10 +62,12 @@
Loading
72 62
        if isclass(class_) and issubclass(class_, JSONSerializableClass):
73 63
            if isinstance(self.obj, str):
74 64
                self.obj = json.loads(self.obj, cls=PPJSONDecoder,
75 -
                                      object_hook=partial(pp_hook, net=self.net,
65 +
                                      object_hook=partial(pp_hook,
76 66
                                                          registry_class=FromSerializableRegistryPpipe))
77 67
                                                          # backwards compatibility
78 -
            return class_.from_dict(self.obj, self.net)
68 +
            if "net" in self.obj:
69 +
                del self.obj["net"]
70 +
            return class_.from_dict(self.obj)
79 71
        if isclass(class_) and issubclass(class_, Component):
80 72
            return class_
81 73
        else:

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
pandapipes 0.14% 91.51%
Project Totals (62 files) 91.51%
Loading