-
Notifications
You must be signed in to change notification settings - Fork 64
Move tests to root dir. Minor setup refactoring #211
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
Merged
syurkevi
merged 1 commit into
arrayfire:master
from
roaffix:feature/move-tests-to-rootdir
Sep 16, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,27 @@ | ||
[metadata] | ||
name = arrayfire | ||
version = 3.6.20181017 | ||
description = Python bindings for ArrayFire | ||
licence = BSD | ||
long_description = file: README.md | ||
maintainer = Pavan Yalamanchili | ||
maintainer_email = [email protected] | ||
url = http://arrayfire.com | ||
classifiers = | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.6 | ||
|
||
[options] | ||
packages = find: | ||
|
||
[options.packages.find] | ||
exclude = | ||
examples | ||
tests | ||
|
||
[flake8] | ||
application-import-names = arrayfire | ||
import-order-style = pep8 | ||
max-line-length = 119 |
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/env python | ||
|
||
####################################################### | ||
# Copyright (c) 2015, ArrayFire | ||
|
@@ -9,19 +9,8 @@ | |
# http://arrayfire.com/licenses/BSD-3-Clause | ||
######################################################## | ||
|
||
from setuptools import setup, find_packages | ||
#from __af_version__ import full_version | ||
# TODO: Look for af libraries during setup | ||
|
||
#TODO: | ||
#1) Look for af libraries during setup | ||
from setuptools import setup | ||
|
||
setup( | ||
author="Pavan Yalamanchili", | ||
author_email="[email protected]", | ||
name="arrayfire", | ||
version="3.6.20181017", | ||
description="Python bindings for ArrayFire", | ||
license="BSD", | ||
url="http://arrayfire.com", | ||
packages=find_packages() | ||
) | ||
setup() |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env python | ||
|
||
####################################################### | ||
# Copyright (c) 2015, ArrayFire | ||
# All rights reserved. | ||
|
@@ -10,35 +12,38 @@ | |
from __future__ import absolute_import | ||
|
||
import sys | ||
from .simple_tests import * | ||
|
||
from . import simple | ||
|
||
tests = {} | ||
tests['simple'] = simple.tests | ||
|
||
|
||
def assert_valid(name, name_list, name_str): | ||
is_valid = any([name == val for val in name_list]) | ||
if not is_valid: | ||
err_str = "The first argument needs to be a %s name\n" % name_str | ||
err_str += "List of supported %ss: %s" % (name_str, str(list(name_list))) | ||
raise RuntimeError(err_str) | ||
if is_valid: | ||
return | ||
err_str = "The first argument needs to be a %s name\n" % name_str | ||
err_str += "List of supported %ss: %s" % (name_str, str(list(name_list))) | ||
raise RuntimeError(err_str) | ||
|
||
if __name__ == "__main__": | ||
|
||
if __name__ == "__main__": | ||
module_name = None | ||
num_args = len(sys.argv) | ||
|
||
if (num_args > 1): | ||
if num_args > 1: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
module_name = sys.argv[1].lower() | ||
assert_valid(sys.argv[1].lower(), tests.keys(), "module") | ||
|
||
if (module_name is None): | ||
if module_name is None: | ||
for name in tests: | ||
tests[name].run() | ||
else: | ||
test = tests[module_name] | ||
test_list = None | ||
|
||
if (num_args > 2): | ||
if num_args > 2: | ||
test_list = sys.argv[2:] | ||
for test_name in test_list: | ||
assert_valid(test_name.lower(), test.keys(), "test") | ||
|
This file contains hidden or 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,44 @@ | ||
#!/usr/bin/env python | ||
|
||
####################################################### | ||
# Copyright (c) 2015, ArrayFire | ||
# All rights reserved. | ||
# | ||
# This file is distributed under 3-clause BSD license. | ||
# The complete license agreement can be obtained at: | ||
# http://arrayfire.com/licenses/BSD-3-Clause | ||
######################################################## | ||
|
||
from ._util import tests | ||
from .algorithm import simple_algorithm | ||
from .arith import simple_arith | ||
from .array_test import simple_array | ||
from .blas import simple_blas | ||
from .data import simple_data | ||
from .device import simple_device | ||
from .image import simple_image | ||
from .index import simple_index | ||
from .interop import simple_interop | ||
from .lapack import simple_lapack | ||
from .random import simple_random | ||
from .signal import simple_signal | ||
from .sparse import simple_sparse | ||
from .statistics import simple_statistics | ||
|
||
__all__ = [ | ||
"tests", | ||
"simple_algorithm", | ||
"simple_arith", | ||
"simple_array", | ||
"simple_blas", | ||
"simple_data", | ||
"simple_device", | ||
"simple_image", | ||
"simple_index", | ||
"simple_interop", | ||
"simple_lapack", | ||
"simple_random", | ||
"simple_signal", | ||
"simple_sparse", | ||
"simple_statistics" | ||
] |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍