DeltaRCM / DeltaMetrics
Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -1,4 +1,5 @@
Loading
1 1
import abc
2 +
import warnings
2 3
3 4
import numpy as np
4 5
from scipy import stats, sparse
@@ -203,10 +204,10 @@
Loading
203 204
        self._trace = None
204 205
        self._shape = None
205 206
        self._variables = None
206 -
        self._name = name
207 207
        self.cube = None
208 208
209 209
        self.section_type = section_type
210 +
        self._name = name
210 211
211 212
        if len(args) > 1:
212 213
            raise ValueError('Expected single positional argument to \
@@ -228,7 +229,8 @@
Loading
228 229
                                _gottype=type(CubeInstance)))
229 230
        self.cube = CubeInstance
230 231
        self._variables = self.cube.variables
231 -
        self._name = self._name or name or self.section_type
232 +
        # self._name = self._name or name or self.section_type
233 +
        self.name = name  # use the setter to determine the _name
232 234
        self._compute_section_coords()
233 235
        self._compute_section_attrs()
234 236
@@ -236,6 +238,20 @@
Loading
236 238
    def name(self):
237 239
        return self._name
238 240
241 +
    @name.setter
242 +
    def name(self, var):
243 +
        if (self._name is None):
244 +
            # _name is not yet set
245 +
            self._name = var or self.section_type
246 +
        else:
247 +
            # _name is already set
248 +
            if not (var is None):
249 +
                warnings.warn(UserWarning("`name` argument supplied to \
250 +
                    instantiated `Section` object. To change the name of \
251 +
                    a Section, you must set the attribute directly with \
252 +
                    `section._name = 'name'`."))
253 +
            # do nothing
254 +
239 255
    @abc.abstractmethod
240 256
    def _compute_section_coords(self):
241 257
        """Should calculate x-y coordinates of the section.
Files Coverage
deltametrics 91.02%
Project Totals (8 files) 91.02%
codecov-umbrella
Build #329539029 -
PYTHON=3.6
OS=ubuntu-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.8
OS=ubuntu-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.7
OS=macos-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.7
OS=ubuntu-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.7
OS=windows-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.6
OS=windows-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.8
OS=macos-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.8
OS=windows-latest
codecov-umbrella
Build #329539029 -
PYTHON=3.6
OS=macos-latest

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading