forked from nilearn/nilearn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testing for Nilearn setup & install & Fix the broken dependency i…
…nstallation (nilearn#2201) * Added job in Azure Pipelines to build & install Nilearn wheel * Fix inadvertant pip install with the intended pip list * Wheel install command is Nilearn version agnostic to work with future versions [skip ci] * Ensure all required packages are listed for `pip install` * Eanble error mode in shell * Fixed Could not find a version that satisfies the requirement sklearn>=0.19 (Replaced name sklearn with proper name scikit-learn.) * Removed deactivated code * Corrected typo in package name * Restored sklearn as module name in conf.py to fix import failure * Restored sklearn as module name in version.py to fix import failure * scikit-learn is the package name passed on to pip * Dummy sklearn added to required modules list * Flake8 fix * Tinkering with sklearn version for successful Appveyor install * Added installation testing on Windows as well - Changed next version to 0.6.0b0 as setuptools warns & normalizes to that. - Tweaked Azure job names for clarity. * Fixed spaces in Azure Pipelines job names * Fixed non-alphanumeric characters in Azure Pipelines job names * Removed code & package name redundancy * Restored previous code, (sklearn not scikit-learn is essential in versions.py) * Placate Fake8 * Added installation testing for MacOS - Renamed Azure Pipelines jobs for clarity. * Added test for checking the required packages are installed * `\` path separator for windows installation test; sorted jobs alphabetically * Setting Error mode for Windows Powershell * Corrected incorrect commands and path specs * Corrected installation of Nilearn wheel in Powershell * Replaced Powershell commands with cmd commands (the correct shell for AZP) * Corrected command to execute pip install on discovered file * Proactively installed sklearn to fix not found error when installing nilearn * Installation tests are only done for Py3.6, seems unnecessary for more * Expected failure tests (older python); windows install test during code test * Added expected to fail tests for older python versions * Segregated steps for easier human parsing * Removed py34 (not supported by AZP), Py27 test failure now expected in test
- Loading branch information
1 parent
9461dee
commit bbc750a
Showing
6 changed files
with
184 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from distutils.version import LooseVersion | ||
|
||
from nilearn.version import REQUIRED_MODULE_METADATA | ||
|
||
|
||
def test_required_package_installation(): | ||
for package_specs in REQUIRED_MODULE_METADATA: | ||
package = package_specs[0] | ||
min_version = package_specs[1]['min_version'] | ||
imported_package = __import__(package) | ||
installed_version = imported_package.__version__ | ||
assert LooseVersion(installed_version) >= LooseVersion(min_version) | ||
print(package, 'min:', min_version, 'installed:', installed_version) | ||
|
||
|
||
if __name__ == '__main__': | ||
test_required_package_installation() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters