recast-hep / recast-atlas

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

eval "$(recast auth reana-setup)" fails #72

Closed lukasheinrich closed 2 years ago

lukasheinrich commented 2 years ago

on a fresh venv installing recast-atlas[reana]:

reana-client secrets-add --help seems too fail due to

Traceback (most recent call last):
  File "/private/tmp/test_reana/_venv/bin/reana-client", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
    @_call_aside
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/private/tmp/test_reana/_venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'isoduration; extra == "format"' distribution was not found and is required by jsonschema

has something recently changed @matthewfeickert ?

matthewfeickert commented 2 years ago

@lukasheinrich Can you help me reproduce your environment? I'm not seeing this on my current install

$ python -m pip install --upgrade .[reana]
$ reana-client secrets-add --help
Usage: reana-client secrets-add [OPTIONS]

  Add secrets from literal string or from file.

  Examples:

       $ reana-client secrets-add --env PASSWORD=password

       $ reana-client secrets-add --file ~/.keytab

       $ reana-client secrets-add --env USER=reanauser

                                  --env PASSWORD=password

                                  --file ~/.keytab

Options:
  --env TEXT               Secrets to be uploaded from literal string.e.g.
                           PASSWORD=password123
  --file FILE              Secrets to be uploaded from file.
  --overwrite              Overwrite the secret if already present
  -t, --access-token TEXT  Access token of the current user.
  --help                   Show this message and exit.
$ pip show recast-atlas
Name: recast-atlas
Version: 0.1.8
Summary: RECAST for ATLAS at the LHC
Home-page: https://github.com/recast-hep/recast-atlas
Author: Lukas Heinrich
Author-email: lukas.heinrich@cern.ch
License: Apache
Location: /home/feickert/.pyenv/versions/3.8.11/envs/recast-atlas-dev/lib/python3.8/site-packages
Requires: click, jsonschema, pyyaml, yadage-schemas
Required-by: 
$ pip show reana-client
Name: reana-client
Version: 0.7.5
Summary: REANA client
Home-page: https://github.com/reanahub/reana-client
Author: REANA
Author-email: info@reana.io
License: UNKNOWN
Location: /home/feickert/.pyenv/versions/3.8.11/envs/recast-atlas-dev/lib/python3.8/site-packages
Requires: click, cwl-utils, cwltool, jsonpointer, pyOpenSSL, PyYAML, reana-commons, rfc3987, six, strict-rfc3339, tablib, webcolors, werkzeug, yadage-schemas
Required-by: 
matthewfeickert commented 2 years ago

Let me spin up a new venv and try though

matthewfeickert commented 2 years ago

@lukasheinrich I can't reproduce this from a clean venv in Docker

$ docker run --rm -ti python:3.8 /bin/bash
root@626c3bfc95c0:/# python -m venv venv && . venv/bin/activate
(venv) root@626c3bfc95c0:/# python -m pip install --upgrade pip "setuptools<58.0.0" wheel
(venv) root@626c3bfc95c0:/# git clone https://github.com/recast-hep/recast-atlas.git && cd recast-atlas
(venv) root@626c3bfc95c0:/recast-atlas# python -m pip install .[develop,local,kubernetes,reana]
(venv) root@626c3bfc95c0:/recast-atlas# reana-client secrets-add --help
Usage: reana-client secrets-add [OPTIONS]

  Add secrets from literal string or from file.

  Examples:

       $ reana-client secrets-add --env PASSWORD=password

       $ reana-client secrets-add --file ~/.keytab

       $ reana-client secrets-add --env USER=reanauser

                                  --env PASSWORD=password

                                  --file ~/.keytab

Options:
  --env TEXT               Secrets to be uploaded from literal string.e.g.
                           PASSWORD=password123
  --file FILE              Secrets to be uploaded from file.
  --overwrite              Overwrite the secret if already present
  -t, --access-token TEXT  Access token of the current user.
  --help                   Show this message and exit.

Do you have a minimal failing example from scratch in a clean venv?

matthewfeickert commented 2 years ago

Closing as this should definitely be resolved with release of recast-atlas v0.1.9.