From 0525fcfc6ba0f5c94aa19e420ef99179104b78d3 Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Sun, 16 Jul 2023 14:08:29 -0700 Subject: [PATCH] fix 1.15.1 release (#666) --- .github/workflows/create-release.yml | 2 +- CHANGELOG.md | 5 +++++ CONTRIBUTING.md | 6 +++--- EXPERIMENTAL.md | 6 +++--- FAQ.md | 10 +++++----- binary_dist/pyproject.toml | 2 +- pyproject.toml | 2 +- scripts/publish_pypi | 2 +- src/icloudpd/base.py | 16 ++++++++-------- tests/test_download_live_photos.py | 4 ++-- tests/test_download_photos.py | 24 ++++++++++++------------ 11 files changed, 42 insertions(+), 37 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 365d624e4..62ff94319 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -195,7 +195,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 push: true tags: | icloudpd/icloudpd:latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 5808afbf0..a6b9ad9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +## 1.15.1 (2023-07-16) + +- fix: excessive logging for existing and deduplicated files +- fix: add missing docker platforms back + ## 1.15.0 (2023-07-16) - fix: logs when progress bar enabled diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca7e4b7d9..59cc40f02 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,21 +125,21 @@ scripts/build Building platform executables: ``` sh -scripts/build_bin_linux 1.15.0 amd64 +scripts/build_bin_linux 1.15.1 amd64 ``` Note: that command is for Linux, including devcontainers. Windows & MacOS scripts must be executed on respective platforms. Building Python wheels (with single executables; platform-specific): ``` sh -scripts/build_binary_dist_linux 1.15.0 +scripts/build_binary_dist_linux 1.15.1 ``` Note: that the step expects executables to be already prepared by previous step Building NPM packages (with single executables; platform-specific): ``` sh -scripts/build_npm 1.15.0 +scripts/build_npm 1.15.1 ``` Note: that the step expects executables to be already prepared by previous steps diff --git a/EXPERIMENTAL.md b/EXPERIMENTAL.md index e0672dbcd..83aea3a85 100644 --- a/EXPERIMENTAL.md +++ b/EXPERIMENTAL.md @@ -34,17 +34,17 @@ Legacy command (compatible with prior versions): `docker run -it --rm icloudpd:icloudpd icloud --help` -`icloudpd-1.15.0-windows-amd64 --help` +`icloudpd-1.15.1-windows-amd64 --help` Help: `docker run -it --rm icloudpd:icloudpd` -`icloudpd-ex-1.15.0-windows-amd64 --help` +`icloudpd-ex-1.15.1-windows-amd64 --help` Example: `docker run -it --rm icloudpd:icloudpd copy my@email.address /path/to/{album}/{date_created:%Y/%Y-%m}` -`icloudpd-ex-1.15.0-windows-amd64 copy my@email.address /path/to/{album}/{date_created:%Y/%Y-%m}` +`icloudpd-ex-1.15.1-windows-amd64 copy my@email.address /path/to/{album}/{date_created:%Y/%Y-%m}` diff --git a/FAQ.md b/FAQ.md index 83b4fc2b1..091b5c8cf 100644 --- a/FAQ.md +++ b/FAQ.md @@ -59,10 +59,10 @@ iOS 16 feature to share libraries between accounts is [not supported](https://gi Here are the steps to make it working: - download binary from Github [Releases](https://github.com/icloud-photos-downloader/icloud_photos_downloader/releases) into desired local folder -- add executable flag by running `chmod +x icloudpd-1.15.0-macos-amd64` -- start it from the terminal: `icloudpd-1.15.0-macos-amd64` +- add executable flag by running `chmod +x icloudpd-1.15.1-macos-amd64` +- start it from the terminal: `icloudpd-1.15.1-macos-amd64` - Apple will tell you that it cannot check for malicous software and refuse to run the app; click "Ok" -- Open "System Settings"/"Privacy & Security" and find `icloudpd-1.15.0-macos-amd64` as blocked app; Click "Allow" -- Start `icloudpd-1.15.0-macos-amd64` from the terminal again +- Open "System Settings"/"Privacy & Security" and find `icloudpd-1.15.1-macos-amd64` as blocked app; Click "Allow" +- Start `icloudpd-1.15.1-macos-amd64` from the terminal again - Apple will show another warning; click "Open" -- After that you can run `icloudpd-1.15.0-macos-amd64 icloudpd --help` or any other supported command/option +- After that you can run `icloudpd-1.15.1-macos-amd64 icloudpd --help` or any other supported command/option diff --git a/binary_dist/pyproject.toml b/binary_dist/pyproject.toml index 5ad0ee1a6..aba9cc54d 100644 --- a/binary_dist/pyproject.toml +++ b/binary_dist/pyproject.toml @@ -6,7 +6,7 @@ requires = [ build-backend = "setuptools.build_meta" [project] -version="1.15.0" +version="1.15.1" name = "icloudpd" description = "icloudpd is a command-line tool to download photos and videos from iCloud." readme = "README_PYPI.md" diff --git a/pyproject.toml b/pyproject.toml index ca548c641..7b111f62c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ build-backend = "setuptools.build_meta" [project] -version="1.15.0" +version="1.15.1" name = "icloudpd" description = "icloudpd is a command-line tool to download photos and videos from iCloud." readme = "README_PYPI.md" diff --git a/scripts/publish_pypi b/scripts/publish_pypi index 45c849b3e..67d719b49 100755 --- a/scripts/publish_pypi +++ b/scripts/publish_pypi @@ -11,4 +11,4 @@ set -euo pipefail # cleint use: pip install --index http://192.168.1.20:4880 --trusted-host 192.168.1.20 icloudpd # linux -twine upload --repository-url $1 --non-interactive -u bogus -p bogus dist/icloudpd-1.15.0-py2.py3-none-manylinux*.whl dist/icloudpd-1.15.0-py2.py3-none-macos*.whl dist/icloudpd-1.15.0-py2.py3-none-win*.whl dist/icloudpd-1.15.0-py3-none-any.whl +twine upload --repository-url $1 --non-interactive -u bogus -p bogus dist/icloudpd-1.15.1-py2.py3-none-manylinux*.whl dist/icloudpd-1.15.1-py2.py3-none-macos*.whl dist/icloudpd-1.15.1-py2.py3-none-win*.whl dist/icloudpd-1.15.1-py3-none-any.whl diff --git a/src/icloudpd/base.py b/src/icloudpd/base.py index 3fda65aa4..4be74f7bf 100644 --- a/src/icloudpd/base.py +++ b/src/icloudpd/base.py @@ -221,7 +221,7 @@ default=False, ) # a hacky way to get proper version because automatic detection does not work for some reason -@click.version_option(version="1.15.0") +@click.version_option(version="1.15.1") # pylint: disable-msg=too-many-arguments,too-many-statements # pylint: disable-msg=too-many-branches,too-many-locals def main( @@ -462,15 +462,15 @@ def download_photo_(counter, photo) -> bool: download_path = (f"-{photo_size}.").join( download_path.rsplit(".", 1) ) - logger.info( - "%s deduplicated.", + logger.debug( + "%s deduplicated", truncate_middle(download_path, 96) ) file_exists = os.path.isfile(download_path) if file_exists: counter.increment() - logger.info( - "%s already exists.", + logger.debug( + "%s already exists", truncate_middle(download_path, 96) ) @@ -543,14 +543,14 @@ def download_photo_(counter, photo) -> bool: lp_download_path.rsplit(".", 1) ) logger.debug( - "%s deduplicated.", + "%s deduplicated", truncate_middle(lp_download_path, 96) ) lp_file_exists = os.path.isfile( lp_download_path) if lp_file_exists: - logger.info( - "%s already exists.", + logger.debug( + "%s already exists", truncate_middle(lp_download_path, 96) ) if not lp_file_exists: diff --git a/tests/test_download_live_photos.py b/tests/test_download_live_photos.py index 52c8aa390..8bea75030 100644 --- a/tests/test_download_live_photos.py +++ b/tests/test_download_live_photos.py @@ -146,7 +146,7 @@ def test_skip_existing_live_photodownloads(self): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0514_HEVC.MOV'))} already exists", self._caplog.text, ) self.assertIn( @@ -154,7 +154,7 @@ def test_skip_existing_live_photodownloads(self): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2020/11/04/IMG_0516.HEIC'))} already exists", self._caplog.text, ) self.assertIn( diff --git a/tests/test_download_photos.py b/tests/test_download_photos.py index 3113180b4..c477f4d14 100644 --- a/tests/test_download_photos.py +++ b/tests/test_download_photos.py @@ -90,11 +90,11 @@ def test_download_and_skip_existing_photos(self): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", self._caplog.text, ) self.assertIn( @@ -346,11 +346,11 @@ def test_skip_existing_downloads(self): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409.MOV'))} already exists", self._caplog.text, ) self.assertIn( @@ -454,7 +454,7 @@ def test_until_found(self): ) for f in files_to_skip: - expected_message = f"INFO {os.path.join(base_dir, os.path.normpath(f[0]))} already exists." + expected_message = f"DEBUG {os.path.join(base_dir, os.path.normpath(f[0]))} already exists" self.assertIn(expected_message, self._caplog.text) self.assertIn( @@ -462,7 +462,7 @@ def test_until_found(self): self._caplog.text, ) self.assertNotIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7399-medium.MOV'))} already exists", self._caplog.text ) @@ -1242,7 +1242,7 @@ def mocked_download(self, size): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-1884695.JPG'))} deduplicated", self._caplog.text, ) self.assertIn( @@ -1250,7 +1250,7 @@ def mocked_download(self, size): self._caplog.text, ) self.assertIn( - f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/31/IMG_7409-3294075.MOV'))} deduplicated", self._caplog.text, ) self.assertIn( @@ -1258,11 +1258,11 @@ def mocked_download(self, size): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.MOV'))} already exists", self._caplog.text, ) self.assertIn( @@ -1630,11 +1630,11 @@ def test_download_over_old_original_photos(self): self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7408.JPG'))} already exists", self._caplog.text, ) self.assertIn( - f"INFO {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists.", + f"DEBUG {os.path.join(base_dir, os.path.normpath('2018/07/30/IMG_7407.JPG'))} already exists", self._caplog.text, ) self.assertIn(