diff --git a/README.md b/README.md index 1216a2d4..74f55cda 100644 --- a/README.md +++ b/README.md @@ -1721,7 +1721,7 @@ Substitution Description {lf} A line feed: '\n', alias for {newline} {cr} A carriage return: '\r' {crlf} a carriage return + line feed: '\r\n' -{osxphotos_version} The osxphotos version, e.g. '0.44.2' +{osxphotos_version} The osxphotos version, e.g. '0.44.3' {osxphotos_cmd_line} The full command line used to run osxphotos The following substitutions may result in multiple values. Thus if specified for @@ -3623,7 +3623,7 @@ The following template field substitutions are availabe for use the templating s |{lf}|A line feed: '\n', alias for {newline}| |{cr}|A carriage return: '\r'| |{crlf}|a carriage return + line feed: '\r\n'| -|{osxphotos_version}|The osxphotos version, e.g. '0.44.2'| +|{osxphotos_version}|The osxphotos version, e.g. '0.44.3'| |{osxphotos_cmd_line}|The full command line used to run osxphotos| |{album}|Album(s) photo is contained in| |{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder| diff --git a/docs/.buildinfo b/docs/.buildinfo index 553b2878..012caedb 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0e07227cf12d615535745e76d515a89c +config: 8dc04ce2ac089dfa0c5fc3a14c14ed6e tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 66e7b4d8..7dbf0e4d 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.44.2', + VERSION: '0.44.3', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/cli.html b/docs/cli.html index eb89b79c..696d25ce 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -6,7 +6,7 @@ - osxphotos command line interface (CLI) — osxphotos 0.44.2 documentation + osxphotos command line interface (CLI) — osxphotos 0.44.3 documentation diff --git a/docs/genindex.html b/docs/genindex.html index e44d06b0..f3c39980 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -5,7 +5,7 @@ - Index — osxphotos 0.44.2 documentation + Index — osxphotos 0.44.3 documentation diff --git a/docs/index.html b/docs/index.html index cdb27118..9ef05714 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ - Welcome to osxphotos’s documentation! — osxphotos 0.44.2 documentation + Welcome to osxphotos’s documentation! — osxphotos 0.44.3 documentation diff --git a/docs/modules.html b/docs/modules.html index 198ba31c..6e4d2201 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -6,7 +6,7 @@ - osxphotos — osxphotos 0.44.2 documentation + osxphotos — osxphotos 0.44.3 documentation diff --git a/docs/reference.html b/docs/reference.html index f4d8e5da..7e5e2785 100644 --- a/docs/reference.html +++ b/docs/reference.html @@ -6,7 +6,7 @@ - osxphotos package — osxphotos 0.44.2 documentation + osxphotos package — osxphotos 0.44.3 documentation diff --git a/docs/search.html b/docs/search.html index 72ffdc48..e850277e 100644 --- a/docs/search.html +++ b/docs/search.html @@ -5,7 +5,7 @@ - Search — osxphotos 0.44.2 documentation + Search — osxphotos 0.44.3 documentation diff --git a/tests/test_cli.py b/tests/test_cli.py index 39008e45..f1ed6e58 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -2393,6 +2393,10 @@ def test_export_original_suffix_template(): assert sorted(files) == sorted(CLI_EXPORT_FILENAMES_ORIGINAL_SUFFIX_TEMPLATE) +@pytest.mark.skipif( + "OSXPHOTOS_TEST_CONVERT" not in os.environ, + reason="Skip if running in Github actions, no GPU.", +) def test_export_convert_to_jpeg(): """test --convert-to-jpeg""" import glob @@ -2416,6 +2420,10 @@ def test_export_convert_to_jpeg(): assert large_file.stat().st_size > 7000000 +@pytest.mark.skipif( + "OSXPHOTOS_TEST_CONVERT" not in os.environ, + reason="Skip if running in Github actions, no GPU.", +) def test_export_convert_to_jpeg_quality(): """test --convert-to-jpeg --jpeg-quality""" import glob @@ -2447,6 +2455,10 @@ def test_export_convert_to_jpeg_quality(): assert large_file.stat().st_size < 1000000 +@pytest.mark.skipif( + "OSXPHOTOS_TEST_CONVERT" not in os.environ, + reason="Skip if running in Github actions, no GPU.", +) def test_export_convert_to_jpeg_skip_raw(): """test --convert-to-jpeg""" import glob @@ -6666,6 +6678,10 @@ def test_export_jpeg_ext_edited_movie(): assert f"{filename}_edited.{ext}".lower() in files +@pytest.mark.skipif( + "OSXPHOTOS_TEST_CONVERT" not in os.environ, + reason="Skip if running in Github actions, no GPU.", +) def test_export_jpeg_ext_convert_to_jpeg(): """test --jpeg-ext with --convert-to-jpeg""" import glob @@ -6697,6 +6713,10 @@ def test_export_jpeg_ext_convert_to_jpeg(): assert f"{filename}.jpg" in files +@pytest.mark.skipif( + "OSXPHOTOS_TEST_CONVERT" not in os.environ, + reason="Skip if running in Github actions, no GPU.", +) def test_export_jpeg_ext_convert_to_jpeg_movie(): """test --jpeg-ext with --convert-to-jpeg and a movie, shouldn't convert or change extensions, #366""" import glob diff --git a/tests/test_image_converter.py b/tests/test_image_converter.py index cedd8ec6..350ec554 100644 --- a/tests/test_image_converter.py +++ b/tests/test_image_converter.py @@ -4,6 +4,11 @@ import os import pytest +skip_test = "OSXPHOTOS_TEST_CONVERT" not in os.environ +pytestmark = pytest.mark.skipif( + skip_test, reason="Skip if running on GitHub actions, no GPU." +) + TEST_HEIC = "tests/test-images/IMG_3092.heic" TEST_RAW = "tests/test-images/IMG_0476_2.CR2" @@ -14,7 +19,7 @@ TEST_IMAGE_DOES_NOT_EXIST = "tests/test-images/NOT-A-FILE.heic" def test_image_converter_singleton(): - """test that ImageConverter is a singleton""" + """ test that ImageConverter is a singleton """ from osxphotos.imageconverter import ImageConverter convert1 = ImageConverter() @@ -24,7 +29,7 @@ def test_image_converter_singleton(): def test_image_converter(): - """test conversion of different image types""" + """ test conversion of different image types """ import pathlib import tempfile from osxphotos.imageconverter import ImageConverter @@ -45,7 +50,7 @@ def test_image_converter(): def test_image_converter_compression_quality(): - """test conversion of different image types with custom compression quality""" + """ test conversion of different image types with custom compression quality """ import pathlib import tempfile from osxphotos.imageconverter import ImageConverter @@ -64,7 +69,7 @@ def test_image_converter_compression_quality(): def test_image_converter_bad_compression_quality(): - """test illegal compression quality""" + """ test illegal compression quality """ import pathlib import tempfile from osxphotos.imageconverter import ImageConverter @@ -81,7 +86,7 @@ def test_image_converter_bad_compression_quality(): def test_image_converter_bad_file(): - """Try to convert a file that's not an image""" + """ Try to convert a file that's not an image """ import pathlib import tempfile from osxphotos.imageconverter import ImageConverter, ImageConversionError @@ -96,7 +101,7 @@ def test_image_converter_bad_file(): def test_image_converter_missing_file(): - """Try to convert a file that's not an image""" + """ Try to convert a file that's not an image """ import pathlib import tempfile from osxphotos.imageconverter import ImageConverter @@ -108,3 +113,4 @@ def test_image_converter_missing_file(): outfile = pathlib.Path(tempdir.name) / f"{imgfile.stem}.jpeg" with pytest.raises(FileNotFoundError): converter.write_jpeg(imgfile, outfile) +