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

[Enhancement] Change test framework from Nose to pytest #413

Merged
merged 2 commits into from
May 13, 2021

Conversation

kohlerca
Copy link
Collaborator

@kohlerca kohlerca commented Apr 2, 2021

The unit tests are run using pytest (https://pytest.org) in replacement for the deprecated nose.

This PR addresses #408.

Travis CI settings were updated to use the new framework.

@coveralls
Copy link
Collaborator

Coverage Status

Coverage increased (+0.1%) to 88.921% when pulling 60a849d on INM-6:enh/change_test_framework into 165276f on NeuralEnsemble:master.

@mdenker mdenker self-assigned this May 3, 2021
@mdenker mdenker added the enhancement Editing an existing module, improving something label May 3, 2021
mdenker added a commit to INM-6/elephant that referenced this pull request May 13, 2021
@mdenker
Copy link
Member

mdenker commented May 13, 2021

Seems all ok, and in fact, we do need pytest capabilities in fixing a bug currently in the travis testing: The package is installed using python setup.py install, however, the unit test actually do not use this installed version, but import from the working directory instead. This was not problemantic before, but with the inclusion of C code in an upcoming PR, this leads to problems. Therefore, this future PR will include a further option to pytest

pytest --cov=elephant --import-mode=importlib

which makes sure that the installed version of elephant is used, not local version.
This is just a heads-up, there is, I think, no need to change this in the current PR.

@mdenker mdenker merged commit c461884 into NeuralEnsemble:master May 13, 2021
mdenker added a commit to INM-6/elephant that referenced this pull request May 13, 2021
* Added cibuildwheel action

* Added Python requirements to wheel build

* Build only on 64bit machines, otherwise overflow

* Removed Windows for testing, as vc is not available

* Removed MacOS for testing, as -fopenmp is not available

* Removed pp- (pypy) builds since they lack C.

* Fixed removing pp- (pypy) builds since they lack C.

* Put Macos back in.

* Windows Hack

* Remove vcpython alltogether, ignore 2.7 Python

* Removed extra compile option, which breaks on Windows

* Removed more extra compile options, which breaks on Windows

* Try C++ instead of Gnu++.

* Try C++ instead of Gnu++ Windows style argument.

* Remove linux build while testing windows.

* Remove libraries.

* Differentiate Windows and Linux.

* Added missing import.

* Last mile: MacOS

* Remove openMP lib

* Remove openMP lib

* Add openMP lib

* More brew installs

* Mac is called mac on github

* Make sure C is reinstalled.

* Multilib

* Next try, new options

* Ignore warning about void type

* Update newsest fim package

* Revert "Ignore warning about void type"

This reverts commit 3ff6b62

* Revert to prior fim, new compiler argument.

* Revert "Update newsest fim package"

This reverts commit f321f77

* Definitely, gnu++17, but new try.

* Try C++

* Warning message

* llvm maybe?

* Added apple in source

* Small fixes for MacOS, but not comprehensive

* Limit to Windows and Linux for now

* Remove MacOS entry

* Fix fix from mindlessness

* Testrun

* Trying to include fim.so, despite its renaming by wheels

* Added newest version of original module

* Reverted previous breaking change commited by accident.

* Reverted package name from testing.

* Test focal as CI build

* Test bionic as CI build

* Understand installation issue on CI -- is importing elephant importing the installed version?

* Spelling error only

* Try to make sure travis loads the installed elephant, not the cwd.

* One step further -- which version will nosetests use?

* Switch to pytest as of PR NeuralEnsemble#413
@mdenker mdenker mentioned this pull request May 14, 2021
mdenker added a commit that referenced this pull request Aug 13, 2021
* bug fixed dealing with units

* fixed same unit error in trial shuffling

* added Bielefeld fim.so and adapted filtering and added window param to fpgrowth

* removed max_occ test

* further unit stuff

* debugging for new fim version

* enabled multithreading in fpgrowth

* less verbose in spade

* set equal number of bins in bin shuffling wrt spade

* added tolerance to binning in spade everywhere

* Added accelerated FIM algorithm sources by Florian Porrmann.

* Enh/accelerated spade build (#82)

* Added cibuildwheel action

* Added Python requirements to wheel build

* Build only on 64bit machines, otherwise overflow

* Removed Windows for testing, as vc is not available

* Removed MacOS for testing, as -fopenmp is not available

* Removed pp- (pypy) builds since they lack C.

* Fixed removing pp- (pypy) builds since they lack C.

* Put Macos back in.

* Windows Hack

* Remove vcpython alltogether, ignore 2.7 Python

* Removed extra compile option, which breaks on Windows

* Removed more extra compile options, which breaks on Windows

* Try C++ instead of Gnu++.

* Try C++ instead of Gnu++ Windows style argument.

* Remove linux build while testing windows.

* Remove libraries.

* Differentiate Windows and Linux.

* Added missing import.

* Last mile: MacOS

* Remove openMP lib

* Remove openMP lib

* Add openMP lib

* More brew installs

* Mac is called mac on github

* Make sure C is reinstalled.

* Multilib

* Next try, new options

* Ignore warning about void type

* Update newsest fim package

* Revert "Ignore warning about void type"

This reverts commit 3ff6b62

* Revert to prior fim, new compiler argument.

* Revert "Update newsest fim package"

This reverts commit f321f77

* Definitely, gnu++17, but new try.

* Try C++

* Warning message

* llvm maybe?

* Added apple in source

* Small fixes for MacOS, but not comprehensive

* Limit to Windows and Linux for now

* Remove MacOS entry

* Fix fix from mindlessness

* Testrun

* Trying to include fim.so, despite its renaming by wheels

* Added newest version of original module

* Reverted previous breaking change commited by accident.

* Reverted package name from testing.

* Test focal as CI build

* Test bionic as CI build

* Understand installation issue on CI -- is importing elephant importing the installed version?

* Spelling error only

* Try to make sure travis loads the installed elephant, not the cwd.

* One step further -- which version will nosetests use?

* Switch to pytest as of PR #413

* Added authors of new FIM module and reference in new docs.

* Added authors of new FIM module and reference in new docs.

* Small text clarifications.

* Test if entry for fim.so/pyd in MANIFEST is now redundant.

* Update elephant/spade.py

Co-authored-by: Alexander Kleinjohann <[email protected]>

* Update elephant/spade.py

Co-authored-by: Alexander Kleinjohann <[email protected]>

* Added SPADE tutorial

* Prevent wheel building on every push, and limit scipy version workaround

* Pushed tutorial, removed file added in error

* New attempt to make mybinder install requirements.

* New attempt, dropping viziphant.

* Avoid recursive elephant installation by viziphant in postBuild

* Removed unit test that is fragile as it depends on the implementation of surrogate methods

* Add viziphant to RTD environment

* Typo in tutorial

* Add viziphant to travis doc tests

Co-authored-by: pbouss <[email protected]>
Co-authored-by: stellalessandra <[email protected]>
Co-authored-by: Alessandra Stella <[email protected]>
Co-authored-by: Alexander Kleinjohann <[email protected]>
@Moritz-Alexander-Kern Moritz-Alexander-Kern mentioned this pull request Mar 9, 2022
1 task
@Moritz-Alexander-Kern Moritz-Alexander-Kern deleted the enh/change_test_framework branch September 6, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Editing an existing module, improving something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants