Troubleshooting circular import issue while running metadata-ingestion in local IntelliJ

Original Slack Thread

Hi,
I am looking to run and debug the metadata-ingestion in my local but unable to due to the below error.
Traceback (most recent call last):
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/entrypoints.py", line 10, in <module>
from datahub.cli.check_cli import check
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/cli/check_cli.py", line 13, in <module>
from datahub.ingestion.run.pipeline import Pipeline
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/ingestion/run/pipeline.py", line 29, in <module>
from datahub.ingestion.extractor.extractor_registry import extractor_registry
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/ingestion/extractor/extractor_registry.py", line 1, in <module>
from datahub.ingestion.api.registry import PluginRegistry
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/ingestion/api/registry.py", line 18, in <module>
import entrypoints
File "/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/entrypoints.py", line 10, in <module>
from datahub.cli.check_cli import check
ImportError: cannot import name 'check' from partially initialized module 'datahub.cli.check_cli' (most likely due to a circular import) (/home/asaniya/code/datahub-master/metadata-ingestion/src/datahub/cli/check_cli.py)

I have already tried following the steps noted in below documentation: https://datahubproject.io/docs/metadata-ingestion/developing/#requirements
I am at a point where I am build the code but unable to run it. Ideally, I would like to run this in IntelliJ. Could you please help to resolve the above issue?
CC: <@U02G4B6ADL6>

Hi, this thread might be helpful!: https://datahubspace.slack.com/archives/CUMUWQU66/p1650897028577449?thread_ts=1650888945.554849&amp;cid=CUMUWQU66