ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
447 stars 161 forks source link

installdriver: prompt on fresh install #624

Closed zhindes closed 3 months ago

zhindes commented 3 months ago

What does this Pull Request accomplish?

This adds a prompt for confirmation before kicking off a fresh install. Previously, we only prompted on upgrade. This has two benefits:

  1. (Windows & Linux) Clarity on what is being installed
  2. (Linux) A chance to opt out before we march forward interacting with the package manager

I also made a few minor cleanups

Why should this Pull Request be merged?

Closes #623

What testing has been done?

Validated on an upgrade scenario:

$ poetry run python -m nidaqmx installdriver
Installed NI-DAQmx version is 23.5.0. Latest version available is 24.3.0 (2024Q2). Do you want to upgrade? (yes/no):

Fresh install scenario:

$ poetry run python -m nidaqmx installdriver
Latest NI-DAQmx version available is 24.3.0 (2024Q2). Do you want to install? (yes/no):

mypy happy

$ poetry run mypy
Success: no issues found in 175 source files