krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
127 stars 33 forks source link

dependencies and test dependencies mixed up #32

Closed nschloe closed 4 years ago

nschloe commented 4 years ago

Some of the dependencies listed in setup.cfg are not necessary for running SeismicMesh, but really are test dependencies, for example exdown. They should be listed separately, for example in a test_requirements.txt file, in the circleci config, or in a tox.ini (should you ever use that).

krober10nd commented 4 years ago

Ok thanks. What do you think about if I did something like this by editing the setup.cfg file?

https://stackoverflow.com/questions/15422527/best-practices-how-do-you-list-required-dependencies-in-your-setup-py

nschloe commented 4 years ago

Ah, I didnt know about tests_require. If this works, awesome!

krober10nd commented 4 years ago

Unfortunately that approach I linked to above didn't work. setuptools tells you it's not a good method (you have to use python setup.py develop in your CI script) and it says it will be deprecated in the near future.

Instead, I went with the more modern tox.ini route. I updated the CI script accordingly in #34 and included a pyproject.toml file and a tox.ini file. This now results in a clean separation of dependencies for testing and for installation. It increased the time to complete the tests to about 12 minutes but oh well.

nschloe commented 4 years ago

It's always worthwhile trying to keep test times down. With

pytest --durations=5

you can see the top 5 slowest tests. This always helps me out big time.

krober10nd commented 4 years ago

Thanks! I think it was in part due to some downloading of packages that happened to be slower yesterday. Today it passed in 9 minutes or so.