recast-hep / recast-atlas

CLI for ATLAS RECAST contributors
https://recast.docs.cern.ch/
Apache License 2.0
5 stars 5 forks source link

`yadageschemas` fails to specify `six` dependency #76

Closed matthewfeickert closed 2 years ago

matthewfeickert commented 2 years ago

In a clean venv

$ docker run --rm -it python:3.8 /bin/bash
root@232d8cb7cdcf:/# python -m venv venv && . venv/bin/activate
(venv) root@232d8cb7cdcf:/# python -m pip --quiet install --upgrade pip "setuptools<58.0.0" wheel six
(venv) root@232d8cb7cdcf:/# python -m pip install recast-atlas
(venv) root@232d8cb7cdcf:/# pip freeze | grep recast-atlas
recast-atlas==0.1.8
(venv) root@232d8cb7cdcf:/# recast backends ls --check
Traceback (most recent call last):
  File "/venv/bin/recast", line 5, in <module>
    from recastatlas.cli import recastatlas
  File "/venv/lib/python3.8/site-packages/recastatlas/cli.py", line 5, in <module>
    from .subcommands.catalogue import catalogue
  File "/venv/lib/python3.8/site-packages/recastatlas/subcommands/catalogue.py", line 12, in <module>
    from ..testing import validate_entry
  File "/venv/lib/python3.8/site-packages/recastatlas/testing.py", line 1, in <module>
    import yadageschemas
  File "/venv/lib/python3.8/site-packages/yadageschemas/__init__.py", line 8, in <module>
    from .validator import validate_spec
  File "/venv/lib/python3.8/site-packages/yadageschemas/validator.py", line 4, in <module>
    from .dialects import raw_with_defaults
  File "/venv/lib/python3.8/site-packages/yadageschemas/dialects/raw_with_defaults.py", line 118, in <module>
    import six.moves.urllib as urllib
ModuleNotFoundError: No module named 'six'

yadageschemas uses six in yadageschemas/dialects/raw_with_defaults.py but doesn't specify this in its requirements

    install_requires = [
        'jsonref',
        'pyyaml',
        'requests[security]>=2.9',
        'jsonschema',
        'click',
    ],

This is a yadage-schemas problem, but a stopgap would be to temporarily add six to recast-atlas's requires.

matthewfeickert commented 2 years ago

six.moves was introduced in six v1.4.0 so

six>=1.4.0

should be added to setup.cfg.

matthewfeickert commented 2 years ago

Resolved by the release of yadage-schemas v0.10.7.