Skip to content

Implement connect() and disconnect() #19

Implement connect() and disconnect()

Implement connect() and disconnect() #19

GitHub Actions / Test Results failed Apr 24, 2025 in 0s

2 fail, 1 pass in 6s

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

Results for commit 5d5404f. ± Comparison against earlier commit 394b74a.

Annotations

Check warning on line 0 in tests.unit.test_panel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 10 runs failed: test___connected_panel___set_value___gets_same_value (tests.unit.test_panel)

test_results/nipanel-ubuntu-latest-py3.10.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.11.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.12.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.13.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.9.xml [took 0s]
test_results/nipanel-windows-latest-py3.10.xml [took 0s]
test_results/nipanel-windows-latest-py3.11.xml [took 0s]
test_results/nipanel-windows-latest-py3.12.xml [took 0s]
test_results/nipanel-windows-latest-py3.13.xml [took 0s]
test_results/nipanel-windows-latest-py3.9.xml [took 0s]
Raw output
FileNotFoundError: [WinError 2] The system cannot find the file specified
def test___connected_panel___set_value___gets_same_value() -> None:
        panel = nipanel.StreamlitPanel("my_panel", "path/to/script")
>       panel.connect()

tests\unit\test_panel.py:12: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src\nipanel\_panel.py:63: in connect
    channel = insecure_channel(self._get_channel_url())
src\nipanel\_streamlit_panel.py:27: in _get_channel_url
    service_location = discovery_client.resolve_service(
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_client.py:241: in resolve_service
    response = self._get_stub().ResolveService(request)
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_client.py:71: in _get_stub
    address = _get_discovery_service_address()
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:33: in _get_discovery_service_address
    key_file_path = _get_key_file_path()
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:124: in _get_key_file_path
    return _get_key_file_directory() / "DiscoveryService.json"
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:130: in _get_key_file_directory
    return _get_nipath("NIPUBAPPDATADIR") / "MeasurementLink" / "Discovery" / version
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = 'NIPUBAPPDATADIR'

    def _get_nipath(name: str) -> pathlib.Path:
        if sys.platform == "win32":
            access: int = winreg.KEY_READ
            if "64" in name:
                access |= winreg.KEY_WOW64_64KEY
>           with winreg.OpenKey(
                winreg.HKEY_LOCAL_MACHINE,
                r"SOFTWARE\National Instruments\Common\Installer",
                access=access,
            ) as key:
E           FileNotFoundError: [WinError 2] The system cannot find the file specified

.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:173: FileNotFoundError

Check warning on line 0 in tests.unit.test_panel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 10 runs failed: test___with_panel___set_value___gets_same_value (tests.unit.test_panel)

test_results/nipanel-ubuntu-latest-py3.10.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.11.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.12.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.13.xml [took 0s]
test_results/nipanel-ubuntu-latest-py3.9.xml [took 0s]
test_results/nipanel-windows-latest-py3.10.xml [took 0s]
test_results/nipanel-windows-latest-py3.11.xml [took 0s]
test_results/nipanel-windows-latest-py3.12.xml [took 0s]
test_results/nipanel-windows-latest-py3.13.xml [took 0s]
test_results/nipanel-windows-latest-py3.9.xml [took 0s]
Raw output
FileNotFoundError: [WinError 2] The system cannot find the file specified
def test___with_panel___set_value___gets_same_value() -> None:
>       with nipanel.StreamlitPanel("my_panel", "path/to/script") as panel:

tests\unit\test_panel.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src\nipanel\_panel.py:47: in __enter__
    self.connect()
src\nipanel\_panel.py:63: in connect
    channel = insecure_channel(self._get_channel_url())
src\nipanel\_streamlit_panel.py:27: in _get_channel_url
    service_location = discovery_client.resolve_service(
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_client.py:241: in resolve_service
    response = self._get_stub().ResolveService(request)
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_client.py:71: in _get_stub
    address = _get_discovery_service_address()
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:33: in _get_discovery_service_address
    key_file_path = _get_key_file_path()
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:124: in _get_key_file_path
    return _get_key_file_directory() / "DiscoveryService.json"
.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:130: in _get_key_file_directory
    return _get_nipath("NIPUBAPPDATADIR") / "MeasurementLink" / "Discovery" / version
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

name = 'NIPUBAPPDATADIR'

    def _get_nipath(name: str) -> pathlib.Path:
        if sys.platform == "win32":
            access: int = winreg.KEY_READ
            if "64" in name:
                access |= winreg.KEY_WOW64_64KEY
>           with winreg.OpenKey(
                winreg.HKEY_LOCAL_MACHINE,
                r"SOFTWARE\National Instruments\Common\Installer",
                access=access,
            ) as key:
E           FileNotFoundError: [WinError 2] The system cannot find the file specified

.venv\Lib\site-packages\ni_measurement_plugin_sdk_service\discovery\_support.py:173: FileNotFoundError