Skip to content

Protocol Export from Protocol Developer#161

Open
Rohit-Kannachel wants to merge 3 commits intofeat-nysbc-feedbackfrom
protocol-export
Open

Protocol Export from Protocol Developer#161
Rohit-Kannachel wants to merge 3 commits intofeat-nysbc-feedbackfrom
protocol-export

Conversation

@Rohit-Kannachel
Copy link
Contributor

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

…a easier to read yaml file from protocol developer
if current_milling_dict is None:
current_milling_dict = {k: get_protocol_from_stages(v) for k, v in self.milling.items()}

milling_dict = self._reduced_milling_options_dict(current_milling_dict)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't agree with always removing these options from the dict, as others use the alignment/imaging settings. Instead of specifying method.name =="Waffle" (L1013), can you just add a flag here to remove the options for your use case. If it stays the way it is, it's gonna cause some silent issues later on

@patrickcleeve2 patrickcleeve2 requested a review from Copilot June 16, 2025 01:26
Copy link

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

Adds a streamlined export path for protocols by introducing methods to generate and save a base (less verbose) YAML representation of an experiment.

  • Introduces save_base_protocol to write out a simplified protocol file
  • Implements to_dict_base_protocol and helper _reduced_milling_options_dict for pared-down dictionary output
  • Retains full export via save and ensures backward compatibility
Comments suppressed due to low confidence (3)

autolamella/structures.py:1000

  • [nitpick] The attribute tmp is ambiguous. Consider renaming it to something more descriptive (e.g., default_options or template_options).
options_dict = self.tmp

autolamella/structures.py:1007

  • Add a docstring explaining the purpose, parameters, and return value of this helper to improve maintainability.
def _reduced_milling_options_dict(self,milling_dict):

autolamella/structures.py:985

  • Consider adding unit tests for save_base_protocol and to_dict_base_protocol to verify the reduced YAML structure is generated correctly.
def save_base_protocol(self, path: Path, current_milling_dict: dict = None) -> None:

patrickcleeve2 and others added 2 commits June 16, 2025 11:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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