Skip to content

Commit

Permalink
add a fixture to annotated steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Jul 23, 2024
1 parent a71d860 commit 4fc3048
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion api/src/opentrons/protocol_reader/file_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,3 @@ def _analyze_python_protocol(
api_level=parsed.api_level,
command_annotations=[],
)

8 changes: 6 additions & 2 deletions app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {
ProtocolAnalysisOutput,
RunTimeCommand,
} from '@opentrons/shared-data'
import { CommandAnnotation } from '@opentrons/shared-data/commandAnnotation/types'

Check failure on line 24 in app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx

View workflow job for this annotation

GitHub Actions / js checks

All imports in the declaration are only used as types. Use `import type`

Check failure on line 24 in app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx

View workflow job for this annotation

GitHub Actions / js checks

All imports in the declaration are only used as types. Use `import type`

interface AnnotatedStepsProps {
analysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput
Expand All @@ -45,8 +46,8 @@ export function AnnotatedSteps(props: AnnotatedStepsProps): JSX.Element {
}
`

// test with doitAllV8
const annotations = analysis.commandAnnotations ?? [
// TODO(ja, 7/23/24): remove stub
const FIXTURE_FOR_DO_IT_ALL_V8: CommandAnnotation[] = [
{
annotationType: 'secondOrderCommand',
machineReadableName: 'pipettes and module load commands',
Expand All @@ -59,6 +60,9 @@ export function AnnotatedSteps(props: AnnotatedStepsProps): JSX.Element {
},
]

// test with doitAllV8
const annotations = analysis.commandAnnotations ?? FIXTURE_FOR_DO_IT_ALL_V8

const groupedCommands = analysis.commands.reduce<
Array<LeafNode | ParentNode>
>((acc, c, i) => {
Expand Down

0 comments on commit 4fc3048

Please sign in to comment.