jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.24k stars 609 forks source link

Make push optional dependecies #600

Closed sevdog closed 3 years ago

sevdog commented 3 years ago

In some use-cases this package is used only to serve a subset of available push services.

In this case having every push-library as a required dependecy may cause problems with the environment (ie: dependecies of dependency).

This PR turns APNS and webpush as optional dependencies using extras_require option.

sevdog commented 3 years ago

I have rabased this after #599.

sevdog commented 3 years ago

I see that now travis is failing due to rust dependency ofcryptography...

sevdog commented 3 years ago

@auvipy maybe the issue with crypthography on travis is due to this change: from version 3.4, released on Feb this year, it requires RUST to compile binaries. There is a binary package for ubuntu, but it requires pip to be updated, on travis PIP uses version 20.1.1 (May 2020) which may not get the updated binary. This problem maybe could be fixed by forcing PIP to update.

sevdog commented 3 years ago

I have just seen that now this repo uses Gihub Action instead of Travis. I will update this PR as soon as I can.

codecov[bot] commented 3 years ago

Codecov Report

Merging #600 (59c6b93) into master (13a2c6f) will decrease coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
- Coverage   68.30%   68.24%   -0.06%     
==========================================
  Files          24       24              
  Lines        1101     1099       -2     
  Branches      173      173              
==========================================
- Hits          752      750       -2     
  Misses        312      312              
  Partials       37       37              
Impacted Files Coverage Δ
push_notifications/admin.py 32.60% <100.00%> (-1.44%) :arrow_down:
push_notifications/apns.py 89.47% <100.00%> (-1.30%) :arrow_down:
push_notifications/exceptions.py 100.00% <100.00%> (ø)
push_notifications/gcm.py 79.12% <100.00%> (-0.45%) :arrow_down:
push_notifications/webpush.py 66.66% <100.00%> (-3.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 13a2c6f...59c6b93. Read the comment docs.