FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f66c8f77 authored by Mark Driver's avatar Mark Driver
Browse files

update to add provisional module files.

These just contain logger set up. Actual documentation and impolementations are required.
parent 6fb38e21
No related branches found
No related tags found
No related merge requests found
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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)
# -*- 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()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment