Skip to content

Commit

Permalink
Merge pull request #37 from Muddyblack/31-new-project-structure
Browse files Browse the repository at this point in the history
31 new project structure
  • Loading branch information
Muddyblack authored Jan 12, 2024
2 parents 9386b21 + 7288d38 commit 5defccd
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
- name: Run pylint
run: |
pylint **/*.py
6 changes: 5 additions & 1 deletion .github/workflows/run_unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libimage-exiftool-perl
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)" >> $GITHUB_ENV
- name: Run tests
# GOAL: python -m unittest discover -s . -p 'test*.py' -> Problem not fiinding setup file
# ALSO bad with MetaDataEditor cant load Qt and exiftool: python -m unittest discover -s MetaDataEditor/unittests
run: |
python -m unittest discover unittests
python -m unittest discover -s file_manager/unittests
2 changes: 1 addition & 1 deletion MetaDataEditor/unittests/test_image_metadata_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUpClass(cls):
cls.file_format = "JPEG"

def setUp(self):
self.mock_open = patch("image_metadata_handler.Image.open").start()
self.mock_open = patch("PIL.Image.open").start()
self.mock_image = self.create_mock_image()
self.mock_open.return_value = self.mock_image

Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions drive_downloader.py → file_manager/drive_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


# pylint: disable=too-many-arguments
#pylint: disable=too-many-locals
def download_file(service, file_item, target_directory="./temp"):
"""Download an item from Google Drive. (file or entire folder)"""
file_name = file_item["name"]
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions show_file_checker.py → file_manager/show_file_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
This module checks if a file is supposed to be displayed at the current time.
It does this by checking the filename or metadata
"""
import os
import sys
import re
import logging
from datetime import datetime
from pathlib import Path

#pylint: disable=wrong-import-position
PARENT_DIRECTORY_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(PARENT_DIRECTORY_PATH)
from MetaDataEditor.image_metadata_handler import read_metadata

SUPPORTED_DATE_FORMATS = [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion images_slide_show.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trap cleanup EXIT
SCRIPT_PATH="$(realpath "$(dirname "$0")")"
CONFIG_FILE="$SCRIPT_PATH/app_config.json"
LOGO_PATH="$SCRIPT_PATH/LOGO.png"
UPDATE_CHECK_SCRIPT="$SCRIPT_PATH/drive_local_file_manager.py"
UPDATE_CHECK_SCRIPT="$SCRIPT_PATH/file_manager/drive_local_file_manager.py"
CURRENT_FILES_FILE="$SCRIPT_PATH/app_data/current_files.json"
BLACK_IMAGE_FILE="$SCRIPT_PATH/black.png"

Expand Down

0 comments on commit 5defccd

Please sign in to comment.