NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.24k stars 626 forks source link

python/requirements.txt is missing scikit-image, vispy, ipython, and it shouldn't contain pytest #2912

Open yurivict opened 1 month ago

yurivict commented 1 month ago

There are import statements for these in the python code, therefore they should be in requirements.txt

On the other hand, pytest should be in the tests_require clause in setup.py, see here.

Version: 1.29.0

stevengj commented 1 month ago

Those aren't requirements for using the meep library itself — they are optional dependencies.

For example IPython is imported in a try block to enable optional features in Jupyter, but the code still works without it: https://github.com/NanoComp/meep/blob/b47d9ba3aebdd73e82db9eb0b0565cde2602d42f/python/simulation.py#L42-L44

vispy is used in plot3D, so the rest of meep runs fine without it, and only that function will throw an exception if you don't have vispy installed: https://github.com/NanoComp/meep/blob/b47d9ba3aebdd73e82db9eb0b0565cde2602d42f/python/visualization.py#L1064-L1065

scikit-image doesn't seem to be referenced anywhere in Meep, so I'm not sure what you are referring to?

We don't use setup.py — Meep is built with a Makefile.