You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amoghrajesh (via GitHub)" <gi...@apache.org> on 2025/01/31 11:59:53 UTC

[I] Consider shorter / lesser verbose standard provider import path for users [airflow]

amoghrajesh opened a new issue, #46309:
URL: https://github.com/apache/airflow/issues/46309

   ### Body
   
   A discussion maybe for later, but the entire canonical path in dags, like:
   ```
   from airflow.providers.standard.operators.empty import EmptyOperator
   ```
   
   seems to be pretty verbose. Consider having something like:
   ```
   from airflow.providers.standard import EmptyOperator
   ```
   
   OR
   
   ```
   from airflow.providers.standard.operators import EmptyOperator
   ```
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider shorter / lesser verbose standard provider import path for users [airflow]

Posted by "aditya0yadav (via GitHub)" <gi...@apache.org>.
aditya0yadav commented on issue #46309:
URL: https://github.com/apache/airflow/issues/46309#issuecomment-2627366553

   if this work 
   please let me work on this


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider shorter / lesser verbose standard provider import path for users [airflow]

Posted by "aditya0yadav (via GitHub)" <gi...@apache.org>.
aditya0yadav commented on issue #46309:
URL: https://github.com/apache/airflow/issues/46309#issuecomment-2627362106

   Can we do something like this?  
   
   Example:  
   from airflow.providers.standard.operators.empty import EmptyOperator  
   
   The parent directory of "empty" could include an init file or another module that collectively imports and organizes the classes and functions used in the subdirectories under "operators."  
   
   This approach could potentially resolve the issue, but we would need approval from maintainers or other contributors to implement it.  
   
   If there's a better solution, please share your thoughts in the comments. Your insights would help improve my understanding.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider shorter / lesser verbose standard provider import path for users [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #46309:
URL: https://github.com/apache/airflow/issues/46309#issuecomment-2627350943

   Great Idea. We could even automate it easily for all providers - especially now after they are moved to separate repos. 
   
   Our "validate provider yaml" already has the code to read and import all the provider  "entities" created - so turning that into generated "__all__" imports at the top-level of the provider should be easy.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider shorter / lesser verbose standard provider import path for users [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #46309:
URL: https://github.com/apache/airflow/issues/46309#issuecomment-2627503462

   > Can we do something like this?
   > 
   > Example: from airflow.providers.standard.operators.empty import EmptyOperator
   > 
   > The parent directory of "empty" could include an init file or another module that collectively imports and organizes the classes and functions used in the subdirectories under "operators."
   > 
   > This approach could potentially resolve the issue, but we would need approval from maintainers or other contributors to implement it.
   > 
   > If there's a better solution, please share your thoughts in the comments. Your insights would help improve my understanding.
   
   Those __init__ files **SHOULD** be generated automatically and absolutely not maintained manually (they already ARE I think) - so we need to implement it as part of the pre-commit framework that should generate the right code for all providers.
   
   And yes - if done like that I am ok with it (we do not have provider maintainers - maintainers are just maintainers).


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Consider shorter / lesser verbose standard provider import path for users [airflow]

Posted by "Prab-27 (via GitHub)" <gi...@apache.org>.
Prab-27 commented on issue #46309:
URL: https://github.com/apache/airflow/issues/46309#issuecomment-2629057198

   Interesting! I'd like to get involved in configuring a pre-commit hook for this 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org