Skip to content

Commit

Permalink
Merge pull request #1 from andreasgriffin/dev
Browse files Browse the repository at this point in the history
Code quality improvements and bug fixes
    improved translation management
    fixed update bug
    improved search UI popup
    locked build script version
    upgraded nostr_sdk
    added UI pytests
    pytests work now on windows
  • Loading branch information
andreasgriffin authored May 16, 2024
2 parents e5f14e9 + a11effc commit 1f95ac8
Show file tree
Hide file tree
Showing 48 changed files with 10,004 additions and 9,055 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Python Tests with PyQt6

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
python-version: ['3.10']
os: [ ubuntu-latest ] # [macos-latest, ubuntu-latest, windows-latest]
env:
DISPLAY: ":99.0" # Display setting for Xvfb on Linux
QT_SELECT: "qt6" # Environment variable to select Qt6

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xinput0 \
libxcb-xfixes0 \
libxcb-shape0 \
libglib2.0-0 \
libgl1-mesa-dev \
'^libxcb.*-dev' \
libx11-xcb-dev \
libglu1-mesa-dev \
libxrender-dev \
libxi-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Start Xvfb
if: runner.os == 'Linux'
run: |
export DISPLAY=:99.0
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset
sleep 3
sleep 1
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run tests
run: |
poetry run pytest -vvv --log-cli-level=DEBUG --setup-show --maxfail=1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
hooks:
- id: check-header
name: Check Python File Headers
entry: python tools/check_header.py
entry: poetry run python tools/check_header.py
language: system
types: [python]
files: '\.py$'
Expand Down
2 changes: 1 addition & 1 deletion bitcoin_safe/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.1a0"
__version__ = "0.6.2a0"
7 changes: 7 additions & 0 deletions bitcoin_safe/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ def __init__(self):
}
self.language_code = None

def add_recently_open_wallet(self, file_path: str):
# ensure that the newest open file moves to the top of the queue, but isn't added multiple times
recent_wallets = self.recently_open_wallets[self.network]
if file_path in recent_wallets:
recent_wallets.remove(file_path)
recent_wallets.append(file_path)

@property
def network_config(self) -> NetworkConfig:
return self.network_configs.configs[self.network.name]
Expand Down
1 change: 1 addition & 0 deletions bitcoin_safe/fx.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def __init__(self, signals_min: SignalsMin) -> None:

self.rates: Dict[str, Dict] = {}
self.update()
logger.debug(f"initialized {self}")

def update(self):
def on_success(data):
Expand Down
Binary file modified bitcoin_safe/gui/locales/app_ar_AE.qm
Binary file not shown.
Loading

0 comments on commit 1f95ac8

Please sign in to comment.