Compare 27142cb ... +0 ... 9746253

Coverage Reach

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 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,14 +229,29 @@
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
235 237
    @property
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.

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
deltametrics 0.04% 91.02%
Project Totals (8 files) 91.02%
Loading