the conda-forge bot was failing to detect any imports with depfinder in this PR: conda-forge/conda-forge-bot#1619. Turns out it's because the comparison code in reports.py, specifically this line was using the full file path to do the fnmatch comparison:
DEBUG depfinder:reports.py:168 ******found ignore match for name: /usr/share/miniconda3/envs/test/conda-bld/praw_1677855233037/work/praw/reddit.py
The conda env in the conda-forge bot CI was named "test", so that was, of course, matching on */test/*
The fix here is for depfinder to strip the path so that we're only considering stuff below the working directory in the above example. ie., need to split this:
full_path=/usr/share/miniconda3/envs/test/conda-bld/praw_1677855233037/work/praw/reddit.py
into
workdir=/usr/share/miniconda3/envs/test/conda-bld/praw_1677855233037/work/
and
fname=praw/reddit.py
and then do the comparison on fname
the conda-forge bot was failing to detect any imports with depfinder in this PR: conda-forge/conda-forge-bot#1619. Turns out it's because the comparison code in reports.py, specifically this line was using the full file path to do the fnmatch comparison:
The conda env in the conda-forge bot CI was named "test", so that was, of course, matching on
*/test/*The fix here is for depfinder to strip the path so that we're only considering stuff below the working directory in the above example. ie., need to split this:
full_path=/usr/share/miniconda3/envs/test/conda-bld/praw_1677855233037/work/praw/reddit.pyinto
workdir=/usr/share/miniconda3/envs/test/conda-bld/praw_1677855233037/work/and
fname=praw/reddit.pyand then do the comparison on
fname