thebjorn/pydeps

The imports data is incorrect for the panda repository.

Opened this issue · 0 comments

I tested with pandas repository: https://github.com/pandas-dev/pandas, and it looks the data generated for the following cmd isn't correct (run from the root of the repository dir):

pydeps --show-deps --no-output --include-missing -LERROR ./pandas/api

The entry for the above ./pandas/api dir is as following:

    "pandas.pandas.api": {
        "bacon": 1,
        "imported_by": [
            "__main__"
        ],
        "imports": [
            "pandas.api"
        ],
        "name": "pandas.pandas.api",
        "path": "/Users/xunhe/python/pandas/pandas/api/__init__.py"
    },

There seemed two issues with this entry:

  1. The name should be pandas.api instead of pandas.pandas.api. I am not very clear about the naming convention, but I know if the first is the latter is the right name, then ./pandas/tests/api/test_api.py which imports the above entry, should have an imports entry with value pandas.pandas.api, currently it only has imports entry with value `pandas.api".

  2. The code for the above __init__.py has the following imports statements:

from pandas.api import (
    extensions,
    indexers,
    interchange,
    types,
)

So it should have imports entries like pandas.api.extensions, pandas.api.indexers etc, currently it only has pandas.api (see above data block), I guess the program didn't handle from pandas.api import (...) syntax correctly.