From 563f8853cef86a6c63555dd5b195618d1e4306ef Mon Sep 17 00:00:00 2001 From: helgeerbe Date: Wed, 10 Mar 2021 20:58:33 +0100 Subject: [PATCH 01/31] change setup.py to production --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 36ea32d..0af8f96 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ long_description=long_description, long_description_content_type='text/markdown', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3.7', 'Topic :: Multimedia :: Graphics :: Viewers', From fc652eea994f13021f966ba5c06d0768be2885d7 Mon Sep 17 00:00:00 2001 From: Jeff Godfrey Date: Sun, 2 May 2021 13:27:07 -0500 Subject: [PATCH 02/31] Initial fix for issue #110 (image_cache bug) Fix ever-incrementing folder id, which causes the all_data view to be incorrect. See issue #110 for details. https://github.com/helgeerbe/picframe/issues/110#issuecomment-830844230 --- picframe/image_cache.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/picframe/image_cache.py b/picframe/image_cache.py index 6a87fee..0b581d8 100644 --- a/picframe/image_cache.py +++ b/picframe/image_cache.py @@ -331,7 +331,10 @@ def __get_modified_files(self, modified_folders): def __insert_file(self, file): file_insert = "INSERT OR REPLACE INTO file(folder_id, basename, extension, last_modified) VALUES((SELECT folder_id from folder where name = ?), ?, ?, ?)" - folder_insert = "INSERT OR REPLACE INTO folder(name, missing) VALUES(?, 0)" + # Insert the new folder if it's not already in the table. Update the missing field separately. + folder_insert = "INSERT INTO folder(name) SELECT ? WHERE NOT EXISTS(SELECT 1 FROM folder WHERE name = ?)" + folder_update = "UPDATE folder SET missing = 0 where name = ?" + mod_tm = os.path.getmtime(file) dir, file_only = os.path.split(file) base, extension = os.path.splitext(file_only) @@ -343,7 +346,8 @@ def __insert_file(self, file): vals.insert(0, file) # Insert this file's info into the folder, file, and meta tables - self.__db.execute(folder_insert, (dir,)) + self.__db.execute(folder_insert, (dir,dir)) + self.__db.execute(folder_update, (dir,)) self.__db.execute(file_insert, (dir, base, extension.lstrip("."), mod_tm)) self.__db.execute(meta_insert, vals) From 0b08dfbb3db1e36aefdc7643a869b2d2ea580cfd Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 3 May 2021 11:12:32 +0200 Subject: [PATCH 03/31] Revert "Merge pull request #111 from helgeerbe/Issue-110" This reverts commit 882082ae3364e754f9c4439089d2a2ae7441d187, reversing changes made to 19eb16225ec1316a439619eb9402835c44d45fbc. --- picframe/image_cache.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/picframe/image_cache.py b/picframe/image_cache.py index 0b581d8..6a87fee 100644 --- a/picframe/image_cache.py +++ b/picframe/image_cache.py @@ -331,10 +331,7 @@ def __get_modified_files(self, modified_folders): def __insert_file(self, file): file_insert = "INSERT OR REPLACE INTO file(folder_id, basename, extension, last_modified) VALUES((SELECT folder_id from folder where name = ?), ?, ?, ?)" - # Insert the new folder if it's not already in the table. Update the missing field separately. - folder_insert = "INSERT INTO folder(name) SELECT ? WHERE NOT EXISTS(SELECT 1 FROM folder WHERE name = ?)" - folder_update = "UPDATE folder SET missing = 0 where name = ?" - + folder_insert = "INSERT OR REPLACE INTO folder(name, missing) VALUES(?, 0)" mod_tm = os.path.getmtime(file) dir, file_only = os.path.split(file) base, extension = os.path.splitext(file_only) @@ -346,8 +343,7 @@ def __insert_file(self, file): vals.insert(0, file) # Insert this file's info into the folder, file, and meta tables - self.__db.execute(folder_insert, (dir,dir)) - self.__db.execute(folder_update, (dir,)) + self.__db.execute(folder_insert, (dir,)) self.__db.execute(file_insert, (dir, base, extension.lstrip("."), mod_tm)) self.__db.execute(meta_insert, vals) From 62db18f3d497f9945a62d4ea6168043c77c9a6b3 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:06:01 +0200 Subject: [PATCH 04/31] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e2f91bd..056bed2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## PictureFrame powered by pi3d +[[https://github.com/helgeerbe/picframe/wiki/images/Picframe_Logo.png | picframe logo]] + - [PictureFrame powered by pi3d](#pictureframe-powered-by-pi3d) - [What Is PictureFrame?](#what-is-pictureframe) - [History of PictureFrame](#history-of-pictureframe) From 9be6d56a8cd544ccd8fa10bdef35e3e7bcb431ef Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:08:57 +0200 Subject: [PATCH 05/31] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 056bed2..1a79d62 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## PictureFrame powered by pi3d -[[https://github.com/helgeerbe/picframe/wiki/images/Picframe_Logo.png | picframe logo]] +![picframe logo](https://github.com/helgeerbe/picframe/wiki/images/Picframe_Logo.png) - [PictureFrame powered by pi3d](#pictureframe-powered-by-pi3d) - [What Is PictureFrame?](#what-is-pictureframe) From d76ab05da37f47e655427b2ba45387b0a78ba0d8 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Sun, 6 Jun 2021 19:14:05 +0200 Subject: [PATCH 06/31] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a79d62..9c7b34f 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ When I started 2019 my DIY project building a raspberry powered digital picture - date - Remote Control - control interface for mqtt, http(s) - - tun on/of display + - turn on/off display - next/prev/pause image - shuffle play - toggle overlays From 07bbaafa5bd1255aa05ff71540857e1f82632969 Mon Sep 17 00:00:00 2001 From: Jeff Godfrey Date: Thu, 26 Aug 2021 09:24:34 -0500 Subject: [PATCH 07/31] Update README.md - Mention clock overlay - Mention portrait pairing --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c7b34f..d5dac98 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,9 @@ When I started 2019 my DIY project building a raspberry powered digital picture - Viewer - blend effects - auto mat generation - - overlays (title, location, date, ...) + - photo metadata overlays (title, location, date, ...) + - live clock + - automatic pairing of portrait images - Filter by - IPTC tags - location @@ -39,7 +41,8 @@ When I started 2019 my DIY project building a raspberry powered digital picture - turn on/off display - next/prev/pause image - shuffle play - - toggle overlays + - toggle metadata overlays + - toggle clock visibility - retrieve image meta info (exif, IPTC) ## Documentation From 941aa8f413c880909c0c67b5be800899a78b2707 Mon Sep 17 00:00:00 2001 From: helgeerbe Date: Thu, 20 Jan 2022 14:02:50 +0100 Subject: [PATCH 08/31] Update Readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d5dac98..a6b93c4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ ## PictureFrame powered by pi3d -![picframe logo](https://github.com/helgeerbe/picframe/wiki/images/Picframe_Logo.png) - - [PictureFrame powered by pi3d](#pictureframe-powered-by-pi3d) - [What Is PictureFrame?](#what-is-pictureframe) - [History of PictureFrame](#history-of-pictureframe) @@ -31,6 +29,7 @@ When I started 2019 my DIY project building a raspberry powered digital picture - photo metadata overlays (title, location, date, ...) - live clock - automatic pairing of portrait images + - keyboard, mouse and touch screen support - Filter by - IPTC tags - location @@ -38,7 +37,7 @@ When I started 2019 my DIY project building a raspberry powered digital picture - date - Remote Control - control interface for mqtt, http(s) - - turn on/off display + - tun on/of display - next/prev/pause image - shuffle play - toggle metadata overlays @@ -56,6 +55,8 @@ To find out what's new or improved have a look at the [changelog](https://github ## Acknowledgement +[glenvorel](https://github.com/glenvorel) Thanks for the new keyboard, mouse and touch screen support. + Many Thanks to Wolfgang [www.thedigitalpictureframe.com](https://www.thedigitalpictureframe.com/) for your inspiring work. A special Thank to Paddy Gaunt one of the authors of the [pi3d](https://github.com/pi3d/pi3d_demos) project. You are doing a great job! From 13da66424c3e58a061db1b4e04293659620750d9 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Wed, 26 Jan 2022 10:24:26 +0100 Subject: [PATCH 09/31] Update issue templates --- .github/ISSUE_TEMPLATE/issue-report.md | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue-report.md diff --git a/.github/ISSUE_TEMPLATE/issue-report.md b/.github/ISSUE_TEMPLATE/issue-report.md new file mode 100644 index 0000000..0e0df20 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-report.md @@ -0,0 +1,72 @@ +--- +name: Issue report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + + + + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**What are your OS, Python and picframe versions(please complete the following information):?** + +- Hardware: +- OS: +- Python: +- picframe (run `picframe -v` if possible): + + + +```yaml +configuration.yaml goes here +``` + +````txt +log output goes here +```` + +**Additional context** +Add any other context about the problem here. From 9707f402eb160b443cad2c98562c8f9bc2a725bf Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Thu, 24 Nov 2022 17:51:12 +0100 Subject: [PATCH 10/31] Update python-publish.yml Use nodes 16 --- .github/workflows/python-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4e1ef42..0c36fed 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -13,9 +13,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies From f6550cc978d4d201bb817e1511b483d904c33432 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 13:50:54 +0100 Subject: [PATCH 11/31] Create python-package-conda.yml --- .github/workflows/python-package-conda.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-package-conda.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml new file mode 100644 index 0000000..57940bd --- /dev/null +++ b/.github/workflows/python-package-conda.yml @@ -0,0 +1,34 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: 3.10 + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + # 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: | + conda install pytest + pytest From e1591dd543f106696880a68460c77b920e9389f2 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 13:53:31 +0100 Subject: [PATCH 12/31] Create python-publish_token.yml --- .github/workflows/python-publish_token.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-publish_token.yml diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml new file mode 100644 index 0000000..6555e23 --- /dev/null +++ b/.github/workflows/python-publish_token.yml @@ -0,0 +1,39 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} From c86eafec50bca3993579e733a9a2e35d1eabd7d7 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:01:53 +0100 Subject: [PATCH 13/31] Update python-publish.yml --- .github/workflows/python-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 0c36fed..05ab54e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -6,6 +6,7 @@ name: Upload Python Package on: release: types: [created] + workflow_dispatch: jobs: deploy: From ec7f24db7f7af4cc043b7b32e67bc8f55a680254 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:05:34 +0100 Subject: [PATCH 14/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index 6555e23..9ff57ba 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -6,11 +6,12 @@ # separate terms of service, privacy policy, and support # documentation. -name: Upload Python Package +name: Upload Python Package with token on: release: types: [published] + workflow_dispatch: permissions: contents: read From a789c11da8095f6c7bd4d2be186d51a01145b835 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:18:27 +0100 Subject: [PATCH 15/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index 9ff57ba..4e610ac 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -23,6 +23,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v3 with: From 5ea60ac72032e2556e87b102b5e7b5836d849d14 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:31:37 +0100 Subject: [PATCH 16/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index 4e610ac..260d4db 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -32,11 +32,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + pip install versioneer build - name: Build package run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} +# - name: Publish package +# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 +# with: +# user: __token__ +# password: ${{ secrets.PYPI_TOKEN }} From e3ad3b4abcce848662b345b30e00560be4092077 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:35:29 +0100 Subject: [PATCH 17/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index 260d4db..fb79830 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -32,9 +32,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install versioneer build + pip install build - name: Build package - run: python -m build + run: | + python -m pip install versioneer + python -m build # - name: Publish package # uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 # with: From fc087d8e992f7551bb5293002379e61f5bf9deb5 Mon Sep 17 00:00:00 2001 From: helgeerbe Date: Thu, 15 Dec 2022 15:30:57 +0100 Subject: [PATCH 18/31] add action: publish to pypi on release --- .github/workflows/python-package-conda.yml | 34 ---------------------- .github/workflows/python-publish.yml | 32 -------------------- .github/workflows/python-publish_token.yml | 11 ++++--- 3 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/python-package-conda.yml delete mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml deleted file mode 100644 index 57940bd..0000000 --- a/.github/workflows/python-package-conda.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Python Package using Conda - -on: [push] - -jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: 3.10 - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda env update --file environment.yml --name base - - name: Lint with flake8 - run: | - conda install flake8 - # 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: | - conda install pytest - pytest diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index 05ab54e..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: Upload Python Package - -on: - release: - types: [created] - workflow_dispatch: - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index fb79830..6dd8bab 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -35,10 +35,9 @@ jobs: pip install build - name: Build package run: | - python -m pip install versioneer python -m build -# - name: Publish package -# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 -# with: -# user: __token__ -# password: ${{ secrets.PYPI_TOKEN }} + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} From 9a4324883448e6e1424a4323f543aa1da7148038 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Thu, 15 Dec 2022 15:49:09 +0100 Subject: [PATCH 19/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index 6dd8bab..e981ee2 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -37,7 +37,10 @@ jobs: run: | python -m build - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + twine upload dist/* + + From ab427f56a2d919ea705f4840e68a39cab1f3df6e Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Thu, 15 Dec 2022 15:52:04 +0100 Subject: [PATCH 20/31] Update python-publish_token.yml --- .github/workflows/python-publish_token.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-publish_token.yml b/.github/workflows/python-publish_token.yml index e981ee2..91e62e3 100644 --- a/.github/workflows/python-publish_token.yml +++ b/.github/workflows/python-publish_token.yml @@ -32,7 +32,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + pip install build twine - name: Build package run: | python -m build From 2829e847270ddafec0db5812a087e03399a6c9e2 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 13:31:12 +0100 Subject: [PATCH 21/31] Create python-package-conda.yml --- .github/workflows/python-package-conda.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-package-conda.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml new file mode 100644 index 0000000..57940bd --- /dev/null +++ b/.github/workflows/python-package-conda.yml @@ -0,0 +1,34 @@ +name: Python Package using Conda + +on: [push] + +jobs: + build-linux: + runs-on: ubuntu-latest + strategy: + max-parallel: 5 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: 3.10 + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Install dependencies + run: | + conda env update --file environment.yml --name base + - name: Lint with flake8 + run: | + conda install flake8 + # 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: | + conda install pytest + pytest From 2c1b8778a5749c21ad61d85a965e8b0fae38bc16 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 13:38:44 +0100 Subject: [PATCH 22/31] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 57940bd..a5b5287 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,10 +10,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.10 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: 3.10 + python-version: 3.9 - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory From e539448e251e2c870c326eb57c4ffdd92b6d3b8d Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 13:41:43 +0100 Subject: [PATCH 23/31] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index a5b5287..b20f3e9 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,10 +10,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: 3.9 + python-version: "3.10" - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory From 1ce8918b3ebb1b2937a1a6589aafc1c55e18f135 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 13:57:14 +0100 Subject: [PATCH 24/31] Delete python-package-conda.yml --- .github/workflows/python-package-conda.yml | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflows/python-package-conda.yml diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml deleted file mode 100644 index b20f3e9..0000000 --- a/.github/workflows/python-package-conda.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Python Package using Conda - -on: [push] - -jobs: - build-linux: - runs-on: ubuntu-latest - strategy: - max-parallel: 5 - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies - run: | - conda env update --file environment.yml --name base - - name: Lint with flake8 - run: | - conda install flake8 - # 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: | - conda install pytest - pytest From 376fe1abfde410fcc9baf1e3befaa03eba77f900 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 13:58:40 +0100 Subject: [PATCH 25/31] Create test.yml --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fe7a391 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - 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 From 25d3b480c913e31b73722962d3cf9aa03d860c7e Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:06:24 +0100 Subject: [PATCH 26/31] Update test.yml --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe7a391..76c360b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,12 +21,12 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | + #- 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 + # 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 + # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest From a02bb642384e483e1bf35b4013dc4fd589ae8fcd Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:10:33 +0100 Subject: [PATCH 27/31] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76c360b..99cc17e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Python package +name: flake8 & pytest on: [push] From c5294e21dfb002ed3b760fbcea6ed254b6b47265 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:14:25 +0100 Subject: [PATCH 28/31] Update test.yml --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99cc17e..f83fc84 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,8 @@ name: flake8 & pytest -on: [push] +on: + [push] + workflow_dispatch: jobs: build: From 60237a44e520d2426740df1c888814694dc7d357 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Fri, 16 Dec 2022 14:16:20 +0100 Subject: [PATCH 29/31] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f83fc84..27b4b13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: flake8 & pytest on: - [push] + #[push] workflow_dispatch: jobs: From dab5ecf787c34212c6e06af293cfbf9faa7f2668 Mon Sep 17 00:00:00 2001 From: helgeerbe <59169507+helgeerbe@users.noreply.github.com> Date: Thu, 22 Dec 2022 22:51:53 +0100 Subject: [PATCH 30/31] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 88fac55..602624f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![picframe logo](https://github.com/helgeerbe/picframe/wiki/images/Picframe_Logo.png) +- [![PyPI version](https://badge.fury.io/py/picframe.svg)](https://badge.fury.io/py/picframe) - [PictureFrame powered by pi3d](#pictureframe-powered-by-pi3d) - [What Is PictureFrame?](#what-is-pictureframe) - [History of PictureFrame](#history-of-pictureframe) From f4f034e2a37b4f5f880823ab5abb3004af126626 Mon Sep 17 00:00:00 2001 From: Jeff Godfrey Date: Thu, 8 Feb 2024 19:41:23 -0600 Subject: [PATCH 31/31] Fix ISO value handling - https://github.com/helgeerbe/picframe/issues/370 was caused by an ISO value being returned as a tuple (50,50). Check if we have a tuple and, if so, take only the first element. --- src/picframe/get_image_meta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/picframe/get_image_meta.py b/src/picframe/get_image_meta.py index 8685b8c..fe614c0 100644 --- a/src/picframe/get_image_meta.py +++ b/src/picframe/get_image_meta.py @@ -192,6 +192,9 @@ def get_exif(self, key): for iso in iso_keys: val = self.__get_if_exist(iso) if val: + # If ISO is returned as a tuple, take the first element + if type(val) is tuple: + val = val[0] break else: val = self.__get_if_exist(key)