Skip to content

Commit

Permalink
Merge pull request #11 from f1shl/f1shl-patch-2
Browse files Browse the repository at this point in the history
F1shl patch 2
  • Loading branch information
f1shl authored Jul 25, 2024
2 parents a5eaaa6 + 118e688 commit 6f4d5e9
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 13 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,45 @@ permissions:
jobs:
build:

runs-on: macos-latest

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'macos-latest']

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
submodules: 'true'
- name: Install dependencies and build script
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Build Mac OS
if: matrix.os == 'macos-latest'
run: |
bash build_executable_mac.sh
# Now flag the created file as unix executable
chmod +x "dist/Nami Beitragsrechner"
- uses: actions/upload-artifact@v3
with:
name: "nami-beitragsrechner-mac"
path: dist/*
- name: Build Windows OS
if: matrix.os == 'windows-latest'
shell: powershell
run: |
./build_executable_win.ps1
- uses: actions/upload-artifact@v3
with:
name: "nami-beitragsrechner-win"
path: dist/*
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ marshmallow
pdfplumber
sv_ttk
tkcalendar

future
Pygments
docutils
Expand All @@ -19,3 +18,5 @@ pycparser
setuptools
sepaxml
./pynami

pyinstaller
7 changes: 6 additions & 1 deletion src/accounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ def process(self):
# Loop through all members
for r in result:
row = []
member = r.get_mitglied(self._nami.get_nami_interface())
try:
member = r.get_mitglied(self._nami.get_nami_interface())
except exceptions.ValidationError as e:
tools.print_error('Fehler beim Laden von Mitglied ' + e.data.get('vorname') + ' ' + e.data.get('nachname') + ': ' + e.messages)
continue

combined_name = member.vorname + ' ' + member.nachname
member.correct_eintrittsdatum = member.eintrittsdatum

Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, parent):
self._parent.bind('<Control-s>', self.save)

# Read Config
self._config = Config('config.ini')
self._config = Config('../config.ini')

# Read some stuff from the theme (colors and font)
self._color_foreground = '#fafafa'
Expand Down

0 comments on commit 6f4d5e9

Please sign in to comment.