Skip to content
Snippets Groups Projects

Tikka

The rich desktop Python client for Duniter V2 Ğ1 crypto-currency

Tikka is a rich desktop Python client to manage your Ğ1 accounts.

It has a system integrated GUI, is fast and powerful.

It is licenced under the GPLv3 licence terms.

Requirements

Install with pipx

You can use pipx to install Tikka.

pipx install tikka

Then simply run the tikka command:

tikka

Upgrade or uninstall:

pipx upgrade tikka

pipx uninstall tikka

Install/upgrade from PyPI

If you are in a Python virtual environment:

pip install --upgrade tikka

If you are not:

# GNU/Linux virtualenv creation
mkdir tikka
cd tikka
python -m venv .venv
source .venv/bin/activate
pip install --upgrade tikka

# get the path of the tikka command
which tikka

Run from PyPI installation

tikka

Or

python -m tikka

GNU/Linux system requirements:

sudo apt-get install libsodium23 gcc

Development

It is recommended to install and use pyenv to install the required Python version.

For Pyinstaller, you need to install Python compiled with the --enable-shared option:

PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.7.9

Setup environment

Tikka internationalization requires gettext to be installed to generate locales binary files. Pyinstaller requires some utilities.

sudo apt-get install gettext binutils zip

Install poetry

At this step, it is highly recommended to setup a virtual environment to isolate Python dependencies of the project from the system and avoid conflicts. Use poetry to manage the virtual environment.

Install all Python dependencies with poetry:

poetry install --no-root

Copy bin/pre-commit.sh for pre-commmit git hooks:

cp bin/pre-commit.sh .git/hooks/pre-commit

That's it, you should be ready to contribute. Please read CONTRIBUTING.md.

Check code

make check

Format code

make format

GUI editor

We use QtDesigner to create UI, it will create .ui and .qrc files that you need to convert to _rc.py files with:

bin/convert_resources.sh

Internationalization

To update *.po files after code update:

make i18n_update

To build production *.mo files after *.po have been updated:

make i18n_build

Run tests

All tests:

bin/tests.sh

Only some:

bin/tests.sh tests/domains/test_signing_key.py

Run development application

poetry run python -m tikka

Release tag

Be sure to test the release with updated dependencies:

poetry update
bin/tests.sh

Create a release version commit and tag:

bin/release.sh VERSION

Database setup

Migrations scripts

Add/Edit scripts in tikka/assets/migrations directory:

# version.name.sql
00001.init_tables.sql
00001.init_tables.rollback.sql

Migrate commands

make database
make database_rollback
make database_list

Binary build with pyinstaller

Build standalone executable with pyinstaller:

make pyinstaller

Zip package will be created in dist folder:

dist/tikka-0.1.0.zip

If Pyinstaller do not find the libpython libraries of pyenv, try to set the LD_LIBRARY_PATH env variable with the pyenv lib path:

Example:

make pyinstaller LD_LIBRARY_PATH=$HOME/.pyenv/versions/3.7.9/lib

CI/CD

Install gitlab-runner to test .gitlab-ci.yml.

To test on a local docker image, specify pull policy:

gitlab-runner exec docker --docker-pull-policy never tests

Test on a local gdev node

Run a gdev local node:

docker run -p 9944:9944 duniter/duniter-v2s-gdev

Set connexion to url ws://localhost:9944.

Use Alice, Bob, Charlie, Dave, Eve and Ferdie accounts derivation with the Dev mnemonic:

bottom drive obey lake curtain smoke basket hold race lonely fit walk//Alice