has2k1 / plotnine
Showing 1 of 4 files from the diff.

@@ -29,14 +29,24 @@
Loading
29 29
    DEFAULT_PARAMS = {'stat': 'smooth', 'position': 'identity',
30 30
                      'na_rm': False, 'legend_fill_ratio': 0.5}
31 31
32 +
    def use_defaults(self, data, aes_modifiers):
33 +
        has_ribbon = 'ymin' in data and 'ymax' in data
34 +
        data = super().use_defaults(data, aes_modifiers)
35 +
36 +
        # When there is no ribbon, the default values for 'ymin'
37 +
        # and 'ymax' are None (not numeric). So we remove them
38 +
        # prevent any computations that may use them without checking.
39 +
        if not has_ribbon:
40 +
            del data['ymin']
41 +
            del data['ymax']
42 +
        return data
43 +
32 44
    def setup_data(self, data):
33 45
        return data.sort_values(['PANEL', 'group', 'x'])
34 46
35 47
    @staticmethod
36 48
    def draw_group(data, panel_params, coord, ax, **params):
37 -
        _loc = data.columns.get_loc
38 -
        has_ribbon = (data.iloc[0, _loc('ymin')] is not None and
39 -
                      data.iloc[0, _loc('ymax')] is not None)
49 +
        has_ribbon = 'ymin' in data and 'ymax' in data
40 50
        if has_ribbon:
41 51
            data2 = data.copy()
42 52
            data2['color'] = None
Files Coverage
plotnine 85.21%
Project Totals (153 files) 85.21%
py3.6
Build #1255049725 -
py3.9
Build #1255049725 -
py3.9
Build #1255067342 -
py3.6
Build #1255067342 -
1
codecov:
2
  require_ci_to_pass: true
3
  token: 58d59fa2-ed00-4601-8824-ae0b4ec64ca3
4

5
comment:
6
   behavior: default
7
   branches:
8
      - 'master'
9

10
coverage:
11
   round: 'down'
12
   range: 90..100
13
   status:
14
      project:
15
         default:
16
            target: auto
17
            threshold: 0.5%
18

19
      # Lines adjusted in the PR
20
      patch:
21
         default:
22
            target: 75%
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