From 64cd6489422607ec4be6c5b24b06041adb3753c7 Mon Sep 17 00:00:00 2001 From: Baptiste Bauvin <baptiste.bauvin@lis-lab.fr> Date: Fri, 1 May 2020 10:05:39 -0400 Subject: [PATCH] Readme update working --- README.rst | 17 +++++++++++++++- docs/source/conf.py | 4 ++-- .../tests/test_utils/test_transormations.py | 20 +++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 summit/tests/test_utils/test_transormations.py diff --git a/README.rst b/README.rst index 77d62adb..8ec1a4c3 100644 --- a/README.rst +++ b/README.rst @@ -20,9 +20,24 @@ Getting Started Prerequisites (will be automatically installed) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +SuMMIT has been designed and uses continuous integration for Linux platforms (ubuntu 18.04), but we try to keep it as compatible as possible with Mac and Windows. + +Last tests on each platform : + ++----------+-------------------+ +| Platform | Last positive test| ++==========+===================+ +| Linux | Continuous | ++----------+-------------------+ +| Mac | 1st of May, 2020 | ++----------+-------------------+ +| Windows | 1st of May, 2020 | ++----------+-------------------+ + + To be able to use this project, you'll need : -* `Python 3.6 <https://docs.python.org/3/>`_ +* `Python 3 <https://docs.python.org/3/>`_ And the following python modules : diff --git a/docs/source/conf.py b/docs/source/conf.py index f74697da..2875ddb1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -54,8 +54,8 @@ extensions = ['sphinx.ext.autodoc', # 'sphinx.ext.ifconfig', # 'sphinx.ext.viewcode', # 'sphinx.ext.githubpages', - 'sphinx.ext.napoleon', - 'recommonmark'] + 'sphinx.ext.napoleon',] + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/summit/tests/test_utils/test_transormations.py b/summit/tests/test_utils/test_transormations.py new file mode 100644 index 00000000..6788c15c --- /dev/null +++ b/summit/tests/test_utils/test_transormations.py @@ -0,0 +1,20 @@ +import unittest +import numpy as np + + +from summit.multiview_platform.utils import transformations + + +class TestFunctions(unittest.TestCase): + + def test_simple_sign(self): + trans = transformations.sign_labels(np.zeros(10)) + np.testing.assert_array_equal(np.ones(10) * -1, trans) + trans = transformations.sign_labels(np.ones(10)) + np.testing.assert_array_equal(np.ones(10), trans) + + def test_simple_unsign(self): + trans = transformations.unsign_labels(np.ones(10) * -1) + np.testing.assert_array_equal(np.zeros(10), trans) + trans = transformations.unsign_labels(np.ones(10).reshape((10, 1))) + np.testing.assert_array_equal(np.ones(10), trans) -- GitLab