Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • cebash/sakia
  • santiago/sakia
  • jonas/sakia
3 results
Select Git revision
Show changes
Commits on Source (193)
Showing with 467 additions and 101 deletions
......@@ -49,3 +49,9 @@ out
.directory
temp
*_uic.py
# mypy
.mypy_cache
# pyenv
/.python-version
stages:
- github-sync
- build_and_test
- format
- tests
- build
- release
variables:
PYENV_PYTHON_VERSION: 3.5.5
image: registry.duniter.org/docker/python3/sakia-builder:1.2.0
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.7
push_to_github:
stage: github-sync
variables:
GIT_STRATEGY: none
# SUB-TASKS
.push_to_github:
tags:
- github
script:
after_script:
# remove all files in current repo
- rm -rf ./*
- rm -rf .git
- rm -rf .git*
# do a mirror clone in current repo
- git clone --mirror $CI_REPOSITORY_URL .
# do config for github push
- git remote add github $GITHUB_URL_AND_KEY
- git config --global user.email "contact@duniter.org"
- git config --global user.name "Duniter"
# Job would fail if we don't remove refs about pull requests
- bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
# remove refs about merge requests
- bash -c "cat packed-refs | grep -v 'refs/merge-requests' > packed-refs-new; echo 'Removed merge-requests refs.'"
- mv packed-refs-new packed-refs
# github push
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.env: &env
tags:
- redshift-docker-python
before_script:
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
- pyenv shell $PYENV_PYTHON_VERSION
- export PATH=/opt/qt/5.9/5.9.4/gcc_64/bin:$PATH
- export DISPLAY=:99
build_and_test: &build_and_test
<<: *env
stage: build_and_test
.changes:
only:
changes:
- src/sakia/*
- .gitlab-ci.yml
- Makefile
- requirements_dev.txt
- requirements_deploy.txt
- requirements.txt
- setup.py
- tests/**/*.py
# TASKS
format:
extends:
- .changes
stage: format
script:
- pip install -r requirements_dev.txt
- make check-format
tests:
extends:
- .changes
stage: tests
script:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- /start.sh # start xvfb
- make tests
build:
extends:
- .changes
stage: build
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
release_appimage:
extends:
- .changes
stage: release
when: manual
script:
- pip install -r requirements.txt
- pip install -r requirements_deploy.txt
- make build
- make appimage
artifacts:
paths:
- ci/appimage/Sakia_x86_64.AppImage
# only:
# - master
release_pypi:
extends:
- .push_to_github
stage: release
when: manual
script:
- pip install wheel
- pip install pytest-cov
- pip install -r requirements.txt
- python gen_resources.py
- python gen_translations.py --lrelease
- python setup.py bdist_wheel
- py.test --cov=sakia tests/
- pip install -r requirements_deploy.txt
- make build
- make deploy PYPI_LOGIN=${PYPI_LOGIN} PYPI_PASSWORD=${PYPI_PASSWORD}
only:
- master
releases:
<<: *env
release_pypi_test:
stage: release
when: manual
only: [tags, dev]
script:
- pip install -r requirements.txt
- pip install wheel
- pip install twine
- python setup.py bdist_wheel
- twine upload dist/* --username duniter --password $PYPI_PASSWORD
- pip install -r requirements_deploy.txt
- make build
- make deploy_test PYPI_TEST_LOGIN=${PYPI_TEST_LOGIN} PYPI_TEST_PASSWORD=${PYPI_TEST_PASSWORD}
## v0.53.2 (18/01/2021)
This is the last version released by Vit.
No more new version or maintenance will be done.
Thanks to Inso for this wonderful project, and to every enthusiast users.
### Bugs
* #809 fix About Sakia available release search code and obsolete link to Github in exception
* #813 remove obsolete github references in README.md
* #815 remove unused dependency asynctest from requirements.txt
* fix "make tests" command running test scripts from AppDir in ci/appimage
## v0.53.1 (1/11/2020)
### Bugs
* #811 Fix WoT window is blank when clicking Explore until the menu "Show in WoT" is used.
Button is removed.
* #793 Fix crash `RuntimeError: no running event loop` when running on Python 3.8
### CI/CD
* #817 Add AppImage to release with automatic compilation in CD
## v0.53.0 (25/09/2020)
### Features
* #816 Add root_servers.yml in $HOME/.config/sakia folder to configure your own root servers
## v0.52.0 (23/04/2020)
### Features
* #807 Add new "Percentage of Average" referential
* Transfer window now use current referential instead of only relative by UD
* Add current referential units on the balance display
### Bugs
* Fix referentials french translation
* Fix network "Open in browser" menu
## v0.51.1 (05/04/2020)
### Bugs
* #802 Fix "Send as source" context menu not appear in Expert Mode on normal received transactions
* Update incomplete french translation
## v0.51.0 (03/04/2020)
### Features
* #798 - Complete workflow to send transaction that we can get back after one week:
* A selector allow to choose the lock condition of the output transaction
* Then, the transaction with special lock condition appears with an underline in the transaction history
* If you are the receiver, you can use the context menu action "Send as source" to send it to yourself
before the issuer get it back
* If you are the issuer, use the context menu action "Send as source" to send it to yourself after the delay
* Before the delay, you can check the lock condition in the transfer window to see the date when the transaction will be unlocked
* In Expert Mode (see Preferences), you can use any incoming transaction or dividend as source for your transfer
### Enhancement
* Add a legend for colors, italic and underlined display of transactions under transaction history
* Upgrade dependencies to duniterpy 0.57.0
### Bugs
* Fix gen_translations.py running Qt4 lrelease in Makefile
* Fix error parsing some WSP2 Head message because software version had a prefix (duniterpy fix)
### CI/CD
* Remove obsolete runner tag
* Release job only on `master`, release_test job only on `dev` or `tags`
## v0.50.5 (21/03/2020)
### Bugs
* Fix send money to pubkey with search user selected
### Tests
* Update and fix pytest suite
* Update duniter-mirage dependency version
### Enhancements
* Tx history update button set to disable until update is done
* Increase delay between network crawlings to 1 mn
### CI/CD
* Add format and tests stage in .gitlab-ci.yml
## v0.50.4 (18/03/2020)
### Code
* Fix session closed error (regression in v0.50.3)
## v0.50.3 (16/03/2020)
### Code
* Fix exception when refresh tx history
* Fix Unclosed client session error (at last !)
### CI/CD
* Fix bug with setuptools 28.8.x version in gitlab CI/CD image
## v0.50.2 (10/03/2020)
### Code
* Add system libs requirement and command line options in README.md
* Fix bad label "ok" on startup message box and enhance it
* Propose new sakia account menu at first start instead of create a new member account on the network
* Only display licence step when registering a new member account on the network
* Update french translation
### Project
* Fix release.sh using simple quote on sakia.__init__ version
* Add this changelog
## v0.50.1 (08/03/2020)
### Code
* Use asyncio.ensure_future() instead of async() which disappear from Py 3.7
* Include the license file into the wheel distributed, the license changed name
### CI/CD
* Fix sources path and allow all file extensions to trigger the CI
### Build
* Add dist check after build in Makefile
### Project
* Fix release.sh broken by black format
## [v0.50.0](https://git.duniter.org/clients/python/sakia/-/milestones/15) (07/03/2020)
### Code
* Update DuniterPy dependency to 0.56.0
* Fix all detected bugs
* Add the Sakia icon in toolbar
* Remove search direct connections
* Add update button in tx history
* Fix translation system
* Update french translation
.PHONY: docs tests check check-format mypy pylint format build deploy deploy_test
.SILENT: deploy deploy_test # do not echo commands with password
# bash required to use source command
SHELL := /bin/bash
# run tests
tests:
python3 gen_resources.py
python3 gen_translations.py
pytest -q -s --disable-warnings tests ${TESTS_FILTER}
# check
check: mypy pylint check-format
# check static typing
mypy:
python3 -m mypy src --ignore-missing-imports
python3 -m mypy tests --ignore-missing-imports
# check code errors
pylint:
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 src/sakia/
pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/
# check format
check-format:
black --check src
black --check tests
# format code
format:
black src
black tests
# build a wheel package in build folder and put it in dist folder
build:
if [ -d "./build" ]; then rm -r build/*; fi
if [ -d "./dist" ]; then rm -r dist/*; fi
python3 gen_resources.py
python3 gen_translations.py
python3 setup.py sdist bdist_wheel
twine check dist/*
appimage:
cd ci/appimage && wget -qc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod u+x linuxdeploy-x86_64.AppImage
cd ci/appimage && wget -qc https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/linuxdeploy-plugin-python-x86_64.AppImage && chmod u+x linuxdeploy-plugin-python-x86_64.AppImage
cd ci/appimage && source config.env && ./build.sh
# upload on PyPi repository
deploy:
twine upload dist/* --username ${PYPI_LOGIN} --password ${PYPI_PASSWORD}
# upload on PyPi test repository
deploy_test:
twine upload dist/* --username ${PYPI_TEST_LOGIN} --password ${PYPI_TEST_PASSWORD} --repository-url https://test.pypi.org/legacy/
<!-- Landscape | [![Code Health](https://landscape.io/github/duniter/sakia/dev/landscape.svg?style=flat)](https://landscape.io/github/duniter/sakia/dev) -->
![sakia logo](https://git.duniter.org/clients/python/sakia/-/raw/master/sakia.png)
![sakia logo](https://raw.github.com/duniter/sakia/master/sakia.png)
This project is not maintained anymore since 18/01/2021.
No more new version or maintenance will be done.
Vit thanks Inso for this wonderful project, and every enthusiast users.
# Sakia
[![coverage report](https://git.duniter.org/clients/python/sakia/badges/gitlab/coverage.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
......@@ -8,16 +11,12 @@
[![Build Status](https://travis-ci.org/duniter/sakia.svg?branch=travis)](https://travis-ci.org/duniter/sakia)
[![Build status](https://ci.appveyor.com/api/projects/status/pvl18xon8pvu2c8w/branch/dev?svg=true)](https://ci.appveyor.com/project/Insoleet/sakia-bee4m/branch/dev)
========
Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project.
### Features
* Accounts management
* Communities viewing
* Money Transfer
* cx_freeze deployment
* Wallets management
* Contacts management
* Joining a community, publishing keys
......@@ -26,32 +25,127 @@ Python3 and PyQt5 Client for [duniter](http://www.duniter.org) project.
### Dependencies
* Dependencies :
* Qt5
* [python3](https://www.python.org/downloads/)
* [python 3.6+](https://www.python.org/downloads/)
* [libsodium](http://doc.libsodium.org/installation/README.html)
* General tips : use pyenv to build sakia, as described in the [wiki](https://github.com/duniter/sakia/wiki/Cutecoin-install-for-developpers)
General tips : use [pyenv](https://github.com/pyenv/pyenv) to build sakia, as described in the [documentation](https://git.duniter.org/clients/python/sakia/-/blob/master/doc/install_for_developers.md)
Building Python with pyenv requires libraries of `openssl` and `sqlite3`. On Ubuntu, install it using the following commands :
apt-get update
apt-get install libssl-dev
apt-get install libsqlite3-dev
### Install with pip
* Run `pip install sakia`
* start "sakia" :)
### Download latest release
* Go to [current release](https://git.duniter.org/clients/python/sakia/-/releases)
* Download AppImage for linux x86_64. Run it !
* Join our developer community by contacting us on [duniter forum](http://forum.duniter.org/)
## Command line options
`-d` to display log to debug
`--currency g1-test` to connect to the g1-test currency network.
## Development
* When writing docstrings, use the reStructuredText format recommended by [PEP 0287](https://www.python.org/dev/peps/pep-0287/#docstring-significant-features)
* Use make commands to check the code and the format it correct.
The development tools require Python 3.6.x or higher.
* Install a supported Python version with [pyenv](https://github.com/pyenv/pyenv)
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
* Create a virtualenv in the project folder:
python -m venv .venv
* Install dependencies
pip install -r requirements.txt
* Run Sakia from the source code
PYTHONPATH="`pwd`/src/." python src/sakia/main.py
* Before submiting a merge requests, please check the static typing and tests.
* Install dev dependencies
pip install -r requirements_dev.txt
* Check static typing with [mypy](http://mypy-lang.org/)
make check
* Run all unit tests (pytest module) with:
make tests
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
* Run only some unit tests by passing a special ENV variable:
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
## Packaging and deploy
### PyPi
In the development pyenv environment, install the tools to build and deploy
pip install --upgrade -r requirements_deploy.txt
Change and commit and tag the new version number (semantic version number)
./release.sh 0.x.y
Build the PyPi package in the `dist` folder
make build
Deploy the package to PyPi test repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy_test PYPI_TEST_LOGIN=xxxx PYPI_TEST_PASSWORD=xxxx
Install the package from PyPi test repository
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple/ sakia
Deploy the package on the PyPi repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
[SPACE]make deploy PYPI_LOGIN=xxxx PYPI_PASSWORD=xxxx
### Wheel Build scripts
make build
Or manually:
* Install __wheel__ with `pip install wheel`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the wheel : Run `python3 setup.py bdist_wheel` in sakia folder
### Pyinstaller Build scripts
### AppImage
make appimage
The make command will do a wheel build, then create the AppImage file `ci/appimage/Sakia_x86_64.AppImage`
### Pyinstaller Build scripts (not maintained)
* Install __pyinstaller__ with `pip install pyinstaller`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the binaries : Run `pyinstall sakia.spec`
### Install with pip
* Run `pip install sakia`
* start "sakia" :)
### Download latest release
* Go to [current release](https://github.com/duniter/sakia/releases)
* Download corresponding package to your operating system
* Unzip and start "sakia" :)
* Join our beta community by contacting us on [duniter forum](http://forum.duniter.org/)
## License
This software is distributed under [GNU GPLv3](https://raw.github.com/duniter/sakia/dev/LICENSE).
This software is distributed under [GNU GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).
......@@ -29,9 +29,7 @@ install:
#- dir /b /s /ad c:\Qt\5.6
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Add qt to path
- "SET PATH=%QTDIR%\\bin;%QTDIR%\\lib;%PATH%"
- "SET QT_PLUGIN_PATH=%QTDIR%\\plugins"
#- "SET QT_PLUGIN_PATH=%QTDIR%\\plugins"
- echo %PATH%
#- choco install -y vcredist2015
- "%CMD_IN_ENV% conda config --set always_yes yes --set changeps1 no"
......@@ -70,4 +68,3 @@ deploy:
prerelease: true
on:
appveyor_repo_tag: true
#!/bin/bash
#./linuxdeploy-x86_64.AppImage --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
# workaround to run inside a docker container
./linuxdeploy-x86_64.AppImage --appimage-extract
mv squashfs-root linuxdeploy-x86_64.AppDir
./linuxdeploy-x86_64.AppDir/AppRun --appdir AppDir -i sakia.png -d sakia.desktop --plugin python --output appimage --custom-apprun sakia.sh
version=0.53.2
# linuxdeploy python plugin
export PYTHON_SOURCE=https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
export PIP_REQUIREMENTS=$(pwd)/../../dist/sakia-${version}-py3-none-any.whl
# linuxdeploy appimage plugin
export OUTPUT=Sakia_x86_64.AppImage
[Desktop Entry]
Version=1.0
Name=Sakia
Name[fr]=Sakia
Comment=Duniter Ğ1 Libre Currency Client
Comment[fr]=Client pour la Monnaie Libre Duniter Ğ1
GenericName=Sakia client
GenericName[fr]=Client Sakia
Exec=sakia
Terminal=false
Type=Application
Icon=sakia
Categories=Utility;
StartupNotify=true
GenericName[fr_FR]=Client Sakia
Comment[fr_FR]=Client pour la Monnaie Libre Duniter Ğ1
MimeType=x-scheme-handler/duniter;
ci/appimage/sakia.png

51.5 KiB

#!/bin/bash
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# Call the entry point
${APPDIR}/usr/bin/python3.6 -s ${APPDIR}/usr/python/lib/python3.6/site-packages/sakia/main.py "$@"
......@@ -19,8 +19,10 @@ pip install packaging
python gen_resources.py
if %errorlevel% neq 0 exit /b 1s
python gen_translations.py
call .\\ci\\appveyor\\gen_translations.cmd
if %errorlevel% neq 0 exit /b 1
SET PATH=c:\\python35_64\\envs\\test-environment\\lib\\site-packages\\PyQt5\\Qt\\bin;%PATH%
pyinstaller sakia.spec
if %errorlevel% neq 0 exit /b 1
@ECHO ON
SET PREVPATH=%PATH%
SET PATH=%QTDIR%\\bin;%QTDIR%\\lib;%PATH%
lrelease -version
python gen_translations.py
if %errorlevel% neq 0 exit /b 1
SET PATH=%PREVPATH%
......@@ -15,7 +15,7 @@
#error "Unable to find MyAppExe"
#endif
#define MyAppVerStr "0.33.0rc3"
#define MyAppVerStr "0.53.2"
[Setup]
AppName={#MyAppName}
......
......@@ -4,6 +4,7 @@ call activate test-environment
echo "%PATH%"
echo "%QT_PLUGIN_PATH%"
python -V
call pyuic5 --version
......
Package: sakia
Version: 0.33.0rc3
Version: 0.53.2
Section: misc
Priority: optional
Architecture: all
......
......@@ -10,8 +10,8 @@ cd ~/projects/sakia_dev
### Install pip dependencies
```bash
sudo pip3 install --upgrade pip
sudo pip3 install -r requirements.txt
pip3 install --upgrade pip --user
pip3 install -r requirements.txt --user
```
### Fix Qt link
......@@ -21,32 +21,29 @@ sudo ln -s /usr/bin/lrelease-qt5 /usr/bin/lrelease
### Script to launch Sakia
```bash
cd ..
echo "#!/bin/bash
if [ $1 == "dev" ]; then
cd sakia_dev
git pull
python3 gen_resources.py
python3 gen_translations.py
python3 src/sakia/main.py -d
python3 $HOME/projects/gen_resources.py
python3 $HOME/projects/gen_translations.py
python3 $HOME/projects/src/sakia/main.py -d
fi
if [ $1 == "stable" ]; then
./sakia_stable/dist/sakia/sakia -d
fi" >> run_sakia.sh
fi" >> $HOME/run_sakia.sh
```
## Python path
### Bash
```bash
echo "# Sakia
export PYTHONPATH=/home/$USER/projects/sakia/src" >> ~/.bashrc
export PYTHONPATH=$HOME/projects/sakia_dev/src" >> ~/.bashrc
```
### Fish
```bash
echo "# Sakia
set -x PYTHONPATH /home/$USER/projects/sakia/src" >> ~/.config/fish/config.fish
set -x PYTHONPATH "$HOME/projects/sakia_dev/src" >> ~/.config/fish/config.fish
```
## Install dependencies
......@@ -68,9 +65,3 @@ sudo pip3 install --upgrade duniterpy
```bash
sudo pip3 install pyinstaller
```
### Previous dependencies no more needed
```bash
#qtchooser qt5-qtbase-devel qt5-qtsvg-devel openssl-devel \
#zfstream-devel readline-devel sqlite-devel gcc-c++ qt5-qtsvg
```
......@@ -64,4 +64,9 @@ def build_resources():
prepare_qm()
# add Qt standardButtons qm file
# This file must be copied from Qt libs in the res/i18n/qm folder of the project
qtbase_filename = "qtbase_fr.qm"
if os.path.exists(os.path.join(qm, qtbase_filename)):
qm_shortnames.append(qtbase_filename)
build_resources()
#!/bin/bash
#__version_info__ = ('0', '20', '0dev6')
current=`grep -P "__version_info__ = \(\'\d+\', \'\d+\', \'\d+(\w*)\'\)" src/sakia/__init__.py | grep -oP "\'\d+\', \'\d+\', \'\d+(\w*)\'"`
current=`grep -P "__version_info__ = \(\"\d+\", \"\d+\", \"\d+(\w*)\"\)" src/sakia/__init__.py | grep -oP "\"\d+\", \"\d+\", \"\d+(\w*)\""`
echo "Current version: $current"
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9A-Za-z]*$ ]]; then
IFS='.' read -r -a array <<< "$1"
sed -i "s/__version_info__\ = ($current)/__version_info__ = ('${array[0]}', '${array[1]}', '${array[2]}')/g" src/sakia/__init__.py
sed -i "s/__version_info__\ = ($current)/__version_info__ = (\"${array[0]}\", \"${array[1]}\", \"${array[2]}\")/g" src/sakia/__init__.py
sed -i "s/#define MyAppVerStr .*/#define MyAppVerStr \"$1\"/g" ci/appveyor/sakia.iss
sed -i "s/Version: .*/Version: $1/g" ci/travis/debian/DEBIAN/control
sed -i "s/Version=.*/Version=$1/g" res/linux/usr/share/applications/sakia.desktop
git commit src/sakia/__init__.py ci/appveyor/sakia.iss ci/travis/debian/DEBIAN/control res/linux/usr/share/applications/sakia.desktop -m "$1"
sed -i "s/version=.*/version=$1/g" ci/appimage/config.env
git commit src/sakia/__init__.py ci/appveyor/sakia.iss ci/travis/debian/DEBIAN/control res/linux/usr/share/applications/sakia.desktop ci/appimage/config.env -m "$1"
git tag "$1" -a -m "$1"
else
echo "Wrong version format"
......
quamash
asynctest
networkx
attrs
duniter-mirage
duniterpy>=0.40
pytest
pytest-asyncio<0.6
pyyaml
aiohttp
async_timeout
PyQt5>=5.9,<5.10
\ No newline at end of file
pypeg2
aiohttp==3.6.2
async-timeout==3.0.1
attrs==19.3.0
duniterpy==0.58.1
jsonschema==3.2.0
networkx==2.4
PyQt5==5.9.2
PyYAML==5.3
Quamash==0.6.1