RhetTbull / osxphotos

Python app to work with pictures and associated metadata from Apple Photos on macOS. Also includes a package to provide programmatic access to the Photos library, pictures, and metadata.
MIT License
2.17k stars 100 forks source link

Test Darwin 12.5 #753

Closed oPromessa closed 2 years ago

oPromessa commented 2 years ago

Is your feature request related to a problem? Please describe. Just updated MacOS to Darwin 12.5. Running the tests of osxphotos similarly to what was done on #636, and #710

Describe alternatives you've considered N/A

Additional context

On setup 0.50.12 some errors ..

$ pip3 install -e .
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Obtaining file:///Users/MSP/Documents/GitHub/osxphotos
  Preparing metadata (setup.py) ... done
(...)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pyobjc-core, pyobjc-framework-Cocoa, pycparser, wcwidth, pyobjc-framework-Quartz, pyobjc-framework-CoreMedia, pygments, parso, commonmark, cffi, xattr, urllib3, rich, pyparsing, pyobjc-framework-FSEvents, pyobjc-framework-CoreML, pyobjc-framework-AVFoundation, pyobjc-framework-AppleScriptObjC, pyobjc-framework-AppleScriptKit, py-applescript, prompt-toolkit, MarkupSafe, jedi, idna, Click, charset-normalizer, blessed, bitstring, Arpeggio, appdirs, xdg, wurlitzer, wrapt, toml, textx, tenacity, shortuuid, rich-theme-manager, requests, PyYAML, pytimeparse2, pyobjc-framework-Vision, pyobjc-framework-Photos, pyobjc-framework-Metal, pyobjc-framework-CoreServices, ptpython, photoscript, pathvalidate, packaging, osxmetadata, objexplore, more-itertools, Mako, bpylist2, bitmath, osxphotos
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
(...)
  Running setup.py develop for osxphotos
Successfully installed Arpeggio-2.0.0 Click-8.1.3 Mako-1.1.6 MarkupSafe-2.1.1 PyYAML-5.4.1 appdirs-1.4.4 bitmath-1.3.3.1 bitstring-3.1.9 blessed-1.17.12 bpylist2-3.0.2 cffi-1.15.1 charset-normalizer-2.1.0 commonmark-0.9.1 idna-3.3 jedi-0.18.1 more-itertools-8.14.0 objexplore-1.6.3 osxmetadata-0.99.38 osxphotos packaging-21.3 parso-0.8.3 pathvalidate-2.5.1 photoscript-0.1.5 prompt-toolkit-3.0.30 ptpython-3.0.20 py-applescript-1.0.2 pycparser-2.21 pygments-2.12.0 pyobjc-core-7.3 pyobjc-framework-AVFoundation-7.3 pyobjc-framework-AppleScriptKit-7.3 pyobjc-framework-AppleScriptObjC-7.3 pyobjc-framework-Cocoa-7.3 pyobjc-framework-CoreML-7.3 pyobjc-framework-CoreMedia-7.3 pyobjc-framework-CoreServices-7.3 pyobjc-framework-FSEvents-7.3 pyobjc-framework-Metal-7.3 pyobjc-framework-Photos-7.3 pyobjc-framework-Quartz-7.3 pyobjc-framework-Vision-7.3 pyparsing-3.0.9 pytimeparse2-1.4.0 requests-2.28.1 rich-12.5.1 rich-theme-manager-0.11.0 shortuuid-1.0.9 tenacity-8.0.1 textx-2.3.0 toml-0.10.2 urllib3-1.26.11 wcwidth-0.2.5 wrapt-1.13.3 wurlitzer-2.1.1 xattr-0.9.9 xdg-5.1.1
WARNING: You are using pip version 21.3.1; however, version 22.2.2 is available.
You should consider upgrading via the '/usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.

Test Results

$ python3 -m pytest -vv
============================ test session starts ============================ 
platform darwin -- Python 3.9.10, pytest-7.0.1, pluggy-0.13.1 -- /Users/MSP/Documents/GitHub/osxphotos/venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/MSP/Documents/GitHub/osxphotos, configfile: pytest.ini
plugins: mock-3.7.0
collected 1352 items / 1 skipped / 1351 selected   
(...)
============================ 1274 passed, 79 skipped in 145.56s (0:02:25) ============================ 

Additional test: After selecting one photo from my own Library in Photos app.

$ mkdir tmp;  osxphotos export tmp --use-photos-export --selected --verbose
osxphotos version 0.50.12
Using last opened Photos library: /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary
Using export database /Users/MSP/Documents/GitHub/osxphotos/tmp/.osxphotos_export.db
2022-08-10 21:11:41,616 - WARNING - photosdb.py - 111 - WARNING: This module has only been tested with macOS versions [10.12, 10.13, 10.14, 10.15, 10.16, 11.0, 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 12.0, 12.1, 12.2, 12.3, 12.4]: you have Darwin, OS version: 12.5
Processing database /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/database/photos.db
Processing database /Users/Shared/Pictures/iPhoto Shared Library.photoslibrary/database/Photos.sqlite
Database locked, creating temporary copy.
Processing database.
Database version: 6000, 7.
Processing persons in photos.
Processing detected faces in photos.
Processing albums.
Processing keywords.
Processing photo details.
Processing import sessions.
Processing additional photo details.
Processing face details.
Processing photo labels.
Processing EXIF details.
Processing computed aesthetic scores.
Processing comments and likes for shared photos.
Processing moments.
Done processing details from Photos library.
Exporting 1 photo to /Users/MSP/Documents/GitHub/osxphotos/tmp...
Exporting IMG_20220717_184248.HEIC (IMG_20220717_184248.HEIC) (1/1)
Exported IMG_20220717_184248.HEIC to /Users/MSP/Documents/GitHub/osxphotos/tmp/IMG_20220717_184248.HEIC
Exported /Users/MSP/Documents/GitHub/osxphotos/tmp/IMG_20220717_184248.HEIC
Exporting 1 photos ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Processed: 1 photo, exported: 1, missing: 0, error: 0
Elapsed time: 0:00:00
RhetTbull commented 2 years ago

Thanks! I updated the tested version list, will be included in next release