Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): display name in deck conflict error message #14185

Merged

Conversation

sanni-t
Copy link
Member

@sanni-t sanni-t commented Dec 12, 2023

Overview

In #14173 I didn't realize that labware_view.get_display_name provided only user-specified display name. So deck conflict error messages could say "None should be on an Opentrons adapter.." if no custom display name was specified for the tiprack.
This PR fixes that mistake.

Test Plan

The protocol attached in #14173 should now show errors with correct display names.

Changelog

  • renamed labware_view.get_display_name to get_user_specified_display_name
  • added a new labware_view.get_display_name that returns the user specified display name if present, else returns the display name from labware definition
  • use this new getter in the error message

Review requests

  • Usual code review stuff

Risk assessment

Low. Bug fix

@sanni-t sanni-t requested a review from a team as a code owner December 12, 2023 22:39
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY!

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #14185 (02ab742) into chore_release-7.1.0 (a859387) will not change coverage.
Report is 3 commits behind head on chore_release-7.1.0.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.1.0   #14185   +/-   ##
====================================================
  Coverage                70.42%   70.42%           
====================================================
  Files                     1636     1636           
  Lines                    54509    54509           
  Branches                  4026     4026           
====================================================
  Hits                     38390    38390           
  Misses                   15421    15421           
  Partials                   698      698           
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/src/opentrons/protocol_engine/state/labware.py 100.00% <ø> (ø)

@sanni-t sanni-t merged commit 3005cd4 into chore_release-7.1.0 Dec 12, 2023
31 checks passed
@sanni-t sanni-t deleted the fix-display-name-in-deck-conflict-error-message branch December 13, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants