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

Feature/package tests #451

Merged
merged 12 commits into from
Jun 14, 2014
Merged

Feature/package tests #451

merged 12 commits into from
Jun 14, 2014

Conversation

mr-c
Copy link
Contributor

@mr-c mr-c commented Jun 3, 2014

Work in progress

Includes the beginnings of a unification of the various custom C++ exception classes

@mr-c
Copy link
Contributor Author

mr-c commented Jun 3, 2014

This will eventually address #220

@mr-c
Copy link
Contributor Author

mr-c commented Jun 9, 2014

Works for me. After install run: nosetests khmer --attr '!known_failing'

@mr-c
Copy link
Contributor Author

mr-c commented Jun 10, 2014

  • Is it mergable
  • Did it pass the tests?
  • N/A If it introduces new functionality in scripts/ is it tested?
    Check for code coverage.
  • Is it well formatted? Look at pep8/pylint, cppcheck, and
    make doc output. Use autopep8 and astyle -A10 --max-code-length=80
    if needed.
  • Is it documented in the Changelog?
  • N/A Was spellcheck run on the source code and documentation after changes
    were made?

@mr-c
Copy link
Contributor Author

mr-c commented Jun 10, 2014

test this please

@mr-c
Copy link
Contributor Author

mr-c commented Jun 10, 2014

Ready for review and merging @ctb @luizirber @camillescott

@@ -45,7 +45,8 @@ fi
if type hg >/dev/null 2>&1
then
rm -Rf sphinx-contrib
hg clone http://bitbucket.org/mcrusoe/sphinx-contrib
#hg clone http://bitbucket.org/mcrusoe/sphinx-contrib
hg clone http://athyra.ged.msu.edu/~mcrusoe/sphinx-contrib
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, many jobs have been dying due to bitbucket's lack of uptime.

On Tue, Jun 10, 2014 at 3:34 PM, C. Titus Brown notifications@github.com
wrote:

In jenkins-build.sh:

@@ -45,7 +45,8 @@ fi
if type hg >/dev/null 2>&1
then
rm -Rf sphinx-contrib

Is this intentional?


Reply to this email directly or view it on GitHub
https://github.com/ged-lab/khmer/pull/451/files#r13614226.

Copy link
Member

Choose a reason for hiding this comment

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

On Tue, Jun 10, 2014 at 12:40:26PM -0700, Michael R. Crusoe wrote:

@@ -45,7 +45,8 @@ fi
if type hg >/dev/null 2>&1
then
rm -Rf sphinx-contrib

Yes, many jobs have been dying due to bitbucket's lack of uptime.

Hmm, OK, I suppose it's ok to rely on athyra then...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The real solution is to clean up my additions to autoprogram:
https://bitbucket.org/birkenfeld/sphinx-contrib/pull-request/59/enhance-autoprogram-include-usage-summary/diff#comment-1610430

On Tue, Jun 10, 2014 at 3:41 PM, C. Titus Brown notifications@github.com
wrote:

In jenkins-build.sh:

@@ -45,7 +45,8 @@ fi
if type hg >/dev/null 2>&1
then
rm -Rf sphinx-contrib

On Tue, Jun 10, 2014 at 12:40:26PM -0700, Michael R. Crusoe wrote: > @@
-45,7 +45,8 @@ fi > if type hg >/dev/null 2>&1 > then > rm -Rf
sphinx-contrib > - hg clone http://bitbucket.org/mcrusoe/sphinx-contrib >


Reply to this email directly or view it on GitHub
https://github.com/ged-lab/khmer/pull/451/files#r13614549.

@ctb
Copy link
Member

ctb commented Jun 10, 2014

I dislike the demotion of tests/ to khmer/tests/ in the directory hierarchy. Is there no way to avoid this?

@mr-c
Copy link
Contributor Author

mr-c commented Jun 10, 2014

It needs to be inside the khmer namespace as it gets installed into
site-packages

On Tue, Jun 10, 2014 at 3:36 PM, C. Titus Brown notifications@github.com
wrote:

I dislike the demotion of tests/ to khmer/tests/ in the directory
hierarchy. Is there no way to avoid this?


Reply to this email directly or view it on GitHub
#451 (comment).

@ctb
Copy link
Member

ctb commented Jun 10, 2014

See 'package_dir', https://docs.python.org/2/distutils/setupscript.html, and #467.

@mr-c mr-c added this to the v1.0.2 milestone Jun 10, 2014
@mr-c
Copy link
Contributor Author

mr-c commented Jun 11, 2014

test this please

@mr-c
Copy link
Contributor Author

mr-c commented Jun 11, 2014

Failing because I added additional error checking without unit tests!

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

This is ready for review and merging @ctb @luizirber @camillescott

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

Fixing the memory leaks saves 9.9 MB of memory while running the tests. I wonder how much it will help with regular datasets.

For the curious, the fixes are at:
https://github.com/ged-lab/khmer/pull/451/files#diff-bef19f7d0acfa8e850e83c3d9c50e2e4R715
https://github.com/ged-lab/khmer/pull/451/files#diff-bef19f7d0acfa8e850e83c3d9c50e2e4R1465
https://github.com/ged-lab/khmer/pull/451/files#diff-bef19f7d0acfa8e850e83c3d9c50e2e4R1470
https://github.com/ged-lab/khmer/pull/451/files#diff-bef19f7d0acfa8e850e83c3d9c50e2e4R3232
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R147
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R434
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R437
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R535
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R538
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R553
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R562
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R568
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R580
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R600
https://github.com/ged-lab/khmer/pull/451/files#diff-f5632531df6215830f80ff5296a90626R628
https://github.com/ged-lab/khmer/pull/451/files#diff-3efd42f1302e5f04d7886f6fdfc3ff61R83
https://github.com/ged-lab/khmer/pull/451/files#diff-3efd42f1302e5f04d7886f6fdfc3ff61R88
https://github.com/ged-lab/khmer/pull/451/files#diff-1489ee4b29d8e6fd4661577d5fb6bfd2R73
https://github.com/ged-lab/khmer/pull/451/files#diff-1489ee4b29d8e6fd4661577d5fb6bfd2R76
https://github.com/ged-lab/khmer/pull/451/files#diff-fbc47ef39d37ca949c02520f5676b13fR57
https://github.com/ged-lab/khmer/pull/451/files#diff-fbc47ef39d37ca949c02520f5676b13fR60
https://github.com/ged-lab/khmer/pull/451/files#diff-b2b00ef1d5d21be3fa0580cdcf5ecb17R449
https://github.com/ged-lab/khmer/pull/451/files#diff-b2b00ef1d5d21be3fa0580cdcf5ecb17R448
https://github.com/ged-lab/khmer/pull/451/files#diff-75acaced3bd05046e38825cd1ca21900R362
https://github.com/ged-lab/khmer/pull/451/files#diff-be310f56bb83cef45967cfbe13f0adeeR585
https://github.com/ged-lab/khmer/pull/451/files#diff-be310f56bb83cef45967cfbe13f0adeeR1438

@ctb
Copy link
Member

ctb commented Jun 13, 2014

Remaining issue -- 'make test' recompiles zlib (but not bzip2) - could you fix, please?

Also, when I install in a virtualenv on athyra and run the tests:

 nosetests fiz/lib/python2.7/site-packages/khmer-1.0.1_118_gd46d5de-py2.7-linux-x86_64.egg/ -a \!known_failing

I get a number of failures with "No module named screed", even though screed is installed. Any ideas?

Also, I can't seem to run just 'nosetests khmer', as in http://scikit-learn.org/stable/install.html#testing. Thoughts?

Finally, could you enable 'import khmer; khmer.test()'? Thanks!

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

My testing regime

mcrusoe@athyra:~$ virtualenv -p python2 khmer-package-tests-env
mcrusoe@athyra:~/khmer$ cd khmer-package-tests-env/
mcrusoe@athyra:~/khmer-package-tests-env$ source bin/activate
(khmer-package-tests-env)mcrusoe@athyra:~/khmer-package-tests-env$ easy_install -U setuptools
(khmer-package-tests-env)mcrusoe@athyra:~/khmer-package-tests-env$ pip install git+https://github.com/ged-lab/khmer.git@feature/package-tests#egg=khmer           
(khmer-package-tests-env)mcrusoe@athyra:~/khmer-package-tests-env$ pip install nose
(khmer-package-tests-env)mcrusoe@athyra:~/khmer-package-tests-env$ nosetests khmer --attr '!known_failing'
...................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 355 tests in 9.650s
OK

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

On Fri, Jun 13, 2014 at 7:12 AM, C. Titus Brown notifications@github.com
wrote:

Remaining issue -- 'make test' recompiles zlib (but not bzip2) - could you
fix, please?

Fixed

Also, when I install in a virtualenv on athyra and run the tests:

nosetests fiz/lib/python2.7/site-packages/khmer-1.0.1_118_gd46d5de-py2.7-linux-x86_64.egg/ -a !known_failing

I get a number of failures with "No module named screed", even though
screed is installed. Any ideas?

Also, I can't seem to run just 'nosetests khmer', as in
http://scikit-learn.org/stable/install.html#testing. Thoughts?

As documented in my previous comment, nosetests khmer --attr
'!known_failing" works in any subdirectory of the virtualenv while it is
active.

Finally, could you enable 'import khmer; khmer.test()'? Thanks!

Why? Scikit removed their equivalent.


Reply to this email directly or view it on GitHub
#451 (comment).

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

test this please

@mr-c
Copy link
Contributor Author

mr-c commented Jun 13, 2014

test this please

mr-c added 8 commits June 13, 2014 19:29
add target for python test coverage text report;
clarified where the HTML report is

Added additional tests

remove unused code as per #441 (comment)
remove scripts that used CountingHash::max_hamming1_count
Document code & sandbox script removal
Including a couple notable memory leaks!
@ctb
Copy link
Member

ctb commented Jun 14, 2014

OK, it all works for me. Merging!

ctb added a commit that referenced this pull request Jun 14, 2014
@ctb ctb merged commit 4700707 into master Jun 14, 2014
@ctb ctb deleted the feature/package-tests branch June 14, 2014 11:11
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