Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump supported Python versions and correct lat2SW doctest #154

Merged
merged 2 commits into from
May 25, 2019

Conversation

jGaboardi
Copy link
Member

Bumping supporting Python versions in TravisCI to match pysal/pysal#1095

{3.5, 3.6} --> {3.6, 3.7}

@jGaboardi
Copy link
Member Author

jGaboardi commented May 23, 2019

Failure does not appear to be do to the {3.6,3.7} upgrade, but a simple failed doctest. This seems to be an issue with how the scipy.sparse object is being returned in the doctest and may be related to the current pysal/pysal build failures (dealing withnumpy/scipy). The failures in pysal/pysal appear to be related to numpy/numpy#10565.

======================================================================
FAIL: Doctest: libpysal.weights.util.lat2SW
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/jGaboardi/libpysal/miniconda/envs/test-env/lib/python3.6/doctest.py", line 2199, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for libpysal.weights.util.lat2SW
  File "/home/travis/build/jGaboardi/libpysal/libpysal/weights/util.py", line 1122, in lat2SW
----------------------------------------------------------------------
File "/home/travis/build/jGaboardi/libpysal/libpysal/weights/util.py", line 1156, in libpysal.weights.util.lat2SW
Failed example:
    w9[0,1]
Expected:
    1
Got:
    array(1, dtype=int8)
----------------------------------------------------------------------
File "/home/travis/build/jGaboardi/libpysal/libpysal/weights/util.py", line 1158, in libpysal.weights.util.lat2SW
Failed example:
    w9[3,6]
Expected:
    1
Got:
    array(1, dtype=int8)

@jGaboardi jGaboardi changed the title bump supported Python versions bump supported Python versions and correct lat2SW doctest May 24, 2019
@jGaboardi jGaboardi added the bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. label May 24, 2019
@weikang9009
Copy link
Member

Hi @jGaboardi, this seems to be related to NumPy array scalar? After pulling your commits to my local machine and ran doctests locally, I ran into this error:
image
I am on Mac, python 3.7.3, numpy 1.16.3

@jGaboardi
Copy link
Member Author

jGaboardi commented May 24, 2019

The tests for pass locally for me, both for Python 3.6 and 3.7.3 with numpy 1.16.3.

Copy link
Member

@sjsrey sjsrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

----------------------------------------------------------------------
File "/home/serge/Dropbox/p/pysal/src/subpackages/libpysal/libpysal/weights/util.py", line 1156, in libpysal.weights.util.lat2SW
Failed example:
    w9[0,1]
Expected:
    array(1, dtype=int8)
Got:
    1

@sjsrey
Copy link
Member

sjsrey commented May 25, 2019

----------------------------------------------------------------------
File "/home/serge/Dropbox/p/pysal/src/subpackages/libpysal/libpysal/weights/util.py", line 1156, in libpysal.weights.util.lat2SW
Failed example:
    w9[0,1]
Expected:
    array(1, dtype=int8)
Got:
    1

The local failures could be due to not replicating the travis envs for the version bump.

@jGaboardi
Copy link
Member Author

So this is a bit strange, correct? The tests pass on locally (for me) and on Travis for 3.6 and 3.7, but fail for you guys.

@sjsrey sjsrey merged commit 2dbd2ba into pysal:master May 25, 2019
@sjsrey
Copy link
Member

sjsrey commented May 25, 2019

The PR was passing on travis, so I merged.

We can always revert:

2019-05-24-1824-1558747452-sel

@jGaboardi jGaboardi deleted the python_v_bump branch May 25, 2019 01:24
sjsrey added a commit to sjsrey/libpysal that referenced this pull request May 25, 2019
weikang9009 added a commit that referenced this pull request May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants