Skip to content

Update dependencies and deprecations to fix Travis builds - #3072

Merged
stefanv merged 51 commits into
scikit-image:masterfrom
hmaarrfk:bugfix_pass_test
May 19, 2018
Merged

stefanv merged 51 commits into
scikit-image:masterfrom
hmaarrfk:bugfix_pass_test

Conversation

@hmaarrfk

@hmaarrfk hmaarrfk commented May 12, 2018 •

Copy link
Copy Markdown
Member

Description

Travis now passes!
I'm no git fu master, so maybe just a squash merge is OK?

Relevant changes are:

  • A bunch of warnings for deprecated default values (I set the values to the old default values)
  • Matplotlib minimum now 2.0.0 to pass some tests. Fixes Weird matplotlib infinite loop Travis failure #3034
  • Pillow minimum now 4.3.0 to have support for jpeg decoder (4.2.1 had bugs and was vitoed by @jni)
  • Building docs with a modern version of python. Now using 3.6.
  • All tests run on Linux + OSX
  • All tests run with pytest -v do not issue warnings (on 3.6) (Doctests still issue warnings, i think that is ok)
  • Doctests still have some warnings. (Catching them would make the docs less readable sometimes)
  • Optional dependencies installed in the install section of travis
  • Single shot pytests. No running once, installing more dependencies, then running again.
  • --pre builds for 2.7 and 3.6
  • Qt4 for 2.7. <- Thought it has been said that qt4 is no longer on pypi
  • Qt5 for 3.6

Things that were passed off to future issues:

Checklist

[It's fine to submit PRs which are a work in progress! But before they are merged, all PRs should provide:]

[For detailed information on these and other aspects see scikit-image contribution guidelines]

For reviewers

(Don't remove the checklist below.)

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.

@pep8speaks

pep8speaks commented May 12, 2018 •

Copy link
Copy Markdown

Hello @hmaarrfk! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on May 18, 2018 at 13:30 Hours UTC

@hmaarrfk

Copy link
Copy Markdown
Member Author

Dream list:

I would ideally like the pytests to pass without warnings either.
Warnings add alot of noise, and that isn't really ideal.

Unfortunately, it isn't really elegant to catch all the docstring warnings with wrappers.

I tried to to the following

pytest -v 
pytest -v --doctest-modules  --disable-warnings --lf --last-failed-no-failures none

or

pytest -v
pytest -v --lf --lfnf=none  --doctest-modules  --disable-warnings

in hopes that the --lf --last-failed-no-failures none would allow only the doctests to run with the disable-warnings parameter.

Unfortunately, the output is:

platform linux -- Python 3.6.5, pytest-3.5.1, py-1.5.3, pluggy-0.6.0 -- /home/mark/.local/share/virtualenvs/scikit-image-L5Md9Pn_/bin/python3
cachedir: .pytest_cache
rootdir: /home/mark/git/scikit-image, inifile:
collected 1839 items / 1839 deselected                                                                                                                                                                              
run-last-failure: run none (no recorded failures)

@codecov-io

codecov-io commented May 12, 2018 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@51f598a). Click here to learn what that means.
The diff coverage is 91.47%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #3072   +/-   ##
========================================
  Coverage          ?   85.9%           
========================================
  Files             ?     336           
  Lines             ?   27301           
  Branches          ?       0           
========================================
  Hits              ?   23454           
  Misses            ?    3847           
  Partials          ?       0
Impacted Files Coverage Δ
skimage/novice/_novice.py 86.29% <ø> (ø)
skimage/color/colorconv.py 99.1% <ø> (ø)
skimage/feature/tests/test_censure.py 100% <100%> (ø)
skimage/morphology/tests/test_skeletonize_3d.py 100% <100%> (ø)
skimage/io/tests/test_pil.py 90.05% <100%> (ø)
skimage/transform/tests/test_radon_transform.py 80.79% <100%> (ø)
skimage/viewer/widgets/core.py 90.96% <100%> (ø)
skimage/draw/tests/test_random_shapes.py 100% <100%> (ø)
skimage/feature/tests/test_hog.py 98.85% <100%> (ø)
skimage/transform/tests/test_warps.py 100% <100%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51f598a...a79e2c0. Read the comment docs.

@hmaarrfk

hmaarrfk commented May 12, 2018 •

Copy link
Copy Markdown
Member Author

I think this PR should be accepted because it goes a LONG way to making sure the tests PASS. The issues listed below should be kept for "future" improvements and not impede the progress awarded by this PR.

Building tests take too long

I think about 50% of the build time is taken by travis building the image and getting the setup ready to compile and run the tests.
This is a really large amount of time.
From my quick research, it seems rather difficult to speed this up.
I've used docker images for bitbucket, but I don't know how this would work with travis.

Potential sources of optimization:

  • check_sdist takes about 2 minutes. Does this need to be done every time? Maybe we can have 1 dedicated build for this?
  • Examples take 300 seconds to build
  • Tests only take 240 seconds (without Qt) 4 mins/15 minutes.

OSX Failing

OSX tests seem to fail on some documentation dependency requirements that it has to build from source. Since OSX isn't being used to generate the dependencies, I simply didn't pull the dependencies on OSX.

OSX now passes without having to pull the build requirements.
See issue #3084

Minimum requirements

It seems that the minimum requirements are not enough to pass the examples. I think this is OK. I do not think that the MINIMUM_REQUIREMENTS should be set for the examples since the examples are often using fancy plotting techniques from Matplotlib to show the results in an interesting way.
See #3034

Python + Qt

For 2.7, I use the old method of linking PyQt4 to the virtual environment.
For 3.X, I use pip to install the desired version. PySide2 should be up in a few months on PyPi when Qt decides it is ready.

Random walker still fails

Random walker tests fail. I simply skipped them. This seems to be related to #2360 and #1875. I suggest that for now, we skip these tests, and open an issue and branch stating that the Random Walker tests are failing working toward passing the tests.
Fixed in recent master

Default parameter change warnings

Whereever I could understand things, I encountered a default parameter warning (maybe it was changing in a future version). I would explicitely set the parameter to the "old value" to pass the test. For example, see test_hog and test_censure

Documentation generation with wrap around in docstrings

This was a tough one to find, basically documetnation generation doesn't like long suggested parameters. I had to move the long suggestion away from the "parameter" and into the bulk of the documentation for convert_colorspace

@hmaarrfk
hmaarrfk force-pushed the bugfix_pass_test branch from 566c4cc to cd9fa70 Compare May 15, 2018 00:23
@hmaarrfk hmaarrfk changed the title Bugfix pass test Help Travis pass test May 15, 2018
@hmaarrfk hmaarrfk changed the title Help Travis pass test Help Travis pass tests May 15, 2018
Comment thread .travis.yml Outdated
env: PIP_FLAGS="--pre"
env: WITH_PYAMG=1 QT=PyQt4
# Examples need strange versions of Matplotlib and Qt
# I don't think we should be increasing the minimum version requirement

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hmaarrfk can you elaborate on this? Given this comment, I'm inclined to increase minimum mpl to 2.0 (over a year old now), and minimum Qt to 5.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, I guess that relates to the philosophy of what scikit-image is. Is it a plotting and visualization guide or an image processing library?

Personally, I don't think that matplotlib should even be a dependency. But I see where things like "viewers" and other things might be useful.

I'm ok with increasing minimum version requirements, but I feel like that is because I am inexperience and haven't had the (mis)forture of dealing with legacy software that cannot be updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think @efiring is right: it's hard to imagine a situation where you can't update MPL past 1.3 but you can update skimage to 0.14. In my view, conda environments have pretty much solved the update problem, because any user can install up-to-date dependencies in user-space.

More generally, we could have a calendar-based guide: we will support dependency versions up to three years old, for example.

In either view, 1.3 should be updated to either 1.5 or 2.0.

Regarding removing the dependency altogether... Well, now that we are doing separate dependencies for documentation/examples and the library, this is a possibility. But that's a big job, as we would need to extricate the viewer from the library. I think this is a worthwhile goal... For skimage 1.0. For now, let's just bump up the dependency. =D

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

1.5 didn't work if i recall. I'll try 2.0. I could setup docker to test. But lets see how many commits it takes me.

Comment thread .travis.yml Outdated
fi
done
mv $MPL_DIR/matplotlibrc_backup $MPL_DIR/matplotlibrc
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did you change back from a script to travis.yml lines?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was trying to get little helpful timings to show up:

image
I"m not sure if it is a bug with travis or not. but the "script" didn't have those cool folding sections.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They do some some kind of timing per command, but it isn't nearly as helpful.

I'll change it back to the script.

https://travis-ci.org/scikit-image/scikit-image/jobs/379492893#L4072

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hmaarrfk no need to change it back if it's working: this is a super valid reason imho!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But it doesn't work really. The script one doesn't fold as nicely. I don't know why.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Well, another option would be to use the time command in front of stuff that you want to time, inside the .sh. (together with a bunch of echos to find your way around the timing printouts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have this in a script because editing it is much less painful than updating a YAML list of commands.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@stefanv yes editing the YAML was painful. I changed it back.

def test_imread_flatten():
# a color image is flattened
img = imread(os.path.join(data_dir, 'color.png'), flatten=True)
img = imread(os.path.join(data_dir, 'color.png'), as_gray=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I'm not mistaken, this test should remain until flatten is removed, but with expected_warnings.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, I added this test:

def test_img_as_grey_flatten():
    img = imread(os.path.join(data_dir, 'color.png'), as_gray=True)
    with expected_warnings(['deprecated']):
        img_flat = imread(os.path.join(data_dir, 'color.png'), flatten=True)
    assert_array_equal(img, img_flat)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great!

Comment thread skimage/morphology/tests/test_misc.py Outdated
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1],
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1]], dtype=np.bool_)
observed = remove_small_holes(labeled_holes_image, area_threshold=3)
with expected_warnings(['Any labeled images will be returned as a boolean array.']): # noqa

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You don't need the full string here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Was still learning to use expected_warnings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure! But please update so that it's PEP8 friendly and the noqa is unnecessary. =)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I guess I had the same line in two locations. Thanks for spotting this one.

with warnings.catch_warnings():
# UserWarning for possible precision loss, expected
warnings.simplefilter('ignore', UserWarning)
result = skeletonize_3d(image)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not use expected_warnings here also?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You know, I really don't know why.

I guess for that file I copy pasted the warning statement from an other function that ignored warnings that way.

Fixed.

out = restoration.denoise_bilateral(img, multichannel=False)
with warnings.catch_warnings():
warnings.simplefilter("ignore")
out = restoration.denoise_bilateral(img, multichannel=False)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here also, why not expected_warnings?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure for that one, it gives a warning on 3.X and not on 2.7. Probably because of a divide by 0 or Nan rule.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hmaarrfk see the documentation of expected_warnings for how to make a warning optional. IIRC it's expected_warnings(['warning text that may or may not happen|\A\Z']).

assert data.shape == labels.shape


@pytest.mark.skip(reason="This test keeps failing on my computer")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But does this fail on Travis? Isn't this the test that was fixed by https://github.com/scikit-image/scikit-image/pull/3063/files ? Are you sure you are on the latest version of master?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sorry, I was between flights, my internet access was slow. good catch. that comment was there for you to find =D

Comment thread skimage/viewer/tests/test_widgets.py Outdated
assert_almost_equal(sld.val, 2.5, 2)


@testing.skipif(True, reason="Don't know how to automate skipping.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you elaborate on this? LOL I don't understand why the previous skipif was insufficient?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is issue #3081

The previous timer would close the QT window after 100 ms. But it doesn't seem to be working on my computer. Testing on travis is slow. I'll keep this on my todo after addressing your other comments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ping. ;) If you can't figure this out quickly, then write a better error message, something like "see issue #3081" ;)

echo "backend : Template" > $MPL_DIR/matplotlibrc
fi
# Now configure Matplotlib to use Qt4
if [[ "${QT}" == "PyQt4" ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I vote for deprecating Qt4 altogether

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually deprecating is the wrong word. Removing. Nuking. Obliterating. =P

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah probably best. I just didn't want to impose things you know.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Absolutely. For giant changes like this one, sometimes you can ask the mailing list or on the PR directly about what to do. It sometimes helps to avoid unnecessary work. But you have pushed things along very quickly by just forging ahead, so I very much appreciate that! =)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not use one of the compatibility interfaces, as suggested in the relevant issue? Not important for this PR, though, I'm fine with any working approach for now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mean use something like qtpy?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One data point on this is that riverbank have pulled all the pyqt4 files from pypi (https://pypi.org/project/PyQt4/).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was wondering what happened. Can PyQt5 be used with 2.7?

@hmaarrfk hmaarrfk May 18, 2018 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@tacaswell , it seems that conda shipped pyqt5.6 for 2.7 but not pyqt5.9.
Seeing as 0.14 is the last release to officially support 2.7, I think we are good :D.

https://anaconda.org/anaconda/pyqt/files

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If Riverbank pulled 4, then 5-only seems very reasonable.

@jni

jni commented May 18, 2018

Copy link
Copy Markdown
Member

@hmaarrfk thanks for a gargantuan effort! When these commits first started coming in, I was wondering whether a lot of the work was even necessary. Having read through the changes, I think almost all of them are needed.

Regarding NumPy printing: are you sure you are not on an outdated master? That should have been fixed in #2935 and #2975.

I've made a few comments to address.

To finish your task, this comment will probably be very useful.

How good is your git-fu? There are many changes here, which ideally would be grouped together logically and organised into a nice commit history:

  • handle all the warnings by either wrapping in expected_warnings or passing the correct kwarg explicitly
  • remove Qt
  • bump matplotlib

However I'm happy to squash if that becomes too hard. But you should rebase on the latest master, for sure.

Where are you based? Getting this in is a high priority and I would like to work with you to get it merged. It might be easier if we chat over gitter. My timezone is Melbourne, Australia.

Thanks again!

@hmaarrfk

Copy link
Copy Markdown
Member Author

Writing it here so I don't forget.

What do you want "novice" to do when you resize an image. mode='constant' anti_aliasing=False

@jni

jni commented May 18, 2018

Copy link
Copy Markdown
Member

@hmaarrfk was that last question a note to self or a question for me? At any rate novice altogether is deprecated so just choose whatever makes the tests pass silently!

Comment thread .travis.yml Outdated
- python setup.py develop
- section_end build
# Matplotlib settings - do not show figures during doc examples
# Where is the matplotlib home on a mac?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It appears to be in .matplotlib

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed question.

Comment thread .travis.yml
after_success:
- codecov
# Prepare.release
- doc/release/contribs.py HEAD~10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's this for?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Was in the script

section "Prepare.release"

"""Convert an image array to a new color space.

Valid color spaces include:
'RGB', 'HSV', 'RGB CIE', 'XYZ', 'YUV', 'YIQ', 'YPbPr', 'YCbCr', 'YDbDr'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

include -> are

wrap this line to 80 chars since we aren't in a specially-formatted section now

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll have you know, that it is exactly 79 characters long ;)
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Touché!!! LOL!

img = imread(os.path.join(data_dir, 'color.png'), as_gray=True)
with expected_warnings(['deprecated']):
img_flat = imread(os.path.join(data_dir, 'color.png'), flatten=True)
assert_array_equal(img, img_flat)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

very nice! Although rename as_grey_flatten to as_gray_flatten. ;)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

out = restoration.denoise_bilateral(img, multichannel=False)

# TODO: This warning is not optional in python3. This should be
# made a strict warning when we get to 0.15

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add this to TODO.txt under 0.15.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done.



@skipif(sys.version_info[:2] == (3, 4),
reason="Doesn't with python 3.4. See issue #3079")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

doesn't work with

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done.

@jni jni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've added a few more comments, but this is looking very close to mergeable!

@hmaarrfk

Copy link
Copy Markdown
Member Author

Thanks! This was a long one, but I really wanted tests to start passing with examples on OSX. I hacked the install of scikit-learn

@jni

jni commented May 18, 2018

Copy link
Copy Markdown
Member

Fascinating! Just saw that commit, works for me. Probably the right way is to have another requirements: examples.txt, and docs.txt is just sphinx, numpydoc, and sphinx-gallery and implies examples.txt. But we can leave that till another PR.

Don't forget to push your latest changes... ;) Maybe you're waiting for the present build to finish, which is fine. =)

@hmaarrfk

hmaarrfk commented May 18, 2018 •

Copy link
Copy Markdown
Member Author

Yeah was waiting for the results of OSX.

@jni jni changed the title Help Travis pass tests Update dependencies and deprecations to fix Travis builds May 18, 2018

@jni jni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good enough for me!

@stefanv re-adding the script may be done later if we deem it important. For now I think the green light is worth merging in!

🎉 Thanks @hmaarrfk!

Comment thread TODO.txt Outdated
* In ``skimage.transform.resize`` change default argument from
``anti_aliasing=None`` to ``anti_aliasing=True``.
* In ``skimage/restoration/tests/test_denoise.py``, there is an optional
warning that needs to be made manditory when we move on from python 2.7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mandatory

echo "backend : Template" > $MPL_DIR/matplotlibrc
fi
# Now configure Matplotlib to use Qt4
if [[ "${QT}" == "PyQt4" ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not use one of the compatibility interfaces, as suggested in the relevant issue? Not important for this PR, though, I'm fine with any working approach for now.

Comment thread .travis.yml
- os: linux
python: 2.7
env: PIP_FLAGS="--pre"
env: WITH_PYAMG=1 QT=PyQt4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just checking: is the pre flag preserved elsewhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll add a 2.7 and 3.6 build that use pre. The only reference to PIP_FLAGS I found was in the before_install.sh is that correct?

Comment thread .travis.yml
python: 3.5
- os: linux
python: 3.5
env: PIP_FLAGS="--pre"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hmaarrfk, @stefanv makes a good point: at least one of our builds should use --pre... I suggest 3.6.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I didn't understand why were were testing for --pre.

I was mostly trimming builds to test quickly.

For now, I also added it to 2.7

Comment thread requirements/default.txt
numpy>=1.11
scipy>=0.17.0
matplotlib>=1.3.1
matplotlib>=2.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉 I strongly approve of this change!

@hmaarrfk

Copy link
Copy Markdown
Member Author

@stefanv @jni I want to bring to your attention that in the proposed version, Qt and all optional dependencies are installed before any tests are run (with the exception of the doc dependencies, but now that I think those should also be moved to the install section).

The old strategy of

  1. Test with minimum dependencies
  2. Install more things
  3. Test again

has been removed in favour of: Just ask travis for two builds.

@hmaarrfk

Copy link
Copy Markdown
Member Author

FYI, appveyor file states the following:

  # Install the build and runtime dependencies of the project.
  # The --pre flag is necessary to grab a SciPy wheel, which is in
  # pre-release at the time of writing (03-10-2017)

Therefore do we still need --pre builds?

@matthew-brett

Copy link
Copy Markdown
Contributor

The --pre builds are to test against not-yet released versions of the dependencies, to make it less likely that the scikit-image code will break with new releases of say numpy or scipy, and to give those projects feedback when they break scikit-image code.

Just for example, statsmodels didn't have a --pre entry, released, and the next day pandas did a release which broke stuff in statsmodels.

@hmaarrfk

Copy link
Copy Markdown
Member Author

@matthew-brett Thanks for the explination.

Ok, I don't understand what is happening with Appveyor.
Half the time it refuses to find pip packages.

@stefanv
stefanv merged commit 10b0543 into scikit-image:master May 19, 2018
@stefanv

stefanv commented May 19, 2018

Copy link
Copy Markdown
Member

Thank you @hmaarrfk! Not having a working Travis is very disruptive to development.

@hmaarrfk

Copy link
Copy Markdown
Member Author

@stefanv yes, it was, I never knew what was actually failing.

Taught alot about how to use pytest in the meantime 🍡

@hmaarrfk
hmaarrfk deleted the bugfix_pass_test branch May 19, 2018 00:38
@jni jni mentioned this pull request Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants