mdolab / pyoptsparse

pyOptSparse is an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable, and portable manner.
https://mdolab-pyoptsparse.readthedocs-hosted.com/en/latest/
GNU Lesser General Public License v3.0
228 stars 109 forks source link

pyoptsparse can be installed without sqlitedict being installed #105

Closed bbrelje closed 4 years ago

bbrelje commented 4 years ago

Type of issue

What types of issue is it?

Description

Steps to reproduce issue

  1. Install pyoptsparse per the documentation
  2. Installation is apparently successful but sqlitedict dependency is not enforced
  3. Errors appear downstream e.g. https://github.com/OpenMDAO/OpenMDAO/issues/1422
ewu63 commented 4 years ago

SqliteDict has been moved to an external dependency, this was described both in the release notes for v1.2, and in the documentation, so that's an expected behaviour. To be clear, pyOptSparse does not do dependency checking during install. However, we are due for an overhaul of the install process, so I'll leave this up as a feature request.

bbrelje commented 4 years ago

I don't understand what you mean by "moved to an external dependency". Do you mean that pyoptsparse used to provide a home-grown implementation of sqlitedict?

setuptools style is to enforce dependencies which the project requires to "minimally" run (this qualifies) but not pin versions. We should do this - users expect it even if the dependencies are listed in the docs. https://packaging.python.org/discussions/install-requires-vs-requirements/

ewu63 commented 4 years ago

Yes pyOptSparse used to ship with an older version of sqlitedict, and the switch has caused problems for some people.

I understand, we currently provide a requirements.txt file to help with that, but do not enforce anything during install. I don't have much experience with Python installs, but if this is a simple change to the setup.py script then would you mind doing a PR for that?

bbrelje commented 4 years ago

Done