Skip to main content

Abacus Software is a suite of tools built to ensure your experience with Tausand's coincidence counters becomes simplified.

Project description

AbacusSoftware

Abacus Software is a suite of tools built to ensure your experience with Tausand's coincidence counters becomes simplified.

Written in Python3, abacusSoftware relies on the following modules:

  • pyAbacus
  • pyqtgraph
  • NumPy
  • PyQt5
  • pyserial
  • qtmodern

Installation

abacusSoftware can be installed using pip as:

pip install abacusSoftware

Or from GitHub

pip install git+https://github.com/Tausand-dev/abacusSoftware.git

Execute abacusSoftware

On a terminal or command prompt type

abacusSoftware

For developers

Creating a virtual environment

Run the following code to create a virtual environment called .venv

python -m venv .venv

Activate

  • On Unix systems:
source .venv/bin/activate
  • On Windows:
.venv\Scripts\activate

Deactivate

deactivate

Installing packages

After the virtual environment has been activated, install required packages by using:

python -m pip install -r requirements.txt

Freezing code

After activating the virtual environment

Windows

Run the following command

pyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/abacus_small.ico test.py

Two folders will be created: build and dist. Inside dist you'll find the .exe file. To create an installer, first install Inno Setup from https://jrsoftware.org/isinfo.php#stable. Then, using the File Explorer, go to the folder installers and double-click installer_builder.iss or open it from Inno Setup if it is already opened. Click on the play icon and then follow the process, which includes the creation of the installer and the installation itself.

The installer will be saved in a folder called Output.

MacOS

Run the following command

pyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/Abacus_small.png test.py

Two folders will be created: build and dist. Inside dist you'll find the .app file. This file can be run from a console by executing the command To change the icon of the .app file follow the instructions here https://appleinsider.com/articles/21/01/06/how-to-change-app-icons-on-macos

Linux

Run the following command

pyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/Abacus_small.png test.py

Two folders will be created: build and dist. Inside dist you'll find the executable file. This file can be run from a console by executing the command

./AbacusSoftware

If it doesn't run, make sure it has execute permissions. In case it doesn't run chmod +x AbacusSoftware and then try again. The executable file could be used to create a Desktop entry so it can be lauched as an application (for example in Gnome, an icon could be assigned)

To create an AppImage that can be run from multiple Linux distributions and be launch by double clicking, follow the next steps.

  • Create the following folder path: AbacusSoftware.AppDir/usr/bin
  • Place the executable inside the bin folder
  • Place the icon Abacus_small.png located at abacusSoftware/GUI/images/Abacus_small.png inside AbacusSoftware.AppDir
  • Create a file called AbacusSoftware.desktop inside AbacusSoftware.AppDir
  • Edit the .desktop file with the following
[Desktop Entry]
Name=AbacusSoftware
Exec=AbacusSoftware
Icon=Abacus_small
Type=Application
Categories=Utility;
  • Give execution permisions to the .desktop file: chmod +x AbacusSoftware.desktop
  • Create a script called AppRun with the following contents
#!/bin/bash
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
EXEC="${HERE}/usr/bin/AbacusSoftware"
exec "${EXEC}"
  • Give execution permisions to the AppRun file: chmod +x AppRun. After this step, the app should run after doing ./AppRun on a Terminal.
  • For 64-bit architecture, download appimagetool-x86_64.AppImage from https://github.com/AppImage/AppImageKit/releases/ and give execution permisions to it.
  • Place appimagetool outside AbacusSoftware.AppDir and run
ARCH=x86_64 ./appimagetool-x86_64.AppImage AbacusSoftware.AppDir
  • The file AbacusSoftware-x86_64.AppImage will be created. This file can be opened by double clicking it.

Generating images and icons

In linux, cd into abacusSoftware/GUI/images/, where you'll find the image files that will be used in the application. You'll also find a .qrc file which specifies any image that you want to include. If you want to use new images you'll need to specify their name inside such file. Next execute the following command

pyrcc5 -o __GUI_images__.py images.qrc

This will update the __GUI_images__.py file, which needs to be copied into the folder abacusSoftware and replace the file located there with the same name. Now the image resources can be called from within the code by doing, for example,

splash_pix = QtGui.QPixmap(':/splash.png').scaledToWidth(600)

Fixing pyinstaller:

https://github.com/pyinstaller/pyinstaller/commit/082078e30aff8f5b8f9a547191066d8b0f1dbb7e

https://github.com/pyinstaller/pyinstaller/commit/59a233013cf6cdc46a67f0d98a995ca65ba7613a

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abacusSoftware-1.5.0.tar.gz (478.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abacusSoftware-1.5.0-py3-none-any.whl (502.3 kB view details)

Uploaded Python 3

File details

Details for the file abacusSoftware-1.5.0.tar.gz.

File metadata

  • Download URL: abacusSoftware-1.5.0.tar.gz
  • Upload date:
  • Size: 478.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for abacusSoftware-1.5.0.tar.gz
Algorithm Hash digest
SHA256 01ca8ef7bf1a677d82720508fda05d29e722f6a228df7783b980e6b482304fd1
MD5 27ed4c0c85fddd26297041658d533078
BLAKE2b-256 dcfdc495c988f48c09eebd5e4214e3e720365db390d11973abc12dd97a48f189

See more details on using hashes here.

File details

Details for the file abacusSoftware-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: abacusSoftware-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 502.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for abacusSoftware-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0746ade19bcc4a356b17ef3993b9296d37394fd8f773a96055bd2df14282bfeb
MD5 b0e5fecbba7f660968168f4a845e0569
BLAKE2b-256 d3b29d00f68dda6720c138cc5efd538dea1be5b685f409a29d4e5e47f334d784

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page