lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
428 stars 52 forks source link

SimpleParsing has unlisted numpy dependency since 0.0.14 #56

Closed stephanlukasczyk closed 3 years ago

stephanlukasczyk commented 3 years ago

Describe the bug SimpleParsing 0.0.14 added (among others) the module simple_parsing.helpers.hdparams.hdparam which imports numpy. Unfortunately, numpy is not listed as a dependency in setup.py, which causes all code that uses SimpleParsing to fail with an ModuleNotFoundError.

Suggested Fix Either remove the dependency to numpy or explicitly state it as a dependency. Currently, matplotlib is a test dependency, which will install numpy if one installs SimpleParsing with those test dependencies.

Personal opinion: Don't use numpy as a dependency at all. SimpleParsing is quite lightweight and numpy is a very heavy library. Or at least implement the helper module in a way that it can have numpy as an optional dependency, such that one is not forced to install it.

lebrice commented 3 years ago

Hey @stephanlukasczyk , thanks for posting, and sorry for not getting back to you earlier!

Good point! I'll either remove the numpy dependency, or I'll move it to an extras_require. Thanks again for posting!

lebrice commented 3 years ago

Hey @stephanlukasczyk I ended up removing the numpy dependency, and the matplotlib test dependency. Thanks again for pointing this out! I'll upgrade the package version to 0.0.15.