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

TST: Fix broken tests and make Travis run all tests. #72

Merged
merged 1 commit into from
Dec 23, 2013

Conversation

danielballan
Copy link
Member

No description provided.

@danielballan
Copy link
Member Author

Travis is not currently running any tests; it is only building the docs. We need it to run the tests, especially with all the fast-paced changes, so we are alerted when a PR contains a breaking change.

I put aside test_make_paras_and_func.py by renaming it with a leading underscore, so for now it will be ignored. If we want to support wrap.py, that test suite needs attention. I gave it a quick look but I couldn't understand the issue.

All other tests pass.

@danielballan
Copy link
Member Author

Hmm. There's one test still failing. Matt, can you make anything of this Traceback?

@newville
Copy link
Member

have you merged with Till's fix for a similar problem from a couple days ago, commit ec8e7d0 ?

@danielballan
Copy link
Member Author

Yes.

@newville
Copy link
Member

I'd like to merge this. Should we remove the test_ci.py here?

@danielballan
Copy link
Member Author

Yes. It's better to have some test coverage, especially on the ever-changing Model class, than none. Let's come back around to test_ci.py soon. I'll remove it momentarily, and you can merge if Travis passes.

@danielballan
Copy link
Member Author

Now all 27 tests pass on my system, but one is still failing on Travis. We're getting a NotImplementError related to Nelder-Mead. (Full Traceback) I suspect the version of numpy/scipy we are using may differ from mine.

It would be helpful if someone else could run

/lmfit-py~$ nosetests/tests

and see if they can reproduce.

@newville
Copy link
Member

Hi Dan,

Yes, scalar_minimize() is relatively new to scipy (0.11) -- a year old or
so. This is why the older fmin() etc functions were in minimizer.py.
Adding test of mini.HAS_SCALAR_MIN might be sufficient.

@danielballan
Copy link
Member Author

Done. I refactored them into separate tests, so the Nelder-Mead one can raise nose.SkipTest if need be -- better than silently passing it.

@danielballan
Copy link
Member Author

Oh, I misunderstood. Either they all need to skipped or (it seems) none. Well, this should work. If Travis passes, merge.

@danielballan
Copy link
Member Author

All tests pass in Python 2. There are some parts of model.py that were not Python 3 compatible -- now fixed. Weirdly, something with peak_fit is breaking in Python 3 only. Help?

@newville
Copy link
Member

The docs now build for me, and Travis passes for both Python 2 and 3.
This PR now seems out-of-date... is it moot or should it be re-made?

@danielballan
Copy link
Member Author

Once you merge #74, I'll rebase these commits onto master. We should be able to merge it without that, but I'd like to see this actually pass on Travis before we merge on the off-chance there is still a lingering Travis-specific failure.

@newville
Copy link
Member

Committed. I think it is good to go, but thought Till might want a chance to modify it.

@newville
Copy link
Member

merged (by hand)

@danielballan
Copy link
Member Author

peak_fit is still unhappy, and it looks like I missed for py3-incompatible dictionary stuff. I'll take care of the latter.

@newville
Copy link
Member

OK thanks -- I wanted to get this merged before cutting way down on coding over the holidays.

@newville
Copy link
Member

I think I got the bug for test_algebraic_constraints2...

TST: Put off fixing test_ci for now.

TST: Do not install mpl.

TST: Skip Nelder-Mead test if not present
@danielballan
Copy link
Member Author

OK, so you merged them into master? I rebased this branch, run-tests-on-travis onto the current master. We'll see what Travis thinks....

@danielballan
Copy link
Member Author

Phew! That's a pass. Merge this monster, and let us never speak of it again. :- )

newville added a commit that referenced this pull request Dec 23, 2013
TST: Fix broken tests and make Travis run all tests.
@newville newville merged commit ebc2f18 into lmfit:master Dec 23, 2013
@newville
Copy link
Member

Thanks!

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.

2 participants