- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
API Overhaul #115
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
API Overhaul #115
Conversation
| Test Results   10 files  ±0     10 suites  ±0   25s ⏱️ -2s Results for commit 010d867. ± Comparison against base commit e96fe6e. This pull request removes 8 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. | 
…195342-update-hld
… provided interface is enough
There was a problem hiding this 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 performs a comprehensive API overhaul to generalize the panel service from Python-specific to a generic panels API that can support multiple panel types (Streamlit, LabVIEW, etc.). The changes include renaming the service from PythonPanelService to PanelService, introducing generic panel configurations, and updating all function names and class hierarchies to reflect the new generic design.
Key changes:
- Renamed PythonPanelServicetoPanelServicewith generic panel configuration support
- Updated API functions: create_panel()→create_streamlit_panel(),get_panel_accessor()→get_streamlit_panel_accessor()
- Consolidated class hierarchy by removing the Panelbase class and makingStreamlitPanelinherit directly fromPanelValueAccessor
Reviewed Changes
Copilot reviewed 51 out of 55 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| tests/utils/_fake_python_panel_servicer.py | Updated fake servicer to use new PanelService interfaces and handle generic panel configurations | 
| src/nipanel/_panel_client.py | Refactored client to use PanelService stub and generic panel configuration with StreamlitPanelConfiguration | 
| src/nipanel/_streamlit_panel.py | Moved panel functionality from removed Panel base class and updated to inherit from PanelValueAccessor | 
| src/nipanel/__init__.py | Updated public API exports to reflect renamed functions and classes | 
| src/ni/panels/v1/panel_service_pb2.py | New generated protobuf files for the generic PanelService | 
| examples/ | Updated all examples to use new API function names | 
Comments suppressed due to low confidence (1)
…195342-update-hld
What does this Pull Request accomplish?
Before sending the API to the API Review Board, we need to polish up the API.
Changes on the ASW side: PR
Proto API Changes:
PythonPanelServiceis now justPanelService, because in the future it could also provide LabVIEW panels.StartPanelRequestnow takes a genericpanel_configurationinstead of anything Streamlit-specific. There is a separatestreamlit_panel_configuration.protothat defines the Streamlit-specific configuration parameters.StartPanelResponsenow inclueds a URI instead of a URL, since LabVIEW panels might return a file path.Python API Changes:
nipanel.create_panel(panel_script_path)->nipanel.create_streamlit_panel(panel_script_path)nipanel.get_panel_accessor()->nipanel.get_streamlit_panel_accessor()Panelclass has been removed.StreamlitPanelinherits fromPanelValueAccessornow. All of the functionality inPanelwas actually Streamlit-specific, and has been moved intoStreamlitPanelinstead.StreamlitPanelValueAccessorclass has been removed. The genericPanelValueAccessorcan always be used, since it only interacts with the data store, not the panel itself.Why should this Pull Request be merged?
The API should be improved and reviewed as part of the SEP Review.
What testing has been done?