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):show plate reader files in run log #17369

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Jan 28, 2025

Overview

closes https://opentrons.atlassian.net/browse/RQA-3867.
append file names to state when given file name.

Test Plan and Hands on Testing

run the following protocol and make sure the files appear in the run log.

from typing import cast
from opentrons import protocol_api
from opentrons.protocol_api.module_contexts import AbsorbanceReaderContext

# metadata
metadata = {
    'protocolName': 'Absorbance Reader Demo',
    'author': 'Platform Expansion',
}

requirements = {
    "robotType": "Flex",
    "apiLevel": "2.21",
}

# protocol run function
def run(protocol: protocol_api.ProtocolContext):
    mod = cast(AbsorbanceReaderContext, protocol.load_module("absorbanceReaderV1", "D3"))
    plate = protocol.load_labware("nest_96_wellplate_200ul_flat", "C2")

    # Initialize to a single wavelength with reference wavelength
    mod.close_lid()
    mod.initialize('multi', [600, 450])

    # Remove the Plate Reader lid and move labware into the module.
    mod.open_lid()
    protocol.move_labware(plate, mod, use_gripper=True)
    mod.close_lid()

    # Take a reading and save to csv
    mod.read(export_filename="plate_reader_csv.csv")

see screenshot of example worked:
Screenshot 2025-01-28 at 1 23 21 PM

Changelog

append file names to state.

Review requests

changes make sense?

Risk assessment

low. bug fix.

@TamarZanzouri TamarZanzouri requested a review from a team as a code owner January 28, 2025 16:43
@TamarZanzouri TamarZanzouri requested review from CaseyBatten and vegano1 and removed request for a team and CaseyBatten January 28, 2025 16:43
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.

Makes sense to me!

@@ -181,6 +181,9 @@ async def execute( # noqa: C901
)
)
file_ids.append(file_id)
state_update.files_added = update_types.FilesAddedUpdate(
Copy link
Contributor

Choose a reason for hiding this comment

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

this will assign every measurement iteration, we should pull this out of the for loop so assignment happens once.

@TamarZanzouri TamarZanzouri requested a review from vegano1 January 28, 2025 18:27
Copy link
Contributor

@vegano1 vegano1 left a comment

Choose a reason for hiding this comment

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

thank you!

@TamarZanzouri TamarZanzouri merged commit f54a193 into chore_release-8.3.0 Jan 28, 2025
24 checks passed
@TamarZanzouri TamarZanzouri deleted the RQA-3867-flex-plate-reader-doesnt-have-an-output-in-the-protocol-run-log branch January 28, 2025 19:53
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