diff --git a/.github/workflows/check_pypi_build.yml b/.github/workflows/check_pypi_build.yml index 952f1744..69971dcb 100644 --- a/.github/workflows/check_pypi_build.yml +++ b/.github/workflows/check_pypi_build.yml @@ -12,11 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: '3.9' + architecture: x64 - name: Install Dependencies run: | - # install our dependencies - conda install python=3.7 - conda install -c rdkit rdkit python -m pip install rdkit-pypi python -m pip install networkx==2.1 python -m pip install pycodestyle autopep8 diff --git a/.github/workflows/format_code.yml b/.github/workflows/format_code.yml index 434133df..0ca0a6e4 100644 --- a/.github/workflows/format_code.yml +++ b/.github/workflows/format_code.yml @@ -12,12 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: '3.9' + architecture: x64 - name: Install Dependencies run: | - # install our dependencies - conda install python=3.7 - conda install -c rdkit rdkit - conda list python -m pip install rdkit-pypi python -m pip install networkx==2.1 python -m pip install pycodestyle autopep8 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 7cdbb93d..8f249ff1 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -24,6 +24,7 @@ jobs: architecture: x64 - name: Install Dependencies run: | + sudo apt-get install -y idle3 python3-tk python -m pip install rdkit-pypi python -m pip install networkx==2.1 python -m pip install openpyxl diff --git a/interfaces/UI/AIMSim_ui_main.py b/interfaces/UI/AIMSim_ui_main.py index c114a7a9..6397d6b3 100644 --- a/interfaces/UI/AIMSim_ui_main.py +++ b/interfaces/UI/AIMSim_ui_main.py @@ -23,7 +23,7 @@ import customtkinter as ctk -from idlelib.tooltip import ToolTip +from tktooltip import ToolTip ctk.set_appearance_mode("dark") # Modes: system (default), light, dark ctk.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green @@ -385,46 +385,66 @@ def updateCompatibleMetricsListener(event): sticky="w", ) - # add tooltips + # add ToolTips ToolTip( self.openConfigButton, "Open the config file\nfor the last run", + follow=True, + delay=2.0, ) ToolTip( self.runButton, - "Write a config file\nand call AIMSim" + "Write a config file\nand call AIMSim", + follow=True, + delay=2.0, ) ToolTip( self.targetMoleculeEntry, - "SMILES string or Filepath for an 'external'\nmolecule for comparison to the others" + "SMILES string or Filepath for an 'external'\nmolecule for comparison to the others", + follow=True, + delay=2.0, ) ToolTip( self.browseButton, - "Open a File Explorer to locate molecules\nin a supported data format" + "Open a File Explorer to locate molecules\nin a supported data format", + follow=True, + delay=2.0, ) ToolTip( self.useMeasureSearchCheckbox, - "Automatically determines best metric\nfor molecules with responses" + "Automatically determines best metric\nfor molecules with responses", + follow=True, + delay=2.0, ) ToolTip( self.showAllDescriptorsButton, "Show experimental descriptors from\nother libraries in the dropdown", + follow=True, + delay=2.0, ) ToolTip( self.verboseCheckbutton, "Check this for additional output\non the terminal or debugging", + follow=True, + delay=2.0, ) ToolTip( self.identifyOutliersCheckbutton, "Isolation Forest to identify outliers\nin sets of molecules with responses", + follow=True, + delay=2.0, ) ToolTip( self.multiprocessingCheckbutton, "Allow use of multiple processing\ncores (automatically configured)", + follow=True, + delay=2.0, ) ToolTip( self.molecularDescriptorCombobox, - "Tip: Use AIMSim from the command line\nto access descriptors from Mordred and Padel" + "Tip: Use AIMSim from the command line\nto access descriptors from Mordred and Padel", + follow=True, + delay=2.0, ) def browseCallback(self): diff --git a/requirements.txt b/requirements.txt index 4d44209c..d5f50d41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,3 +15,4 @@ psutil padelpy plotly customtkinter +tkinter-tooltip diff --git a/tests/test_ToolTip.py b/tests/test_ToolTip.py new file mode 100644 index 00000000..01b24136 --- /dev/null +++ b/tests/test_ToolTip.py @@ -0,0 +1,21 @@ +""" Test the ToolTip package (and all UI packages) """ +import unittest + + +class TestToolTip(unittest.TestCase): + """ + Test the ToolTip package (and all UI packages) by importing them + + """ + + def test_import(self): + """Attempt to import the UI app to ensure imports are correct + """ + try: + from interfaces.UI.AIMSim_ui_main import AIMSimUiApp + except Exception: + self.fail('Unable to import AIMSim UI') + + +if __name__ == "__main__": + unittest.main()