diff --git a/src/ml_things/__init__.py b/src/ml_things/__init__.py index afa413d..ebcde5d 100644 --- a/src/ml_things/__init__.py +++ b/src/ml_things/__init__.py @@ -1,6 +1,17 @@ -# flake8: noqa # coding=utf-8 # Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. __version__ = "0.0.1" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..f719599 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,14 @@ +# coding=utf-8 +# Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/tests/test_array_functions.py b/tests/test_array_functions.py new file mode 100644 index 0000000..f3e29ba --- /dev/null +++ b/tests/test_array_functions.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Unittesting array related functions. + +Run: python -m unittest test_array_functions + +""" + +import unittest +from ml_things import ( + batch_array, + pad_array, + ) + + +class TestPadArray(unittest.TestCase): + def test_type(self): + # Make sure type errors are raised when necessary + pass + + def test_pad_array(self): + # Test a sample of pad_array. + pass + + +class TestBatchArray(unittest.TestCase): + def test_type(self): + # Make sure type errors are raised when necessary + pass + + def test_batch_array(self): + # Test a sample of batch_array. + pass diff --git a/tests/test_plot_functions.py b/tests/test_plot_functions.py new file mode 100644 index 0000000..910b3ed --- /dev/null +++ b/tests/test_plot_functions.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Unittesting plot functions. + +Run: python -m unittest test_plot_funcitons + +""" + +# Work in progress diff --git a/tests/test_samples/plot_array.png b/tests/test_samples/plot_array.png new file mode 100644 index 0000000..5b85552 Binary files /dev/null and b/tests/test_samples/plot_array.png differ diff --git a/tests/test_samples/plot_confusion_matrix.png b/tests/test_samples/plot_confusion_matrix.png new file mode 100644 index 0000000..34a570c Binary files /dev/null and b/tests/test_samples/plot_confusion_matrix.png differ diff --git a/tests/test_samples/plot_dict.png b/tests/test_samples/plot_dict.png new file mode 100644 index 0000000..d96a714 Binary files /dev/null and b/tests/test_samples/plot_dict.png differ diff --git a/tests/test_text_functions.py b/tests/test_text_functions.py new file mode 100644 index 0000000..02d2d88 --- /dev/null +++ b/tests/test_text_functions.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Unittesting text related functions. + +Run: python -m unittest test_text_functions + +""" + +# Work in progress diff --git a/tests/test_web_related.py b/tests/test_web_related.py new file mode 100644 index 0000000..c20c295 --- /dev/null +++ b/tests/test_web_related.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# Copyright 2020 George Mihaila. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Unittesting web realted functions. + +Run: python -m unittest test_web_related + +""" + +# Work in progress