Increase typing coverage
Helllo,
We've introduced mypy, but it's not very useful if we don't have type annotations. I think it's worth starting with the providers package, which is most often used by end-users. Currently, our annotation coverage is 47%. I will be happy when we have 75% coverage for each provider.
0.000000 dingding
0.000000 opsgenie
0.000000 presto
0.000000 qubole
0.000000 samba
0.000000 zendesk
16.666650 ssh
16.666667 oracle
16.666667 yandex
16.666700 odbc
21.428550 databricks
25.000000 exasol
25.000000 jdbc
25.000000 postgres
25.000000 singularity
25.000000 snowflake
27.380950 slack
27.964227 amazon
33.333333 sftp
46.153850 imap
50.733332 microsoft
66.761375 cncf
67.857150 salesforce
69.255826 google
71.250000 ftp
83.333300 openfaas
87.500000 redis
87.921875 apache
88.333340 mysql
88.888900 papermill
96.875000 mongo
100.000000 celery
100.000000 cloudant
100.000000 datadog
100.000000 discord
100.000000 docker
100.000000 elasticsearch
100.000000 facebook
100.000000 grpc
100.000000 hashicorp
100.000000 http
100.000000 jenkins
100.000000 jira
100.000000 pagerduty
100.000000 segment
100.000000 sendgrid
100.000000 sqlite
100.000000 vertica
You can also check the results using the command below.
MP_DIR=$(mktemp -d); mypy --linecount-report ${MP_DIR} airflow/; cat "${MP_DIR}/linecount.txt" | grep providers | grep -v example_dags | awk '
$4 != 0 {
split($5, a, ".");
print 100.00 * ($3/$4), a[3]
}'| awk '
{ sum[$2] += $1; N[$2]++ }
END {
for (key in sum) {
avg = sum[key] / N[key];
printf "%f %s\n", avg, key;
}
}' | sort -g
If you decide to finish this ticket you don't have to do all the work yourself. One PR can only deal with a single file/provider and it's ok.
If anyone is interested in this task, I am willing to provide all the necessary tips and information.
Are you wondering how to start contributing to this project? Start by reading our contributor guide
Best regards, Kamil Breguła
CC: @ephraimbuddy @OmairK
This looks interesting, can you assign me this task @mik-laj
@OmairK I assigned you to this ticket.
I also added a small note to the first post.
If you decide to finish this ticket you don't have to do all the work yourself. One PR can only deal with a single file/provider and it's ok.
I'm interested too. We would do it one PR per provider I guess?
I'm interested too. We would do it one PR per provider I guess?
Yeah this sounds like a good idea.
Hi @mik-laj - I would love to grab at least one of these providers. May just need a little bit of time 😅
@coopergillan I assigned you to this ticket. When you create a PR, add a link to this ticket so that others can see your work.
Hi @mik-laj , I would love to help with one of the providers.
@rafyzg I assigned you to the ticket. Which provider is interesting for you?
I would like to help with this. I am new to the project, so I may need some guidance, if available. I have no provider preference.
These are small providers and this can be a good start to the adventure.
- discord
- dingding
- datadog
- cloudant
- celery
If you need help, you can ask @ephraimbuddy or @OmairK, or on the #newbie-questions channel on our Slack channel.
@mik-laj Thank you! I will try celery!
@rafyzg I assigned you to the ticket. Which provider is interesting for you?
I will try first with one file in mysql providers.
I'd be interested in trying one or more of these too. I've been playing around with the Redis provider a bit this week so could start there if that works?
@scrambldchannel I assigned you to this ticket. :-D
I would like to help with this as well. I can start by working on the Discord provider.
@MagicTurtle2203 I assigned you to this ticket. :-D
@mik-laj I'd like to do another one. Is datadog available? If so, feel free to assign any others to me. :)
@mik-laj I'd like to do another one. Is
datadogavailable? If so, feel free to assign any others to me. :)
I think no one has started working on datadog so why dont you go ahead and make draft PR :smile_cat:
@scrambldchannel I assigned you to this ticket. :-D
Cool, thanks, I've created branch and commit in my fork but have been wrestling with setting up a proper dev env on this machine., will open a PR once I'm back in front of my proper dev setup.
Hey @scrambldchannel -> not sure if you know about the 'breeze' development environment for Airflow? It is super easy to work with and it can be set up in 5-10 minutes easily. I just updated the docs and we have now screencast describing how it works - each chapter has accompanying video screencast showing how it works: https://github.com/apache/airflow/blob/master/BREEZE.rst . I heartily recommend using it.