Skip to content

Conversation

@mikeprosserni
Copy link
Collaborator

@mikeprosserni mikeprosserni commented Apr 21, 2025

What does this Pull Request accomplish?

This PR defines the NiPanel interface class, with the methods that the user's measurement script will call.

Why should this Pull Request be merged?

This is the first step towards implementing the PythonPanel client API. Note that implementing the methods connect(), disconnect(), set_value() and get_value() will be done in subsequent PRs.

What testing has been done?

Two basic unit tests were added. One test calls each of the four methods directly, and the other test uses a with statement to call connect() and disconnect() automatically.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2025

Test Results

10 files  ± 0  10 suites  ±0   5s ⏱️ +4s
 3 tests + 2   3 ✅ + 2  0 💤 ±0  0 ❌ ±0 
30 runs  +20  30 ✅ +20  0 💤 ±0  0 ❌ ±0 

Results for commit f4d4a52. ± Comparison against base commit 258525c.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
tests.unit.test_placeholder ‑ test___placeholder
tests.unit.test_panel ‑ test___connected_panel___set_value___gets_same_value
tests.unit.test_panel ‑ test___streamlit_panel___has_panel_id_and_panel_uri
tests.unit.test_panel ‑ test___with_panel___set_value___gets_same_value

♻️ This comment has been updated with latest results.

@mikeprosserni mikeprosserni marked this pull request as ready for review April 21, 2025 20:50
@mikeprosserni mikeprosserni requested a review from Copilot April 21, 2025 20:52
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

This PR introduces the initial NiPanel interface as part of the Measurement Script API, laying the groundwork for future implementation of connect, disconnect, set_value, and get_value methods. Key changes include:

  • Defining the NiPanel class with context management support.
  • Adding basic unit tests for constructing, invoking, and using NiPanel via both direct calls and a with statement.
  • Cleaning up legacy placeholder tests.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/test_placeholder.py Removed placeholder test in favor of a focused test suite.
tests/unit/test_nipanel.py Added unit tests for the NiPanel functionality.
tests/init.py Added an init file with module documentation for tests.
src/nipanel/nipanel.py Introduced the NiPanel class with API stubs and context handling.
src/nipanel/init.py Updated module exports for the NiPanel class.
Files not reviewed (1)
  • .vscode/settings.json: Language not supported

@mikeprosserni mikeprosserni requested review from bkeryan and csjall April 21, 2025 20:53
@mikeprosserni mikeprosserni self-assigned this Apr 21, 2025
@mikeprosserni mikeprosserni requested a review from bkeryan April 22, 2025 16:07
@mikeprosserni mikeprosserni requested a review from bkeryan April 22, 2025 19:39
@mikeprosserni mikeprosserni merged commit 13e7f3c into main Apr 23, 2025
13 checks passed
@mikeprosserni mikeprosserni deleted the users/mprosser/task-3095678-define-api branch April 23, 2025 16: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.

3 participants