Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
APP_NAME=QR Code Generator
DEFAULT_OUTPUT_DIR=output

QR_BOX_SIZE=10
QR_BORDER=0
QR_FILL_COLOR=black
QR_BACK_COLOR=white
QR_TRANSPARENT_BACKGROUND=true

LOG_LEVEL=INFO
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

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

jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.11", "3.14"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Linux Qt runtime dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libegl1 \
libgl1 \
libxkbcommon-x11-0 \
libxcb-cursor0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-xfixes0 \
libxcb-xinerama0 \
xvfb

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Check formatting
run: python -m ruff format --check .

- name: Lint
run: python -m ruff check .

- name: Run tests on Linux
if: runner.os == 'Linux'
run: xvfb-run -a python -m pytest

- name: Run tests on Windows
if: runner.os == 'Windows'
run: python -m pytest
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.venv/
__pycache__/
*.pyc

.env
output/
dist/
build/
*.egg-info/

.DS_Store
Thumbs.db

.pytest_cache/
.ruff_cache/
44 changes: 44 additions & 0 deletions QRGenerator.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['src\\qrgenerator\\main.py'],
pathex=['src'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='QRGenerator',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='QRGenerator',
)
Loading
Loading