hdmf-dev / hdmf

Compare c8f9374 ... +0 ... 566d7d5

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.

Showing 2 of 3 files from the diff.

@@ -310,6 +310,7 @@
Loading
310 310
                    # get path of link (the key used for tracking what's been built)
311 311
                    target_path = link_type.path
312 312
                    builder_name = os.path.basename(target_path)
313 +
                    parent_loc = os.path.dirname(target_path)
313 314
                    # get builder if already read, else build it
314 315
                    builder = self.__get_built(sub_h5obj.file.filename, target_path)
315 316
                    if builder is None:
@@ -319,6 +320,7 @@
Loading
319 320
                        else:
320 321
                            builder = self.__read_group(sub_h5obj, builder_name, ignore=ignore)
321 322
                        self.__set_built(sub_h5obj.file.filename, target_path, builder)
323 +
                    builder.location = parent_loc
322 324
                    link_builder = LinkBuilder(builder, k, source=h5obj.file.filename)
323 325
                    link_builder.written = True
324 326
                    kwargs['links'][builder_name] = link_builder
@@ -446,6 +448,8 @@
Loading
446 448
            self.write_group(self.__file, gbldr)
447 449
        for name, dbldr in f_builder.datasets.items():
448 450
            self.write_dataset(self.__file, dbldr, link_data)
451 +
        for name, lbldr in f_builder.links.items():
452 +
            self.write_link(self.__file, lbldr)
449 453
        self.set_attributes(self.__file, f_builder.attributes)
450 454
        self.__add_refs()
451 455
@@ -632,6 +636,8 @@
Loading
632 636
            target_filename = os.path.abspath(target_builder.source)
633 637
            parent_filename = os.path.abspath(parent.file.filename)
634 638
            relative_path = os.path.relpath(target_filename, os.path.dirname(parent_filename))
639 +
            if target_builder.location is not None:
640 +
                path = target_builder.location + path
635 641
            link_obj = ExternalLink(relative_path, path)
636 642
        else:
637 643
            msg = 'cannot create external link to %s' % path

@@ -104,6 +104,18 @@
Loading
104 104
        super(BaseBuilder, self).__setitem__(BaseBuilder.__attribute, dict())
105 105
        for name, val in attributes.items():
106 106
            self.set_attribute(name, val)
107 +
        self.__location = None
108 +
109 +
    @property
110 +
    def location(self):
111 +
        """
112 +
        The location of this Builder in its source
113 +
        """
114 +
        return self.__location
115 +
116 +
    @location.setter
117 +
    def location(self, val):
118 +
        self.__location = val
107 119
108 120
    @property
109 121
    def attributes(self):

Learn more Showing 24 files with coverage changes found.

Changes in src/hdmf/backends/hdf5/h5tools.py
-381
-51
-194
Loading file...
Changes in src/hdmf/build/builders.py
-227
-10
-30
Loading file...
Changes in src/hdmf/build/warnings.py
-4
Loading file...
Changes in src/hdmf/backends/hdf5/__init__.py
-3
Loading file...
Changes in src/hdmf/validate/__init__.py
-3
Loading file...
Changes in src/hdmf/backends/__init__.py
-1
Loading file...
Changes in src/hdmf/spec/__init__.py
-17
Loading file...
Changes in src/hdmf/build/__init__.py
-9
Loading file...
Changes in src/hdmf/spec/catalog.py
-92
-6
-3
Loading file...
Changes in src/hdmf/utils.py
-388
-20
-26
Loading file...
Changes in src/hdmf/container.py
-73
-3
-6
Loading file...
Changes in src/hdmf/backends/io.py
-36
-5
Loading file...
Changes in src/hdmf/data_utils.py
-208
-7
-46
Loading file...
Changes in src/hdmf/spec/write.py
-100
-9
-24
Loading file...
Changes in src/hdmf/validate/errors.py
-59
-1
-20
Loading file...
Changes in src/hdmf/spec/namespace.py
-190
-24
-51
Loading file...
Changes in src/hdmf/spec/spec.py
-464
-47
-185
Loading file...
Changes in src/hdmf/validate/validator.py
-212
-38
-85
Loading file...
Changes in src/hdmf/build/map.py
-657
-119
-314
Loading file...
Changes in src/hdmf/backends/hdf5/h5_utils.py
-103
-4
-64
Loading file...
Changes in src/hdmf/query.py
-57
-11
-36
Loading file...
Changes in src/hdmf/array.py
-72
-8
-58
Loading file...
Changes in src/hdmf/__init__.py
-6
-6
Loading file...
Changes in src/hdmf/monitor.py
-44
Loading file...
Files Coverage
src/hdmf 0.62% 68.71%
Project Totals (24 files) 68.71%
Loading