Skip to content

export-requirements --all should check 'IsInstalled' as it walks the output of rg.pydumpreqs #10

@MikeClapper

Description

@MikeClapper

If a requirement appears in the output of rg.pydumpreqs but is not installed due to a bad specification in gears run statement, "export-requirements --all" will fail trying to export the metadata for the incomplete requirement.
For example if UNBLOCKING Is specified as a trailing argument:
rg.pyexecute 'GB().run()' requirements numpy UNBLOCKING

This entry will appear in the output of rg.pydumpreqs:

127.0.0.1:6379> rg.pydumpreqs

    1. "GearReqVersion"
    2. (integer) 1
    3. "Name"
    4. "UNBLOCKING"
    5. "IsDownloaded"
    6. "no"
    7. "IsInstalled"
    8. "no"
    9. "CompiledOs"
  1. "linux-buster-x64"
  2. "Wheels"
  3. "Requirement was not yet downloaded so wheels are not available"
    1. "GearReqVersion"
    2. (integer) 1
    3. "Name"
    4. "gearsclient==1.0.1"
    5. "IsDownloaded"
    6. "yes"
    7. "IsInstalled"
    8. "yes"
    9. "CompiledOs"
  4. "linux-buster-x64"
  5. "Wheels"
    1. "gearsclient-1.0.1-py3-none-any.whl"
    2. "redis-3.5.3-py2.py3-none-any.whl"
    3. "cloudpickle-1.6.0-py3-none-any.whl"
    1. "GearReqVersion"
    2. (integer) 1
    3. "Name"
    4. "pandas"
    5. "IsDownloaded"
    6. "yes"
    7. "IsInstalled"
    8. "yes"
    9. "CompiledOs"
  6. "linux-buster-x64"
  7. "Wheels"
    1. "pytz-2020.1-py2.py3-none-any.whl"
    2. "numpy-1.19.2-cp37-cp37m-manylinux2010_x86_64.whl"
    3. "python_dateutil-2.8.1-py2.py3-none-any.whl"
    4. "six-1.15.0-py2.py3-none-any.whl"
    5. "pandas-1.1.2-cp37-cp37m-manylinux1_x86_64.whl"
    1. "GearReqVersion"
    2. (integer) 1
    3. "Name"
    4. "numpy"
    5. "IsDownloaded"
    6. "yes"
    7. "IsInstalled"
    8. "yes"
    9. "CompiledOs"
  8. "linux-buster-x64"
  9. "Wheels"
    1. "numpy-1.19.2-cp37-cp37m-manylinux2010_x86_64.whl"

resulting in this:

$ python3 gcli.py export-requirements --port 6379 --all --save-directory exports
failed exporting requirement (Requirement was not installed yet)

If there is no way to remove the incomplete entry then the good requirements have to be exported one at a time. In a large environment this could be very time consuming. The documentation does not show a way to delete individual entries as a way to clean this up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions