Skip to content

Conversation

@Rohit-Kannachel
Copy link
Contributor

Tried to implement a less complex protocol export function to create an easier to read yaml file from protocol developer

…a easier to read yaml file from protocol developer
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a streamlined “Export Base Protocol” feature to the Fibsem milling stage editor, allowing users to dump core milling settings into a simplified YAML template.

  • Imported a file‐save dialog helper.
  • Added an “Export as Base Protocol” button to the widget.
  • Implemented export_base_protocol to deep‐copy the current protocol and save it.
Comments suppressed due to low confidence (3)

fibsem/ui/FibsemMillingStageEditorWidget.py:1258

  • [nitpick] This helper method appears to be private, but isn’t prefixed with an underscore. For consistency with _initialise_widgets, consider renaming to _export_base_protocol.
def export_base_protocol(self):

fibsem/ui/FibsemMillingStageEditorWidget.py:1258

  • The new export_base_protocol workflow isn’t exercised by existing tests. Consider adding a unit test that mocks the save dialog and validates the emitted YAML output to maintain coverage.
def export_base_protocol(self):

fibsem/ui/FibsemMillingStageEditorWidget.py:1267

  • The code uses copy.deepcopy but there is no import copy in this file, which will raise a NameError. Please add import copy at the top.
current_milling_dict = copy.deepcopy(selected_lamella.protocol)

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