Skip to content

Circular imports #2081

@kbwestfall

Description

@kbwestfall

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions