Skip to content

Conversation

@mikeprosserni
Copy link
Collaborator

@mikeprosserni mikeprosserni commented May 27, 2025

What does this Pull Request accomplish?

This PR updates the .proto file to match the .proto file in ASW, adding EnumeratePanels() and ClosePanel() to the API.

Since PanelClient maps directly to the stub generated from the proto file, I'm also adding both enumerate_panels() and close_panel() to PanelClient.

However, since Panel.enumerate_panels() (which would return a list of ids) wouldn't really make sense, I'm only adding Panel.close_panel() to Panel.

Why should this Pull Request be merged?

Implements AB#3121339 - Add ClosePanel stubs to Python Client Library

What testing has been done?

In test_streamlit_panel.py, I added these new tests:
test___opened_panel_with_value___close_without_reset___gets_value
test___opened_panel_with_value___close_with_reset___get_throws

Since I couldn't test enumerate_panels() from there, I also added a new set of tests for PanelClient, in test_panel_client.py:
test___enumerate_is_empty
test___open_panels___enumerate_has_panels
test___open_panels___close_panel_1___enumerate_has_panel_2
test___get_unset_value_raises_exception
test___set_value___gets_value

@github-actions
Copy link
Contributor

github-actions bot commented May 27, 2025

Test Results

 10 files  ±  0   10 suites  ±0   11s ⏱️ +3s
 37 tests + 10   37 ✅ + 10  0 💤 ±0  0 ❌ ±0 
340 runs  +100  340 ✅ +100  0 💤 ±0  0 ❌ ±0 

Results for commit a559650. ± Comparison against base commit ee64290.

This pull request removes 1 and adds 11 tests. Note that renamed tests count towards both.
tests.unit.test_python_panel_service_stub ‑ test___get_value___gets_response
tests.unit.test_panel_client ‑ test___enumerate_is_empty
tests.unit.test_panel_client ‑ test___get_unset_value_raises_exception
tests.unit.test_panel_client ‑ test___open_panels___close_panel_1_with_reset___enumerate_has_panel_2
tests.unit.test_panel_client ‑ test___open_panels___close_panel_1_without_reset___enumerate_has_both_panels
tests.unit.test_panel_client ‑ test___open_panels___enumerate_has_panels
tests.unit.test_panel_client ‑ test___set_value___gets_value
tests.unit.test_python_panel_service_stub ‑ test___enumerate_panels___gets_response
tests.unit.test_python_panel_service_stub ‑ test___open_panel___close_panel___gets_response
tests.unit.test_python_panel_service_stub ‑ test___set_value___get_value___gets_response
tests.unit.test_streamlit_panel ‑ test___opened_panel_with_value___close_with_reset___get_throws
…

♻️ This comment has been updated with latest results.

@mikeprosserni mikeprosserni marked this pull request as ready for review May 27, 2025 20:16
@mikeprosserni mikeprosserni requested a review from csjall as a code owner May 27, 2025 20:16
@mikeprosserni mikeprosserni merged commit b523a1e into main May 28, 2025
14 checks passed
@mikeprosserni mikeprosserni deleted the users/mprosser/task-3121339-close-panel branch May 28, 2025 14:35
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.

4 participants