-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
[AIRFLOW-1889] Move sensors to separate package #2875
[AIRFLOW-1889] Move sensors to separate package #2875
Conversation
7773cc3
to
3c48741
Compare
7c0be32
to
f3b43ad
Compare
55ab8c9
to
41b692e
Compare
82335ca
to
f5c03cb
Compare
@bolkedebruin what are your thoughts on this? Please note that we have two |
Many changes are related to Flake compliancy, I had to shorten a lot of url's and fix the order of imports. |
f5c03cb
to
ce8ca2f
Compare
Codecov Report
@@ Coverage Diff @@
## master #2875 +/- ##
==========================================
- Coverage 73.47% 72.71% -0.77%
==========================================
Files 160 174 +14
Lines 12208 12764 +556
==========================================
+ Hits 8970 9281 +311
- Misses 3238 3483 +245
Continue to review full report at Codecov.
|
Can you rebase? |
ce8ca2f
to
9becd53
Compare
@bolkedebruin done! |
Moving the sensors to seperate files increases readability of the code. Also this reduces the code in the big core.py file.
9becd53
to
11550a7
Compare
Rebased |
I think sensors.py should still exist, contain a deprecation warning, but still have the sensors available in that package (until 2.0), otherwise DAGs will break with no warning, and it’s easy to maintain back compat in this case |
LGTM, this change will make maintenance/testing of sensors much easier. I would love for this to be merged before I hack on AIRFLOW-2001. |
Looks great, awesome work! I think we should keep sensors.py for now with a deprecation warning - I can add their removal to the scope of AIRFLOW-1922 for 2.0. |
I'm really glad you guys did this! |
Moving the sensors to seperate files increases readability of the code. Also this reduces the code in the big core.py file. Closes apache#2875 from Fokko/AIRFLOW-1889-move-sensors- to-separate-package
Follow up fix: #2961 |
Hi all,
I'd like to move the core sensors to a separate package. Right now all the sensors are contained in
airflow/operators/sensors.py
. But I'd like to split this like in/contrib/sensors/
:This also includes splitting the tests which are now mostly in
tests/core.py
which is a huge test class which is candidate for refactoring.Make sure you have checked all steps below.
JIRA
Description
Tests
Commits
My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
Passes
git diff upstream/master -u -- "*.py" | flake8 --diff