about summary refs log tree commit diff
path: root/setup.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-02-12 07:33:42 +0300
committerFrederick Muriuki Muriithi2022-02-12 07:33:42 +0300
commit00cd52204646f283cfaf413e67755cd9f0acfff0 (patch)
tree9d9459b70f23b4042ea609a0ca35638af8afad84 /setup.py
parentd0c7631276223aae6954f7643abac262aa080e50 (diff)
downloadgenenetwork3-00cd52204646f283cfaf413e67755cd9f0acfff0.tar.gz
Provide custom class to run tests
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index a4e95d1..9396f59 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,12 @@
 #!/usr/bin/env python
 """Basic setup script for gn3"""
 from setuptools import setup  # type: ignore
+from setup_commands import RunTests
 
+def long_description():
+    """Retrieve long description from the README file."""
+    with open('README.md', encoding="utf-8") as readme:
+        return readme.read()
 
 setup(author='Bonface M. K.',
       author_email='me@bonfacemunyoki.com',
@@ -23,7 +28,7 @@ setup(author='Bonface M. K.',
           "flask-cors==3.0.9"
       ],
       license='GPLV3',
-      long_description=open('README.md').read(),
+      long_description=long_description(),
       long_description_content_type='text/markdown',
       name='gn3',
       packages=[
@@ -35,8 +40,7 @@ setup(author='Bonface M. K.',
       ],
       url='https://github.com/genenetwork/genenetwork3',
       version='0.1',
-      # ---- TESTING ---- #
-      setup_requires=['pytest-runner'],
-      tests_require=["pytest", "hypothesis"]
-      # ---- END: TESTING ---- #
-      )
+      tests_require=["pytest", "hypothesis"],
+      cmdclass={
+          "run_tests": RunTests ## testing
+      })