I used AI to help identify circular imports in pypeit. At first it said there aren't any, but I knew of at least one (pypeit.core.fitting <-> pypeit.core.pydl). Using that to correct its first pass, it came up with the following circular imports:
pypeit.core.fitting -> pypeit.core.pydl -> pypeit.core.fitting
pypeit.specobj -> pypeit.core.flexure -> pypeit.specobjs -> pypeit.specobj
pypeit.core.wavecal.kdtree_generator -> pypeit.core.wavecal.waveio -> pypeit.core.wavecal.kdtree_generator
pypeit.core.wavecal.autoid -> pypeit.core.wavecal.wv_fitting -> pypeit.core.wavecal.autoid
pypeit.specobj -> pypeit.core.flexure -> pypeit.specobj
I have a branch in progress that fixes the first one, but we need to fix the other four. It's also likely worth improving the query/prompt to make sure there aren't any more!
I used AI to help identify circular imports in pypeit. At first it said there aren't any, but I knew of at least one (pypeit.core.fitting <-> pypeit.core.pydl). Using that to correct its first pass, it came up with the following circular imports:
I have a branch in progress that fixes the first one, but we need to fix the other four. It's also likely worth improving the query/prompt to make sure there aren't any more!