augur icon indicating copy to clipboard operation
augur copied to clipboard

Remove matplotlib and seaborn dependencies

Open huddlej opened this issue 4 years ago • 1 comments

Context

Augur supports a "full" installation that installs optional dependencies including cvxopt, matplotlib, and seaborn. Although cvxopt is required for titer models to work (arguably a dependency that should be installed anyway), the plotting modules are only used in an old titer model function and two test functions in the frequency estimation module (one and two).

Description and possible solution

We should remove the two plotting modules as dependencies, move the corresponding plotting code to documentation for the titer model and frequencies (respectively), move cvxopt to the main dependency list (now that we use the latest version that has pre-built wheels), and remove the "full" installation section of the project's setup module.

The related plotting code is effectively inaccessible to anyone who would want to use it from the command line and requires advanced knowledge of Augur's inner workings to get this code working from a Python shell/notebook. Moving the code to documentation would allow us to better document these Augur components and provide inline examples of what the plot outputs should look like.

Most of the hard work in addressing this issue would be the writing of documentation and testing of the old plotting code. The easier solution would be to delete the plotting code and associated dependencies completely.

huddlej avatar Feb 09 '21 22:02 huddlej

Bumping this old issue because I had to exclude the "full" installation in my branch to add evofr to the nextstrain/base. matplotlib was causing an error in the image building process after I switched to Python 3.9

Should we just move cvxopt to the main dependency list and deal with matplotlib and seaborn later?

joverlee521 avatar Aug 09 '22 23:08 joverlee521

More context on the usage of these, which I sifted thru before I knew about this issue :upside_down_face:

tsibley avatar Aug 26 '22 16:08 tsibley

@rneher may have a preference about my recommended solution to this issue, but I still stand by the plan to:

  1. include cvxopt as a primary dependency
  2. drop matplotlib and seaborn as dependencies along with the "full" installation option
  3. move the plotting code from titers into documentation

Probably 1 and 2 would be fine.

huddlej avatar Aug 31 '22 18:08 huddlej