diff --git a/phasecalculator/analysis/fgipanalysis.py b/phasecalculator/analysis/fgipanalysis.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/analysis/fgipanalysis.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/analysis/similarityanalysis.py b/phasecalculator/analysis/similarityanalysis.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/analysis/similarityanalysis.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/analysis/vleanalysis.py b/phasecalculator/analysis/vleanalysis.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/analysis/vleanalysis.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/io/phasecalculatorxmlparser.py b/phasecalculator/io/phasecalculatorxmlparser.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/io/phasecalculatorxmlparser.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/io/polynomialio.py b/phasecalculator/io/polynomialio.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/io/polynomialio.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/phasecalculatorcli.py b/phasecalculator/phasecalculatorcli.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/phasecalculatorcli.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/runners/fgipanalysisrunner.py b/phasecalculator/runners/fgipanalysisrunner.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/runners/fgipanalysisrunner.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/runners/phasetransferrunner.py b/phasecalculator/runners/phasetransferrunner.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/runners/phasetransferrunner.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/runners/similarityanalysisrunner.py b/phasecalculator/runners/similarityanalysisrunner.py new file mode 100755 index 0000000000000000000000000000000000000000..f2ba03bf890f3712bb1895bca22fa218485ec777 --- /dev/null +++ b/phasecalculator/runners/similarityanalysisrunner.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/test/analysistest/fgipanalysistest.py b/phasecalculator/test/analysistest/fgipanalysistest.py new file mode 100755 index 0000000000000000000000000000000000000000..0641f4076b57f3c4b5cd7d5c89fd63fe4f90b644 --- /dev/null +++ b/phasecalculator/test/analysistest/fgipanalysistest.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging +import unittest + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + diff --git a/phasecalculator/test/phasecalculatortests.py b/phasecalculator/test/phasecalculatortests.py new file mode 100755 index 0000000000000000000000000000000000000000..587a90606c990efa96b74377549fbf9c70afab9b --- /dev/null +++ b/phasecalculator/test/phasecalculatortests.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +# phasecalculator calculates FGIPs, solvent similarity and VLE with SSIMPLE. +# Copyright (C) 2019 Mark D. Driver +# +# phasecalculator is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +""" +Created on Tue Jan 7 16:34:17 2020 + +@author: Mark +""" + +import logging +import unittest +import sys + +logging.basicConfig() +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.WARN) + +IO_TEST_CASES = [] + +RUNNERS_TEST_CASES = [] + +ANALYSIS_TEST_CASES = [] + +MODULE_TEST_CASES = [] + +def create_test_suite(): + """Create a test suite with all the tests from the package. + + Returns + ------- + suite : test suite + test suite with all tests of package loaded. + + """ + LOGGER.info("setting up loader and test suite") + loader = unittest.TestLoader() + suite = unittest.TestSuite() + for test_case in IO_TEST_CASES: + LOGGER.debug("Adding %s", test_case) + suite.addTests(loader.loadTestsFromTestCase(test_case)) + for test_case in RUNNERS_TEST_CASES: + LOGGER.debug("Adding %s", test_case) + suite.addTests(loader.loadTestsFromTestCase(test_case)) + for test_case in ANALYSIS_TEST_CASES: + LOGGER.debug("Adding %s", test_case) + suite.addTests(loader.loadTestsFromTestCase(test_case)) + for test_case in MODULE_TEST_CASES: + LOGGER.debug("Adding %s", test_case) + suite.addTests(loader.loadTestsFromTestCase(test_case)) + return suite + + +def run_tests(): + """Run test suite. Exits if there is a failure. + + Returns + ------- + None + """ + LOGGER.info("calling test suite method") + suite = create_test_suite() + LOGGER.info("running test suite") + ret = ( + not unittest.TextTestRunner(verbosity=2, stream=sys.stderr) + .run(suite) + .wasSuccessful() + ) + if ret: + sys.exit(ret) + + +if __name__ == "__main__": + run_tests()