Skip to content
Snippets Groups Projects
Commit 939d1b99 authored by inso's avatar inso
Browse files

Merge branch 'dev'

parents 7758f63e f6a3986d
Branches
Tags
No related merge requests found
Showing
with 251 additions and 238 deletions
......@@ -46,3 +46,4 @@ res/i18n/lang-*
out
.directory
temp
*_uic.py
\ No newline at end of file
......@@ -38,9 +38,6 @@ install:
- "%CMD_IN_ENV% conda config --add channels inso/channel/sakia"
- "%CMD_IN_ENV% conda create -q -n test-environment python=%PYTHON_VERSION% libsodium=1.0.3 setuptools=19.2"
cache:
- C:\Qt\5.6\5.6
build_script:
- ".\\ci\\appveyor\\build.cmd"
......
......@@ -5,13 +5,12 @@ call activate test-environment
echo "%PATH%"
echo "%QT_PLUGIN_PATH%"
python -V
call pyuic5 --version
pyrcc5 -version
lrelease -version
pip install PyQt5
call pyuic5 --version
pyrcc5 -version
pip install -r requirements.txt
pip install pyinstaller
pip install six
......
......@@ -11,8 +11,7 @@ pyrcc5 -version
lrelease -version
echo "%CWD%"
python setup.py test
echo "%cd%"
py.test tests/
if %errorlevel% neq 0 exit /b 1
\ No newline at end of file
......@@ -16,20 +16,21 @@ then
brew install libsodium
## Ensure your brew QT version is up to date. (brew install qt -> qt 4.8)
brew install qt5
brew link --force qt5
brew install pyenv-virtualenv
pyenv update
pip install PyQt5
elif [ $TRAVIS_OS_NAME == "linux" ]
then
sudo apt-get update
sudo apt-get install -qq -y libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 \
libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev \
libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 \
libxcb-render-util0-dev libxcb-glx0-dev libgl1-mesa-dri libegl1-mesa libpcre3-dev \
curl libdbus-1-dev libdbus-glib-1-dev autoconf automake libtool libgstreamer-plugins-base0.10-0
wget https://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
chmod +x qt-opensource-linux-x64-5.7.0.run
./qt-opensource-linux-x64-5.7.0.run --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs
libxcb-render-util0-dev libxcb-glx0-dev libgl1-mesa-dri libegl1-mesa libpcre3 libgles2-mesa-dev \
freeglut3-dev libfreetype6-dev xorg-dev xserver-xorg-input-void xserver-xorg-video-dummy xpra libosmesa6-dev \
curl libdbus-1-dev libdbus-glib-1-dev autoconf automake libtool libgstreamer-plugins-base0.10-0 dunst
wget https://download.qt.io/official_releases/qt/5.7/5.7.1/qt-opensource-linux-x64-5.7.1.run
chmod +x qt-opensource-linux-x64-5.7.1.run
./qt-opensource-linux-x64-5.7.1.run --script $HOME/build/duniter/sakia/ci/travis/qt-installer-noninteractive.qs
wget http://archive.ubuntu.com/ubuntu/pool/universe/libs/libsodium/libsodium13_1.0.1-1_amd64.deb
sudo dpkg -i libsodium13_1.0.1-1_amd64.deb
......@@ -54,7 +55,4 @@ fi
pyenv shell $PYENV_PYTHON_VERSION
pip install PyQt5
make -j 2 && make install
pyenv rehash
cd $HOME
......@@ -8,7 +8,9 @@ pyenv shell $PYENV_PYTHON_VERSION
pip install --upgrade pip
pyenv rehash
pip install coveralls
pip install pytest-cov
pip install pyinstaller
pip install PyQt5
pip install -r requirements.txt
if [ $TRAVIS_OS_NAME == "linux" ]
then
......
......@@ -7,3 +7,4 @@ Icon=/opt/sakia/sakia.png
Terminal=false
Type=Application
Categories=Utility;Application;
MimeType=x-scheme-handler/duniter
......@@ -6,7 +6,7 @@ if [ $TRAVIS_OS_NAME == "linux" ]
then
export XVFBARGS="-screen 0 1280x1024x24"
export DISPLAY=:99.0
sudo sh -e /etc/init.d/xvfb restart
sh -e /etc/init.d/xvfb start
sleep 3
fi
......@@ -14,9 +14,9 @@ cd $HOME/build/duniter/sakia
pyenv shell $PYENV_PYTHON_VERSION
if [ $TRAVIS_OS_NAME == "linux" ]
then
coverage run --source=sakia.core,sakia.gui,sakia.models setup.py test
py.test --cov=sakia tests/
else
python setup.py test
py.test
fi
doc/uml/api.png

13 KiB

@startuml
package api {
package api.bma {
class BMADataAccess {
{static} _cache
{static} _request(req : Request, network)
{static} _post(req : Request, network)
{static} _broadcast(req : Request, network)
}
BMADataAccess ..> api.bma.API
}
package api.es {
class ESDataAccess {
}
ESDataAccess ..> api.es.API
}
}
@enduml
\ No newline at end of file
doc/uml/backend.png

184 KiB

@startuml
!include data.pu
!include processors.pu
!include services.pu
ProfileService "1" --> "1" UserParameters
ProfileService "*" --> "1" UserParametersRepo
AccountService "1" --> "1" Key
AccountService "*" --> "1" KeyRepo
TransactionsService "1" --> "*" Transaction
TransactionsService "*" --> "1" TransactionProcessor
TransactionProcessor "1" --> "1" TransactionRepo
RegistryService "1" --> "*" Identity
RegistryService "1" --> "*" Certification
RegistryService "*" --> "1" IdentitiesProcessor
IdentitiesProcessor "1" --> "1" IdentitiesRepo
RegistryService "*" --> "1" CertificationProcessor
CertificationProcessor "1" --> "1" CertificationRepo
NetworkService "1" --> "*" Node
NetworkService "*" --> "1" NodesProcessor
NodesProcessor "1" --> "1" NodesRepo
BlockchainService "1" --> "1" Blockchain
BlockchainService "1" --> "1" Community
BlockchainService "*" --> "1" BlockchainProcessor
BlockchainProcessor "1" --> "1" BlockchainRepo
BlockchainService "*" --> "1" CommunityProcessor
CommunityProcessor "1" --> "1" CommunityRepo
package Connectors {
class BMAConnector << (S,cyan) >> {
get()
post()
broadcast()
}
}
AccountService --> BMAConnector
BlockchainProcessor --> BMAConnector
CommunityProcessor --> BMAConnector
TransactionProcessor --> BMAConnector
IdentitiesProcessor --> BMAConnector
CertificationProcessor --> BMAConnector
@enduml
\ No newline at end of file
doc/uml/core-classes.png

23.5 KiB

@startuml
hide fields
hide methods
package core {
class App {
-- Signals --
current_account_changed(str : account_name)
data_changed()
-- Slots --
-- Properties --
current_account
accounts
-- Methods --
}
App --* Account : accounts
class Account {
-- Signals --
wallets_changed(int : nb_wallets)
community_added(int : index)
community_removed(int : index)
data_changed()
-- Slots --
-- Properties --
communities
wallets
-- Methods --
}
Account "1" --* "*" Wallet
Account "1" --* "*" Community
class Wallet {
-- Signals --
money_received(Transfer)
money_sent(Transfer)
name_changed(str : new_name
data_changed()
-- Slots --
-- Properties --
transfers
-- Methods --
}
Wallet "1" --* "*" Transfer
class Transfer {
-- Signals --
state_changed(int : new_state)
-- Slots --
-- Properties --
-- Methods --
}
class Community {
-- Signals --
members_changed()
data_changed()
-- Slots --
-- Properties --
network
-- Methods --
}
App --> Identity
class Identity {
{static} _identities
{static} load(data : dict)
{static} lookup(search : str)
}
}
package net {
class Network {
-- Signals --
node_found(int : index)
node_removed(int : index)
block_found(int : block_number)
-- Slots --
-- Properties --
nodes
root_nodes
-- Methods --
}
Community "1" --* "1" Network
Network "1" --* "*" Node
class Node {
-- Signals --
changed()
-- Slots --
-- Properties --
endpoints
pubkey
uid
block
state
-- Methods --
}
Network "1" --* "1" BmaAccess
class BmaAccess {
}
}
@enduml
doc/uml/cutecoin.png

131 KiB

@startuml
!include core-classes.pu
!include gui-classes.pu
!include models-classes.pu
!include api.pu
MainWindow "1" --> "1" App
CertificationDialog --> Community
TransferDialog --> Community
CurrencyTab "1" --> "1" Community
CommunityTab -right-> IdentitiesFilterProxyModel
NetworkTab -right-> NetworkFilterProxyModel
WalletTab -right-> WalletsFilterProxyModel
WalletsFilterProxyModel -up-> Wallet
NetworkFilterProxyModel -up-> Network
TxHistoryFilterProxyModel -up-> Transfer
ConfigureAccountDialog --> CommunitiesListModel
ConfigureCommunityDialog --> RootNodesTableModel
ConfigureAccountDialog --> Account
ConfigureCommunityDialog --> Community
Account ..> BMADataAccess
Community ..> BMADataAccess
Wallet ..> BMADataAccess
Transfer ..> BMADataAccess
Identity ..> BMADataAccess
BMADataAccess .left.> Network
@enduml
\ No newline at end of file
doc/uml/data.png

57.6 KiB

@startuml
class Identity << (D,orchid) >> {
currency: str (FK)
uid: str
pubkey: str (PK)
blockstamp: BlockUID
timestamp: int
signature: str
written_on: BlockUID
revoked_on: BlockUID
member: bool
membership_buid: BlockUID
membership_timestamp: int
membership_type: str
membership_written_on: BlockUID
}
class Certification << (D,orchid) >> {
currency: str (PK)
certifier: str (PK)
certified: str (PK)
blockstamp: BlockUID (PK)
timestamp: int
signature: str
written_on: BlockUID
}
class Transaction << (D,orchid) >> {
currency: str (FK)
blockstamp: str
locktime: int
issuer: str
recipient: str
amount: int
comment: str
sha_hash: str (PK)
}
class Community << (D,orchid) >> {
profile: str (FK)
pubkey: str (FK)
currency: str (PK)
c: float
dt: int
ud0: int
sig_period: int
sig_stock: int
sig_window: int
sig_validity: int
sig_qty: int
xpercent: float
ms_validity: int
step_max: int
median_time_blocks: int
avg_gen_time: int
dt_diff_eval: int
blocks_rot: int
percent_rot: float
}
class Blockchain << (D,orchid) >> {
currency: str (PK)
current_buid: BlockUID
nb_members: int
current_mass: int
median_time: int
last_ud: int
last_ud_base: int
previous_mass: int
}
class Node << (D,orchid) >> {
currency: str (FK)
endpoints: str
uid: str
pubkey: str (PK)
current_buid: BlockUID
previous_buid: BlockUID
state: int
software: str
version: str
merkle_nodes: dict
}
class Key << (D,orchid) >> {
pubkey: str (PK)
salt: str
}
class UserParameters << (D,orchid) >> {
profile: str (PK)
lang: str
ref: 0
expert_mode: bool,
digits_after_comma: int
maximized: bool
notifications: bool
enable_proxy: bool
proxy_type: int
proxy_address: str
proxy_port: 8080: int
international_system_of_units: bool
auto_refresh: bool
forgetfulness: bool
}
class UserParametersRepo << (R,orange) >> {
Create()
Update()
Save()
Drop()
}
class KeyRepo << (R,orange) >> {
Create()
Update()
Save()
Drop()
}
class NodesRepo << (R,orange) >> {
Create()
Update()
Save()
Drop()
}
class BlockchainRepo << (R,orange) >> {
Create()
Update()
Save()
Drop()
}
class CommunityRepo << (R,orange) >> {
Commit()
Update()
Save()
Drop()
}
class TransactionRepo << (R,orange) >> {
Commit()
Update()
Save()
Drop()
}
class CertificationRepo << (R,orange) >> {
Commit()
Update()
Save()
Drop()
}
class IdentitiesRepo << (R,orange) >> {
Commit()
Update()
Save()
Drop()
}
IdentitiesRepo "1" --* "*" Identity
CertificationRepo "1" --* "*" Certification
TransactionRepo "1" --* "*" Transaction
CommunityRepo "1" --* "*" Community
BlockchainRepo "1" --* "*" Blockchain
NodesRepo "1" --* "*" Node
KeyRepo "1" --* "*" Key
UserParametersRepo "1" --* "*" UserParameters
@enduml
\ No newline at end of file
doc/uml/gui-classes.png

31 KiB

@startuml
package gui {
class MainWindow {
}
MainWindow "1" --* "1" CommunityView
class CommunityView {
}
CommunityView "1" --* "1" WalletTab
CommunityView "1" -down-* "1" InformationsTab
CommunityView "1" --* "1" TransactionsTab
CommunityView "1" --* "1" IdentitiesTab
CommunityView "1" --* "1" WotTab
CommunityView "1" -down-* "1" NetworkTab
class WalletTab {
}
class InformationsTab {
}
class TransactionsTab {
}
class NetworkTab {
}
class IdentitiesTab {
}
class WotTab {
}
package dialogs {
class CertificationDialog
class TransferDialog
class ContactDialog
class ConfigureAccountDialog
class ConfigureCommunityDialog
}
MainWindow --> CertificationDialog
MainWindow --> TransferDialog
MainWindow --> ContactDialog
MainWindow --> ConfigureAccountDialog
ConfigureAccountDialog --> ConfigureCommunityDialog
}
@enduml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment