bhowiebkr / laser-level-webcam

A tool for measuring height in microns of arbitrary sized objects using a webcam and a laser level.
MIT License
141 stars 13 forks source link

Freeze version numbers in requirements.txt to prevent accidentally incompatible upgrades #24

Open zylos146 opened 4 months ago

zylos146 commented 4 months ago

The requirements.txt file was using >= syntax for the version numbers. This meant the PySide6 dependency automatically upgraded beyond 6.7.0 which is incompatible with the syntax used by line 49 of src/cycle.py

  fl.addRow("Cycle time (s)", self.cycle_time_sb)
  fl.addRow(self.pb_start, self.pb_stop)

Adjusting this incompatibility likely wouldn't be hard, but I would recommend fixing python version numbers anyways. Other languages like NodeJS, and even other python utilities like PyEnv, favor using Package Lock files which enforce only intentional upgrades.

I am basing this off Equivalent of package.json and package-lock.json for pip

I've run pip3 freeze -r requirements.txt after getting all of the right package versions installed which is how the below file was generated.

I've also specified in the readme that Python 3.11 should be used. pyqtdarktheme does not support Python 3.12 yet and enforces Requires-Python <3.12,>=3.7

zylos146 commented 4 months ago

This likely doesn't address fully the build side of the system. The version fixing in the project TOML would need to be updated to limit <3.12 python, and I'm concerned how this would affect the package requirements in the built version + setup.cfg. People will be running this on installed systems and may not have exactly the versions in the frozen requirements.txt