potiuk commented on PR #56187: URL: https://github.com/apache/airflow/pull/56187#issuecomment-3536672443
> For the actual files, I adjusted the imports to follow the format > > ``` > try: > from airflow_shared.observability... > except ModuleNotFound: > from airflow._shared.observability... > ``` I'm curious why that's not the case with the other shared modules where we can access the code from anywhere with airflow._shared. I suspect that it has to do with this line that you added under the observability/pyproject.toml - because generally `uv run pytest` in the right folder should automatiically add `src` of that folder (and all dependent distributions) to pythonpath , and we also make sure in common conftest.py of devel_common.py to automatically add all `tests` folders to PYTHONPATH as well - this happens always dynamically when pytest is run. This is also not the right way. I think what you have problem with is not the actual `uv` test run etc but the fact is that you are running test from the IDE - and in this case you should make sure that the shared observability "src" and "test" folders are added to your "source" and "test" PYTHONPATH respectively. We have `setup_idea.py` and `setup_vscode.py` that you can run with `uv run` to automatically create the right configuraiton for both IntelliJ and VSCode with the right paths. Maybe you have not run it after moving observability to shared? Or maybe there is a bug in those to not include shared distributions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
