leoheck / kiri

Kiri is a visual tool designed for reviewing schematics and layouts of KiCad projects that are version-controlled with Git.
MIT License
493 stars 35 forks source link

Add Python requirements.txt #82

Closed MarcelRobitaille closed 1 year ago

MarcelRobitaille commented 1 year ago

This pull request moves the list of python dependencies from install_dependencies.sh into requirements.txt. There are a few reasons to do this:

  1. With the dependencies defined outside of the install script, it's possible to install them or easily read the list of dependencies with other tools without running the install script. For example, the reason I am making this PR is that in the PKGBUILD for the Arch User Repository package I maintain, I can just do pip install -r requirements.txt. Currently, I have pretty much the same 8 pip install lines that you have in install_dependencies.sh. If these lines are changed in kiri without my noticing, the AUR package would break.
  2. Having a requirements.txt file (or setup.py file) is the Python standard
  3. It should be faster to only invoke pip once with the full list of dependencies
leoheck commented 1 year ago

This pull request moves the list of python dependencies from install_dependencies.sh into requirements.txt. There are a few reasons to do this:

Ok.

  1. Ok, I am fine with this one
  2. I don't care
  3. Nah, it is run just once.

Here is your requirements.txt

grep "yes | pip" install_dependencies.sh | cut -d"\"" -f2

I don't like this file because it uses a silly name. Not even a creative one. The name requirements.txt means nothing. If it was at least python_requirements.txt I will think it is ok.

Are you ok if we name this file python_requirements.txt?