-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Add pre-commit that verifies if shared project are properly structured #53697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pre-commit that verifies if shared project are properly structured #53697
Conversation
First small pre-commit - for now just checking if shared projects are properly structured. |
I also moved "test_timezones" to "timezones" subpackage to add a namespace for tests - when we run the tests from IDE, all tests folders are part of the same namespace so we should namespace them too to not get confused with tests from other distributions. |
Also maybe it's good to also add "airflow_shared" implicit package for "tests" (for even better namespacing?) WDYT? |
I am also thinking about globally changing other namespaces of ours "the unit, system, integration" at the top level of "tests" is quite confusing so maybe we could introduce a convention similar to:
That would make some of the cross-package imports much more 'reasonable"
Maybe that would be our target convention? I am happy to raise a question / proposal at the devlist if we think it is a good idea. We can do it all with implicit namespaces. |
Also we could potentially do "from airflow_providers/amazon/unit" which seems a bit more logical, but it will complicate a bit the selection of tests to execute (but it's also possible). |
I like it. Will follow up on your email. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments here, but its looking nice generally.
BTW, no need to backport it.
80a036a
to
7df94c5
Compare
Nice copilot, good copilot :D |
Some basic checks for structure of the shared projects - includig package structure and pyproject.toml contents.
7df94c5
to
b540e32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niceee! Love it!
I merge it for now - we can also restructure tests/structure separately. |
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker e3ddf97 v3-0-test This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
Some basic checks for structure of the shared projects - includig package structure and pyproject.toml contents.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in airflow-core/newsfragments.