• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vanvalenlab / deepcell-label / 4494173115

pending completion
4494173115

Pull #436

github

GitHub
Merge 4bfd476be into d83615b3c
Pull Request #436: Model training overhaul: SNGP model, uncertainty visualization, and custom embedding support

450 of 1157 branches covered (38.89%)

Branch coverage included in aggregate %.

14 of 619 new or added lines in 23 files covered. (2.26%)

81 existing lines in 8 files now uncovered.

3189 of 5394 relevant lines covered (59.12%)

525.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/frontend/src/Project/Instructions/Instructions.js
1
import Accordion from '@mui/material/Accordion';
2
import AccordionDetails from '@mui/material/AccordionDetails';
3
import AccordionSummary from '@mui/material/AccordionSummary';
4
import Box from '@mui/material/Box';
5
import { styled } from '@mui/material/styles';
6
import Tab from '@mui/material/Tab';
7
import Tabs from '@mui/material/Tabs';
8
import Typography from '@mui/material/Typography';
9
import PropTypes from 'prop-types';
10
import React from 'react';
11
import CanvasInstructions from './CanvasInstructions';
12
import CellsInstructions from './CellsInstructions';
13
import CellTypeInstructions from './CellTypeInstructions';
14
import DisplayInstructions from './DisplayInstructions';
15
import DivisionsInstructions from './DivisionsInstructions';
16
import OverviewInstructions from './OverviewInstructions';
17
import SegmentInstructions from './SegmentInstructions';
18
import SelectInstructions from './SelectInstructions';
19

UNCOV
20
const PREFIX = 'Instructions';
×
21

UNCOV
22
const classes = {
×
23
  root: `${PREFIX}-root`,
24
  expanded: `${PREFIX}-expanded`,
25
  root2: `${PREFIX}-root2`,
26
  content: `${PREFIX}-content`,
27
  expanded2: `${PREFIX}-expanded2`,
28
  root3: `${PREFIX}-root3`,
29
};
30

UNCOV
31
const Root = styled('div')(({ theme }) => ({
×
32
  [`& .${classes.root}`]: {
33
    border: '1px solid rgba(0, 0, 0, .125)',
34
    boxShadow: 'none',
35
    '&:not(:last-child)': {
36
      borderBottom: 0,
37
    },
38
    '&:before': {
39
      display: 'none',
40
    },
41
    '&$expanded': {
42
      m: 'auto',
43
    },
44
  },
45

46
  [`& .${classes.expanded}`]: {},
47

48
  [`& .${classes.root2}`]: {
49
    backgroundColor: 'rgba(0, 0, 0, .03)',
50
    borderBottom: '1px solid rgba(0, 0, 0, .125)',
51
    mb: -1,
52
    minHeight: 56,
53
    '&$expanded': {
54
      minHeight: 56,
55
    },
56
  },
57

58
  [`& .${classes.content}`]: {
59
    '&$expanded': {
60
      m: '12px 0',
61
    },
62
  },
63

64
  [`& .${classes.expanded2}`]: {},
65
}));
66

67
function TabPanel(props) {
68
  const { children, value, index, ...other } = props;
×
69

70
  return (
×
71
    <Root
72
      role='tabpanel'
73
      hidden={value !== index}
74
      id={`simple-tabpanel-${index}`}
75
      aria-labelledby={`simple-tab-${index}`}
76
      {...other}
77
    >
78
      {value === index && (
×
79
        <Box p={3}>
80
          <Typography component='div'>{children}</Typography>
81
        </Box>
82
      )}
83
    </Root>
84
  );
85
}
86

UNCOV
87
TabPanel.propTypes = {
×
88
  children: PropTypes.node,
89
  index: PropTypes.any.isRequired,
90
  value: PropTypes.any.isRequired,
91
};
92

93
export default function Instructions() {
94
  const [expanded, setExpanded] = React.useState(false);
×
95

96
  const [value, setValue] = React.useState(0);
×
97

98
  const handleTabChange = (event, newValue) => {
×
99
    setValue(newValue);
×
100
  };
101

102
  const toggleExpanded = () => {
×
103
    setExpanded(!expanded);
×
104
  };
105

106
  const stopExpansion = (event) => {
×
107
    if (event.key === ' ') {
×
108
      event.preventDefault();
×
109
    }
110
  };
111

112
  return (
×
113
    <div>
114
      <Accordion
115
        square
116
        expanded={expanded}
117
        onChange={toggleExpanded}
118
        TransitionProps={{ unmountOnExit: true }}
119
        classes={{
120
          root: classes.root,
121
          expanded: classes.expanded,
122
        }}
123
      >
124
        <AccordionSummary
125
          aria-controls='panel1d-content'
126
          id='panel1d-header'
127
          onKeyUp={stopExpansion}
128
          classes={{
129
            root: classes.root2,
130
            content: classes.content,
131
            expanded: classes.expanded2,
132
          }}
133
        >
134
          <Typography>Instructions (Click to expand/collapse)</Typography>
135
        </AccordionSummary>
136
        <AccordionDetails sx={{ p: 0, display: 'flex', flexDirection: 'column' }}>
137
          <Tabs value={value} onChange={handleTabChange}>
138
            <Tab label='Overview' />
139
            <Tab label='Select' />
140
            <Tab label='Canvas' />
141
            <Tab label='Display' />
142
            <Tab label='Segment' />
143
            <Tab label='Cells' />
144
            <Tab label='Divisions' />
145
            <Tab label='Cell Types' />
146
          </Tabs>
147
          <TabPanel value={value} index={0}>
148
            <OverviewInstructions />
149
          </TabPanel>
150
          <TabPanel value={value} index={1}>
151
            <SelectInstructions />
152
          </TabPanel>
153
          <TabPanel value={value} index={2}>
154
            <CanvasInstructions />
155
          </TabPanel>
156
          <TabPanel value={value} index={3}>
157
            <DisplayInstructions />
158
          </TabPanel>
159
          <TabPanel value={value} index={4}>
160
            <SegmentInstructions />
161
          </TabPanel>
162
          <TabPanel value={value} index={5}>
163
            <CellsInstructions />
164
          </TabPanel>
165
          <TabPanel value={value} index={6}>
166
            <DivisionsInstructions />
167
          </TabPanel>
168
          <TabPanel value={value} index={7}>
169
            <CellTypeInstructions />
170
          </TabPanel>
171
        </AccordionDetails>
172
      </Accordion>
173
    </div>
174
  );
175
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc