PyLongQt
Python 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.org
PyPI: pypi.org/project/hundlab-PyLongQt
Github: github.com/hundlab/PyLongQt
Documentation:
- The PyLongQt API can be found in the PyLongQt manual along with some examples
- LongQt manual demonstrates how the LongQt gui while also providing further details.
Installation
PyLongQt is a package on PyPI named hundlab_pylongqt and can be installed using
python -m pip install hundlab_pylongqt.
Developer Instructions
There 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.
Requirements
- Qt version 5.15: https://www.qt.io/
- windows: install the MSVC compiled version
- c++17 or greater compliant compiler
- linux: gcc
- windows: MSVC 2019
- OS X: clang
- cmake
- optional:
- QtCreator
Development Build
To 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>/PyLongQt
Be 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, specify
LongQt_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 the requirements.txt file (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 in System Properties -> Advanced -> Environment Variables
and add PYTHONPATH with 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 Build
This 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 use
Developer Command Prompt for VS 2019) and navagate to the PyLongQt github directory, then
run python setup.py build bdist_wheel -- -DLongQt_subdir:BOOL=TRUE on 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 using pip uninstall hundlab_pylongqt before
attempting to reinstall.
Metadata
Release files for hundlab-PyLongQt 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hundlab_PyLongQt-0.5-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details for hundlab_PyLongQt-0.5-cp39-cp39-win_amd64.whl |
| hundlab_PyLongQt-0.5-cp39-cp39-macosx_10_15_x86_64.whl | CPython 3.9 | CPython 3.9 | macOS 10.15+ x86-64 | Details for hundlab_PyLongQt-0.5-cp39-cp39-macosx_10_15_x86_64.whl |
Total release size: 5.3 MB
Release files / hundlab_PyLongQt-0.5-cp39-cp39-win_amd64.whl
| Download URL | hundlab_PyLongQt-0.5-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1392d0d483b292529b75a7920e7c4ddec0ee0857c78efe9709e8400c092cc847
|
|
BLAKE2b-256 checksum How to use checksums |
bbe7e230c57be4ed7b6c5db2637f206f528ef6559eaaa4f8a7f2d207889e52b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5
|
Release files / hundlab_PyLongQt-0.5-cp39-cp39-macosx_10_15_x86_64.whl
| Download URL | hundlab_PyLongQt-0.5-cp39-cp39-macosx_10_15_x86_64.whl |
|---|---|
| Size | 887.0 kB |
| Tags | CPython 3.9 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
19c7980350214dba013cf0336c371c27c6890a056d62c27d7db0de3fb5aa2874
|
|
BLAKE2b-256 checksum How to use checksums |
9afea23483280f86d848027b34967861116693fa1a56bfa2125e28d7d54191db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5
|
Security for hundlab-PyLongQt 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.