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
  • Docker
  • Docker-debian9
  • check_uniq_node_by_endpoints
  • dev
  • feature/agent_architecture
  • feature/backend
  • fix_ci
  • fix_ci_osx
  • fix_dbus_error
  • fix_travis#1105
  • fixappveyor
  • gitlab
  • landscape
  • master
  • pyinstaller
  • pyqt5.6
  • qt5.7
  • qtwebengine
  • sakia020
  • translations
  • 0.1.0
  • 0.10.0
  • 0.10.1
  • 0.10.2
  • 0.11.0
  • 0.11.1
  • 0.11.2
  • 0.11.3
  • 0.11.4
  • 0.11.4.post1
  • 0.11.5
  • 0.12.0
  • 0.12.1dev1
  • 0.12.1dev2
  • 0.12.1dev3
  • 0.12.1dev4
  • 0.12.dev1
  • 0.12.dev2
  • 0.12.dev3
  • 0.12.dev4
  • 0.12.dev5
  • 0.12rc1
  • 0.2.0
  • 0.2.1
  • 0.20.0
  • 0.20.0dev1
  • 0.20.0dev10
  • 0.20.0dev12
  • 0.20.0dev13
  • 0.20.0dev14
  • 0.20.0dev15
  • 0.20.0dev16
  • 0.20.0dev2
  • 0.20.0dev3
  • 0.20.0dev3-test1
  • 0.20.0dev4
  • 0.20.0dev5
  • 0.20.0dev6
  • 0.20.0dev7
  • 0.20.0dev8
  • 0.20.0dev9
  • 0.20.1
  • 0.20.10
  • 0.20.11
  • 0.20.13
  • 0.20.2
  • 0.20.3
  • 0.20.4
  • 0.20.5
  • 0.20.6
  • 0.20.7
  • 0.20.8
  • 0.20.9
  • 0.3.0
  • 0.30.0
  • 0.30.0beta
  • 0.30.0beta1
  • 0.30.0beta2
  • 0.30.0beta3
  • 0.30.0beta4
  • 0.30.0beta5
  • 0.30.0beta6
  • 0.30.0beta7
  • 0.30.0beta8
  • 0.30.0beta9
  • 0.30.1
  • 0.30.10
  • 0.30.11
  • 0.30.12
  • 0.30.13
  • 0.30.14
  • 0.30.2
  • 0.30.3
  • 0.30.4
  • 0.30.5
  • 0.30.6
  • 0.30.7
  • 0.30.8
  • 0.30.9
  • 0.31.0
  • 0.31.0.post1
  • 0.31.1
  • 0.31.2
  • 0.31.3
  • 0.31.4
  • 0.31.5
  • 0.31.6
  • 0.32.0
  • 0.32.0-linux
  • 0.32.0RC1
  • 0.32.0RC2
  • 0.32.0RC3
  • 0.32.0RC4
  • 0.32.0RC5
  • 0.32.0RC6
  • 0.32.1
  • 0.32.10
  • 0.32.10post1
  • 0.32.2
  • 0.32.3
120 results

Target

Select target project
  • cebash/sakia
  • santiago/sakia
  • jonas/sakia
3 results
Select Git revision
  • Docker
  • Docker-debian9
  • check_uniq_node_by_endpoints
  • dev
  • feature/agent_architecture
  • feature/backend
  • fix_ci
  • fix_ci_osx
  • fix_dbus_error
  • fix_travis#1105
  • fixappveyor
  • gitlab
  • landscape
  • master
  • pyinstaller
  • pyqt5.6
  • qt5.7
  • qtwebengine
  • sakia020
  • translations
  • 0.1.0
  • 0.10.0
  • 0.10.1
  • 0.10.2
  • 0.11.0
  • 0.11.1
  • 0.11.2
  • 0.11.3
  • 0.11.4
  • 0.11.4.post1
  • 0.11.5
  • 0.12.0
  • 0.12.1dev1
  • 0.12.1dev2
  • 0.12.1dev3
  • 0.12.1dev4
  • 0.12.dev1
  • 0.12.dev2
  • 0.12.dev3
  • 0.12.dev4
  • 0.12.dev5
  • 0.12rc1
  • 0.2.0
  • 0.2.1
  • 0.20.0
  • 0.20.0dev1
  • 0.20.0dev10
  • 0.20.0dev12
  • 0.20.0dev13
  • 0.20.0dev14
  • 0.20.0dev15
  • 0.20.0dev16
  • 0.20.0dev2
  • 0.20.0dev3
  • 0.20.0dev3-test1
  • 0.20.0dev4
  • 0.20.0dev5
  • 0.20.0dev6
  • 0.20.0dev7
  • 0.20.0dev8
  • 0.20.0dev9
  • 0.20.1
  • 0.20.10
  • 0.20.11
  • 0.20.13
  • 0.20.2
  • 0.20.3
  • 0.20.4
  • 0.20.5
  • 0.20.6
  • 0.20.7
  • 0.20.8
  • 0.20.9
  • 0.3.0
  • 0.30.0
  • 0.30.0beta
  • 0.30.0beta1
  • 0.30.0beta2
  • 0.30.0beta3
  • 0.30.0beta4
  • 0.30.0beta5
  • 0.30.0beta6
  • 0.30.0beta7
  • 0.30.0beta8
  • 0.30.0beta9
  • 0.30.1
  • 0.30.10
  • 0.30.11
  • 0.30.12
  • 0.30.13
  • 0.30.14
  • 0.30.2
  • 0.30.3
  • 0.30.4
  • 0.30.5
  • 0.30.6
  • 0.30.7
  • 0.30.8
  • 0.30.9
  • 0.31.0
  • 0.31.0.post1
  • 0.31.1
  • 0.31.2
  • 0.31.3
  • 0.31.4
  • 0.31.5
  • 0.31.6
  • 0.32.0
  • 0.32.0-linux
  • 0.32.0RC1
  • 0.32.0RC2
  • 0.32.0RC3
  • 0.32.0RC4
  • 0.32.0RC5
  • 0.32.0RC6
  • 0.32.1
  • 0.32.10
  • 0.32.10post1
  • 0.32.2
  • 0.32.3
120 results
Show changes
Commits on Source (21)
stages:
- github-sync
- build_and_test
- release
variables:
PYENV_PYTHON_VERSION: 3.5.5
image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.7
push_to_github:
stage: github-sync
variables:
GIT_STRATEGY: none
tags:
- github
script:
- rm -rf ./*
- rm -rf .git
- git clone --mirror $CI_REPOSITORY_URL .
- 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.'"
- mv packed-refs-new packed-refs
- 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
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/
releases:
<<: *env
stage: release
when: manual
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
......@@ -38,6 +38,7 @@ deploy:
file:
- sakia-${TRAVIS_OS_NAME}.deb
- sakia-${TRAVIS_OS_NAME}.zip
- sakia-${TRAVIS_TAG}-py3-none-any.whl
skip_cleanup: true
on:
tags: true
......
......@@ -3,11 +3,10 @@
![sakia logo](https://raw.github.com/duniter/sakia/master/sakia.png)
# Sakia
[![Coverage Status](https://coveralls.io/repos/duniter/sakia/badge.svg?branch=dev)](https://coveralls.io/r/duniter/sakia)
[![coverage report](https://git.duniter.org/clients/python/sakia/badges/gitlab/coverage.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![pipeline status](https://git.duniter.org/clients/python/sakia/badges/gitlab/pipeline.svg)](https://git.duniter.org/clients/python/sakia/commits/gitlab)
[![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)
[![Translation status](http://weblate.duniter.org/widgets/sakia/-/svg-badge.svg)](http://weblate.duniter.org/engage/sakia/?utm_source=widget)
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/3fff212226eb4027a586bc32e32d909b/badge.svg)](https://www.quantifiedcode.com/app/project/3fff212226eb4027a586bc32e32d909b)
========
......
......@@ -15,7 +15,7 @@
#error "Unable to find MyAppExe"
#endif
#define MyAppVerStr "0.32.10"
#define MyAppVerStr "0.32.10post1"
[Setup]
AppName={#MyAppName}
......
#!/usr/bin/env bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
cd $HOME/build/duniter/sakia
......
......@@ -2,10 +2,10 @@
if [ $TRAVIS_OS_NAME == "osx" ]
then
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/sakia.app/
elif [ $TRAVIS_OS_NAME == "linux" ]
then
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/
zip -r sakia-${TRAVIS_OS_NAME}.zip dist/sakia/
# Debian package
chmod 755 ci/travis/debian/DEBIAN/post*
......
......@@ -11,14 +11,12 @@ fi
if [ $TRAVIS_OS_NAME == "osx" ]
then
brew tap homebrew/versions
brew update
brew install libsodium
## Ensure your brew QT version is up to date. (brew install qt -> qt 4.8)
brew install qt5
brew list qt5
brew install pyenv-virtualenv
pyenv update
elif [ $TRAVIS_OS_NAME == "linux" ]
then
sudo apt-get update
......@@ -31,7 +29,7 @@ then
dbus-x11
wget https://download.qt.io/official_releases/qt/5.9/5.9.4/qt-opensource-linux-x64-5.9.4.run
chmod +x qt-opensource-linux-x64-5.9.4.run
./qt-opensource-linux-x64-5.9.4.run --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs
./qt-opensource-linux-x64-5.9.4.run -v --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs
wget http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsodium/libsodium18_1.0.13-1_amd64.deb
sudo dpkg -i libsodium18_1.0.13-1_amd64.deb
......@@ -48,6 +46,7 @@ fi
eval "$(pyenv init -)"
pyenv update
pyenv install --list
if [ $TRAVIS_OS_NAME == "osx" ]
then
......
......@@ -11,7 +11,8 @@ pip install --upgrade pip
pyenv rehash
pip install coveralls
pip install pytest-cov
pip install pyinstaller==3.2
pip install pyinstaller==3.3.1
pip install wheel
pip install -r requirements.txt
if [ $TRAVIS_OS_NAME == "linux" ]
then
......@@ -34,10 +35,11 @@ if [ $TRAVIS_OS_NAME == "osx" ]
then
pyinstaller sakia.spec
cp -rv dist/sakia/* dist/sakia.app/Contents/MacOS
cp -va dist/sakia/* dist/sakia.app/Contents/MacOS
cp -v res/osx/Info.plist dist/sakia.app/Contents/
rm -rfv dist/sakia
elif [ $TRAVIS_OS_NAME == "linux" ]
then
pyinstaller sakia.spec
rm -f dist/sakia/libdrm.so.2
python setup.py bdist_wheel
fi
Package: sakia
Version: 0.32.10
Version: 0.32.10post1
Section: misc
Priority: optional
Architecture: all
......
......@@ -26,9 +26,9 @@ Controller.prototype.TargetDirectoryPageCallback = function()
}
Controller.prototype.ComponentSelectionPageCallback = function() {
//var widget = gui.currentPageWidget();
var widget = gui.currentPageWidget();
//widget.selectAll();
widget.selectAll();
gui.clickButton(buttons.NextButton);
}
......
[Desktop Entry]
Version=0.32.10
Version=0.32.10post1
Name=Sakia
Comment=Duniter Qt Client
Exec=sakia
......
__version_info__ = ('0', '32', '10')
__version_info__ = ('0', '32', '10post1')
__version__ = '.'.join(__version_info__)
......@@ -3,8 +3,8 @@ import yaml
MAX_CONFIRMATIONS = 6
with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r') as stream:
with open(os.path.join(os.path.dirname(__file__), "root_servers.yml"), 'r', encoding="utf-8") as stream:
ROOT_SERVERS = yaml.load(stream)
with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r') as stream:
with open(os.path.join(os.path.dirname(__file__), "g1_licence.html"), 'r', encoding="utf-8") as stream:
G1_LICENCE = stream.read()
......@@ -113,10 +113,10 @@ class NodeConnector(QObject):
else:
raise
except (ClientError, gaierror, TimeoutError, ConnectionRefusedError, ValueError) as e:
self._logger.debug("{0}".format(str(e)))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
self.change_state_and_emit(Node.OFFLINE)
except jsonschema.ValidationError as e:
self._logger.debug(str(e))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
self.change_state_and_emit(Node.CORRUPTED)
except RuntimeError:
if self.session.closed:
......@@ -187,8 +187,7 @@ class NodeConnector(QObject):
self._logger.debug("{0} : {1}".format(str(e), self.node.pubkey[:5]))
self.change_state_and_emit(Node.OFFLINE)
except jsonschema.ValidationError as e:
self._logger.debug(str(e))
self._logger.debug("Validation error")
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
self.change_state_and_emit(Node.CORRUPTED)
except RuntimeError:
if self.session.closed:
......@@ -219,6 +218,9 @@ class NodeConnector(QObject):
else:
self.change_state_and_emit(Node.CORRUPTED)
self._logger.debug("Error in block reply : {0}".format(str(e)))
else:
if self.session.closed:
pass
else:
self._logger.debug("Could not connect to any BMA endpoint")
self.change_state_and_emit(Node.OFFLINE)
......@@ -257,6 +259,9 @@ class NodeConnector(QObject):
self._logger.debug("Changed block {0} -> {1}".format(self.node.current_buid.number,
block_data['number']))
self.changed.emit()
else:
if self.session.closed:
pass
else:
self._logger.debug("Could not connect to any BMA endpoint")
self.change_state_and_emit(Node.OFFLINE)
......@@ -282,6 +287,9 @@ class NodeConnector(QObject):
except errors.DuniterError as e:
self._logger.debug("Error in summary : {:}".format(str(e)))
self.change_state_and_emit(Node.OFFLINE)
else:
if self.session.closed:
pass
else:
self._logger.debug("Could not connect to any BMA endpoint")
self.change_state_and_emit(Node.OFFLINE)
......@@ -314,10 +322,10 @@ class NodeConnector(QObject):
.format(type(e).__name__, str(e)))
await self.request_peers()
except (ClientError, gaierror, TimeoutError) as e:
self._logger.debug("{0}".format(str(e)))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
self.change_state_and_emit(Node.OFFLINE)
except jsonschema.ValidationError as e:
self._logger.debug(str(e))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
self.change_state_and_emit(Node.CORRUPTED)
except RuntimeError:
if self.session.closed:
......@@ -359,7 +367,7 @@ class NodeConnector(QObject):
if e.ucode == 2012:
# Since with multinodes, peers or not the same on all nodes, sometimes this request results
# in peer not found error
self._logger.debug(str(e))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
else:
self.change_state_and_emit(Node.OFFLINE)
self._logger.debug("Incorrect peer data in {leaf} : {err}".format(leaf=leaf_hash, err=str(e)))
......@@ -370,6 +378,9 @@ class NodeConnector(QObject):
except errors.DuniterError as e:
self._logger.debug("Error in peers reply : {0}".format(str(e)))
self.change_state_and_emit(Node.OFFLINE)
else:
if self.session.closed:
pass
else:
self._logger.debug("Could not connect to any BMA endpoint")
self.change_state_and_emit(Node.OFFLINE)
......@@ -382,7 +393,7 @@ class NodeConnector(QObject):
peer_doc = Peer.from_signed_raw(str_doc)
self.neighbour_found.emit(peer_doc)
except MalformedDocumentError as e:
self._logger.debug(str(e))
self._logger.debug("{:}:{:}".format(str(e.__class__.__name__), str(e)))
else:
self._logger.debug("Incorrect leaf reply")
......
import locale
import asyncio
import logging
import signal
......@@ -18,6 +19,30 @@ from sakia.gui.preferences import PreferencesDialog
from sakia.gui.widgets import QAsyncMessageBox
def exit_exception_handler(loop, context):
"""
An exception handler which prints only on debug (used when exiting)
:param loop: the asyncio loop
:param context: the exception context
"""
logging.debug('Exception handler executing')
message = context.get('message')
if not message:
message = 'Unhandled exception in event loop'
try:
exception = context['exception']
except KeyError:
exc_info = False
else:
exc_info = (type(exception), exception, exception.__traceback__)
logging.debug("An unhandled exception occured : {0}".format(message),
exc_info=exc_info)
def async_exception_handler(loop, context):
"""
An exception handler which exits the program if the exception
......@@ -85,7 +110,7 @@ def main():
sys.excepthook = exception_handler
sakia.setStyle('Fusion')
#sakia.setStyle('Fusion')
loop = QSelectorEventLoop(sakia)
loop.set_exception_handler(async_exception_handler)
#loop.set_debug(True)
......@@ -131,7 +156,7 @@ def main():
window = MainWindowController.startup(app)
loop.run_forever()
try:
loop.set_exception_handler(None)
loop.set_exception_handler(exit_exception_handler)
loop.run_until_complete(app.stop_current_profile())
logging.debug("Application stopped")
except asyncio.CancelledError:
......
......@@ -5,6 +5,7 @@ import sqlite3
import mirage
import sys
import os
import locale
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')))
......@@ -20,7 +21,6 @@ from sakia.services import DocumentsService
_application_ = []
@pytest.yield_fixture
def event_loop():
qapplication = get_application()
......