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

feature/SOF 7352 #123

Merged
merged 22 commits into from May 13, 2024
Merged

feature/SOF 7352 #123

merged 22 commits into from May 13, 2024

Conversation

VsevolodX
Copy link
Contributor

  • update: add a prompt
  • update: add interactive mode for selection of t
  • update: fix to work
  • update: rename and return the object
  • chore: import made from github
  • chore: fid
  • chore: import made from github
  • update: sync and async functionality
  • update: use new io
  • update: write the only way that this works in both python and pyodide
  • chore: update
  • chore: explain the wheel server usage
  • update: refactor to remove duplication
  • update: display cells in natural size
  • chore: minor adjustemtns

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB



def user_select_array_element_by_index(
array: List[Any], element_name: str = "element", prompt_head: Optional[str] = None
Copy link
Member

Choose a reason for hiding this comment

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

Docstring here and below

utils/io.py Outdated
return prompt_head + prompt_body


def process_selected_index(selected_index_str: str, array: List[Any], element_name: str) -> Any:
Copy link
Member

Choose a reason for hiding this comment

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

What does it actually do??

utils/io.py Outdated
return array[selected_index]


def user_select_array_element_by_index(
Copy link
Member

Choose a reason for hiding this comment

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

ui_prompt_select_array_element_by_index

utils/io.py Outdated
) -> Any:
prompt_text = create_prompt_text(array, element_name, prompt_head)
selected_index_str = input(prompt_text)
result = process_selected_index(selected_index_str, array, element_name)
Copy link
Member

Choose a reason for hiding this comment

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

index = get_integer_value_from_prompt(input(prompt_text))
result = array[index]

@VsevolodX VsevolodX merged commit aa30aaf into dev May 13, 2024
8 checks passed
@VsevolodX VsevolodX deleted the feature/SOF-7352 branch May 13, 2024 03:04
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.

None yet

2 participants