Skip to content

Continue TravisCI testing without NumPy? #2390

Open

Description

@peterjc

Since Biopython 1.70 (commit a089000), setup.py has said via install_requires=... that numpy should be present (except on Jython which we used to support but dropped, and IronPython which we were trying once). NumPy on PyPy is no longer a problem (see also #953).

Since Biopython 1.71 (commit 940c23f) the README has said:

Biopython requires NumPy (see http://www.numpy.org) which will be installed
automatically if you install Biopython with pip (see below for compiling
Biopython yourself).

Yet, we are able to explicitly test without NumPy on TravisCI - https://github.com/biopython/biopython/blob/biopython-175/.travis-tox.ini - this is working to date, see e.g. https://travis-ci.org/biopython/biopython/jobs/622581144 and messages like Install NumPy if you want to use the PDB parser.

Question: Why isn't the current python setup.py install under Python 3.6 with tox enforcing NumPy?

Question: Is this grey situation worth continuing? For example it made testing under Python 3.8 before NumPy itself was available easy. Or, should we update the library and tests code to just use import numpy without raising MissingPythonDependencyError if that fails?

@mdehoon : Your thoughts? NumPy is no longer a compile time requirement due to your efforts.

Activity

  1. Phlya commented on Dec 18, 2019

    @Phlya
    Contributor

    My personal opinion is that having numpy as a requirement in this day and age is completely normal, realistically no one doing any computational analysis in python can do anything useful without numpy anyway.

    Allowing simply importing numpy would simplify the code and make contributing to Biopython easier (as exemplified by issues that arose in #2386).

  2. mdehoon commented on Dec 18, 2019

    @mdehoon
    Contributor

    @Phlya I agree. Btw officially numpy is already a requirement for Biopython.

  3. mdehoon commented on Dec 19, 2019

    @mdehoon
    Contributor

    Or, should we update the library and tests code to just use import numpy without raising MissingPythonDependencyError if that fails?

    The library should continue raise a MissingPythonDependencyError if importing numpy fails, just to be clear to the user. But I don't think we need a numpy-free implementation.

    The test code should simply assume that numpy can be imported, as numpy is a requirement for Biopython.

  4. peterjc commented on Dec 19, 2019

    @peterjc
    MemberAuthor

    OK, let's do that then.

    As to my first question, why is testing without numpy working on Travis? Is this a case of pip install . versus python setup.py install being important? Do we need an explicit check in setup.py for this case?

    Also, to help make this explicit, should run_tests.py have an explicit check for numpy - and abort all the tests if numpy is missing?

  5. peterjc commented on Dec 19, 2019

    @peterjc
    MemberAuthor

    OK, with #2418 merged all the continuous integration tests now have numpy installed.

    Should we close this and open a separate issue on why it is possible to install without numpy, and how to block that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions