Package: hundlab-PyLongQt
PyLongQtPython bindings for LongQt, a cardiac cell electrophysiology simulation platform.
This library allows for cell models to be created and configured to run both simple
and complex simulations.Hundlab Website:hundlab.orgPyPI:pypi.org/project/hundlab-PyLongQtGithub:github.com/hundlab/PyLongQtDocumentation:The PyLongQt API can be found in thePyLongQt manualalong with some examplesLongQt manualdemonstrates how the LongQt gui while also
providing further details.InstallationPyLongQt is a package on PyPI named hundlab_pylongqt and can be installed usingpython -m pip install hundlab_pylongqt.Developer InstructionsThere are two ways to build PyLongQt, one produces a package that can be installed using pip
the other uses cmake to install the library. The pip package install is best for active
development as it allows for a simpler build and install setup with QtCreator or another IDE.
The pip build is for producing a package that can be installed in python, this is used by
the github workflow system to build the pacakges distributed on PyPI.RequirementsQt version 5.15:https://www.qt.io/windows: install the MSVC compiled versionc++17 or greater compliant compilerlinux:      gccwindows:    MSVC 2019OS X:       clangcmakeoptional:QtCreatorDevelopment BuildTo start both the PyLongQt project and LongQt-model project need to be cloned from github into
the following directory structure<parent_dir>/LongQt-model
<parent_dir>/PyLongQtBe sure to recursively clone PyLongQt so that pybind11 is cloned as a subdirectory. PyLongQt needs
to be built with different build systems depending on the platform, for windows use MSVC 2019,
for linux use gcc (or clang), and for mac use clang. On windows MSCV 2019 can be installed as
a standalone package or as a part of the visual studio IDE. Qt 5.12 Core needs to be installed, and
optionally QtCreator.To build PyLongQt, cmake needs to be told to look for LongQt-model as a subdirectory, this is why
the directory structure needs to follow the description above. When running cmake, specifyLongQt_subdir:BOOL=TRUE. If using QtCreator this can be done through the projects tab, if using
the command line, it can be specified as an argument to cmake-DLongQt_subdir:BOOL=TRUE.To install PyLongQt add the install target to the build process (in QtCreator) or run cmake
with the install target (for command line). It is often best to set the install directory
manually, I install into a install subdirectory in my home folder. Set the CMAKE_INSTALL_PREFIX,
and ensure that it ends in PyLongQt. Once installed, use pip to manually install the dependancies
found in therequirements.txtfile (python -m pip install -r requirements.txt).
Finally, your installation directory needs to be added
to the PYTHONPATH. For mac and linux this can be done by setting it in your .bash_profile (or corresponding
shell profile file). On windows the setting can be found inSystem Properties -> Advanced -> Environment Variablesand addPYTHONPATHwith the location of your install directory (the parent of the PyLongQT install
location). Now PyLongQt should be ready to use. After making changes to the code, the project
just needs rebuild and reinstalled. Windows Note: When rebuilding PyLongQt it cannont be currently imported
anywhere, so python interpreters may need to be restarted if PyLongQt has been imported (only an issue
on windows, though on other platforms the python interpreters may still need to be restarted to allow
for PyLongQt to be reimported).Package BuildThis build requires scikit-build to be installed using pip. For this build I do not use QtCreator,
although it may be possible to configure it to work. To build open a terminal (on windows useDeveloper Command Prompt for VS 2019) and navagate to the PyLongQt github directory, then
runpython setup.py build bdist_wheel -- -DLongQt_subdir:BOOL=TRUEon windows you may need to
specify the generator as well by adding-G "Visual Studio 16 2019".Once built, a wheel file (.whl) will be created in PyLongQt/dist. This file can be installed by
using pip and passing in the full file name (ending in .whl) to pip install. If rebuilding
PyLongQt it will be necessary to uninstall the pacakge usingpip uninstall hundlab_pylongqtbefore
attempting to reinstall.