comictagger / metron_talker

Metron.cloud comictagger talker plugin
7 stars 3 forks source link

Depending on ComicTagger breaks tox tests in ComicTagger #10

Closed lordwelch closed 11 months ago

lordwelch commented 1 year ago

When running tox on ComicTagger all of the dependencies are installed before ComicTagger is installed which causes a problem when dependencies are updated.

py3.9-all: install_package_deps> python -I -m pip install PyQt5 PyQtWebEngine appdirs==1.4.4 'beautifulsoup4>=4.1' 'chardet<6,>=5.1.0' 'importlib-metadata>=3.3.0' 'metron-talker>=0.1.1' 'natsort>=8.1.0' pathvalidate 'pillow<10,>=9.1.0' py7zr pycountry 'pyicu; sys_platform == "linux" or sys_platform == "darwin"' 'pyrate-limiter<3,>=2.6' 'rapidfuzz>=2.12.0' 'rarfile>=4.0' 'requests==2.*' settngs==0.8.0 text2digits 'typing-extensions>=4.3.0' wordninja
Collecting PyQt5
  Using cached PyQt5-5.15.10-cp37-abi3-macosx_10_13_x86_64.whl.metadata (2.1 kB)
Collecting PyQtWebEngine
  Using cached PyQtWebEngine-5.15.6-cp37-abi3-macosx_10_13_x86_64.whl (187 kB)
Collecting appdirs==1.4.4
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting beautifulsoup4>=4.1
  Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
Collecting chardet<6,>=5.1.0
  Using cached chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting importlib-metadata>=3.3.0
  Using cached importlib_metadata-6.8.0-py3-none-any.whl.metadata (5.1 kB)
Collecting metron-talker>=0.1.1
  Using cached metron_talker-0.1.2-py3-none-any.whl.metadata (1.9 kB)
Collecting natsort>=8.1.0
  Using cached natsort-8.4.0-py3-none-any.whl.metadata (21 kB)
Collecting pathvalidate
  Using cached pathvalidate-3.2.0-py3-none-any.whl.metadata (11 kB)
Collecting pillow<10,>=9.1.0
  Using cached Pillow-9.5.0-cp39-cp39-macosx_10_10_x86_64.whl (3.4 MB)
Collecting py7zr
  Using cached py7zr-0.20.8-py3-none-any.whl.metadata (16 kB)
Collecting pycountry
  Using cached pycountry-22.3.5-py2.py3-none-any.whl
Collecting pyicu
  Using cached PyICU-2.12-cp39-cp39-macosx_10_9_universal2.whl
Collecting pyrate-limiter<3,>=2.6
  Using cached pyrate_limiter-2.10.0-py3-none-any.whl (16 kB)
Collecting rapidfuzz>=2.12.0
  Using cached rapidfuzz-3.5.2-cp39-cp39-macosx_10_9_x86_64.whl.metadata (11 kB)
Collecting rarfile>=4.0
  Using cached rarfile-4.1-py3-none-any.whl.metadata (4.4 kB)
Collecting requests==2.*
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting settngs==0.8.0
  Using cached settngs-0.8.0-py3-none-any.whl.metadata (3.1 kB)
Collecting text2digits
  Using cached text2digits-0.1.0-py3-none-any.whl (13 kB)
Collecting typing-extensions>=4.3.0
  Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
Collecting wordninja
  Using cached wordninja-2.0.0-py3-none-any.whl
Collecting charset-normalizer<4,>=2 (from requests==2.*)
  Using cached charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests==2.*)
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<3,>=1.21.1 (from requests==2.*)
  Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests==2.*)
  Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Collecting PyQt5-sip<13,>=12.13 (from PyQt5)
  Using cached PyQt5_sip-12.13.0-cp39-cp39-macosx_10_9_universal2.whl.metadata (504 bytes)
Collecting PyQt5-Qt5>=5.15.2 (from PyQt5)
  Using cached PyQt5_Qt5-5.15.11-py3-none-macosx_10_13_x86_64.whl.metadata (536 bytes)
Collecting PyQtWebEngine-Qt5>=5.15.0 (from PyQtWebEngine)
  Using cached PyQtWebEngine_Qt5-5.15.2-py3-none-macosx_10_13_intel.whl (77.9 MB)
Collecting soupsieve>1.2 (from beautifulsoup4>=4.1)
  Using cached soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
Collecting zipp>=0.5 (from importlib-metadata>=3.3.0)
  Using cached zipp-3.17.0-py3-none-any.whl.metadata (3.7 kB)
Collecting comictagger>=1.6.0a7 (from metron-talker>=0.1.1)
  Using cached comictagger-1.6.0a8-py3-none-any.whl.metadata (9.9 kB)
Collecting mokkari>=2.5.0 (from metron-talker>=0.1.1)
  Using cached mokkari-2.6.0-py3-none-any.whl.metadata (3.5 kB)
Collecting texttable (from py7zr)
  Using cached texttable-1.7.0-py2.py3-none-any.whl.metadata (9.8 kB)
Collecting pycryptodomex>=3.16.0 (from py7zr)
  Using cached pycryptodomex-3.19.0-cp35-abi3-macosx_10_9_x86_64.whl.metadata (3.4 kB)
Collecting pyzstd>=0.15.9 (from py7zr)
  Using cached pyzstd-0.15.9-cp39-cp39-macosx_10_9_x86_64.whl.metadata (7.5 kB)
Collecting pyppmd<1.2.0,>=1.1.0 (from py7zr)
  Using cached pyppmd-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata (5.7 kB)
Collecting pybcj<1.1.0,>=1.0.0 (from py7zr)
  Using cached pybcj-1.0.2-cp39-cp39-macosx_10_9_x86_64.whl.metadata (4.0 kB)
Collecting multivolumefile>=0.2.3 (from py7zr)
  Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Collecting inflate64<1.1.0,>=1.0.0 (from py7zr)
  Using cached inflate64-1.0.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata (4.0 kB)
Collecting brotli>=1.1.0 (from py7zr)
  Using cached Brotli-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl.metadata (5.5 kB)
Collecting psutil (from py7zr)
  Using cached psutil-5.9.6-cp36-abi3-macosx_10_9_x86_64.whl.metadata (21 kB)
Requirement already satisfied: setuptools in ./.tox/py3.9-all/lib/python3.9/site-packages (from pycountry) (68.2.2)
INFO: pip is looking at multiple versions of comictagger to determine which version is compatible with other requirements. This could take a while.
Collecting comictagger>=1.6.0a7 (from metron-talker>=0.1.1)
  Using cached comictagger-1.6.0a7-py3-none-any.whl.metadata (9.9 kB)
Collecting metron-talker>=0.1.1
  Using cached metron_talker-0.1.1-py3-none-any.whl.metadata (2.1 kB)
Collecting comictagger>=1.6.0a5 (from metron-talker>=0.1.1)
  Using cached comictagger-1.6.0a7.dev0-py3-none-any.whl.metadata (9.9 kB)
  Using cached comictagger-1.6.0a5-py3-none-any.whl.metadata (9.8 kB)

The conflict is caused by:
    The user requested settngs==0.8.0
    comictagger 1.6.0a8 depends on settngs==0.7.2
    The user requested settngs==0.8.0
    comictagger 1.6.0a7 depends on settngs==0.7.2
    The user requested settngs==0.8.0
    comictagger 1.6.0a7.dev0 depends on settngs==0.7.2
    The user requested settngs==0.8.0
    comictagger 1.6.0a5 depends on settngs==0.7.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: Cannot install metron-talker and settngs==0.8.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

py3.9-all: exit 1 (5.32 seconds) /Users/timmy/build/source/comictagger> python -I -m pip install PyQt5 PyQtWebEngine appdirs==1.4.4 'beautifulsoup4>=4.1' 'chardet<6,>=5.1.0' 'importlib-metadata>=3.3.0' 'metron-talker>=0.1.1' 'natsort>=8.1.0' pathvalidate 'pillow<10,>=9.1.0' py7zr pycountry 'pyicu; sys_platform == "linux" or sys_platform == "darwin"' 'pyrate-limiter<3,>=2.6' 'rapidfuzz>=2.12.0' 'rarfile>=4.0' 'requests==2.*' settngs==0.8.0 text2digits 'typing-extensions>=4.3.0' wordninja pid=64116
.pkg: _exit> python /Users/timmy/build/venv/global/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython39: _exit> python /Users/timmy/build/venv/global/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  format: OK (2.66=setup[1.36]+cmd[0.21,0.06,0.46,0.31,0.27] seconds)
  py3.9-none: OK (4.42=setup[1.23]+cmd[3.19] seconds)
  py3.9-gui: OK (3.79=setup[0.55]+cmd[3.24] seconds)
  py3.9-7z: OK (11.87=setup[0.56]+cmd[11.31] seconds)
  py3.9-cbr: OK (5.87=setup[0.56]+cmd[5.31] seconds)
  py3.9-icu: FAIL code 1 (3.77=setup[0.58]+cmd[3.15,0.04] seconds)
  py3.9-all: FAIL code 1 (5.37 seconds)
  evaluation failed :( (37.89 seconds)

I only see two options

mizaki commented 1 year ago

It's getting into a circular dependency if I'm understanding correctly?

The reason that the talker has a requirement of CT is to have something to work with (obviously as it's a plugin) but also to make sure it has the right version to work with.

To that end, CT is removed as a dependency from talkers but talkers when run will try to run CT or message out to the console CT is required etc.

Also, on the CT side, talkers specify the CT version they require and CT handles that check and error reporting. (Best discussed on the CT repo.)

How does that sound?

lordwelch commented 1 year ago

Talkers are libraries, there is nothing to run. but otherwise this sounds good