Skip to content
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 sms provider seven #1242

Merged
merged 1 commit into from
Nov 27, 2024
Merged

add sms provider seven #1242

merged 1 commit into from
Nov 27, 2024

Conversation

matthiez
Copy link
Contributor

Description:

This PR adds seven as a SMS provider.

New Service Completion Status

  • apprise/plugins/.py
  • KEYWORDS
    • add new service into this file (alphabetically).
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/seven-io/apprise.git@master

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "seven://apikey/target-phone-no"

Thanks for looking into it and please be easy on me, this is my first PR for this project :-)

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (f37dfbf) to head (6c4d00a).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1242   +/-   ##
=======================================
  Coverage   99.36%   99.37%           
=======================================
  Files         147      148    +1     
  Lines       20555    20636   +81     
  Branches     3663     3672    +9     
=======================================
+ Hits        20425    20506   +81     
  Misses        121      121           
  Partials        9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caronc
Copy link
Owner

caronc commented Nov 20, 2024

This is a really great PR; thank you! just a few small tests should get you the rest of the coverage you need and we can merge this right away. Great work! 👍

# Our expected url(privacy=True) startswith() response:
'privacy_url': 'seven://a...a/15551232000',
}),
('seven://{}/15551232000'.format('a' * 25), {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the following and you'll be at 100% test coverage:

    ('seven://{}/?to=15551232000'.format('a' * 25), {
        # target phone number using to=
        'instance': NotifySeven,

        # Our expected url(privacy=True) startswith() response:
        'privacy_url': 'seven://a...a/15551232000',
    }),
    ('seven://{}/15551'.format('a' * 25), {
        # target phone number invalid
        'instance': NotifySeven,
        # Our call to notify() under the hood will fail
        'notify_response': False,
    }),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your help! I just pushed the changes.

@caronc
Copy link
Owner

caronc commented Nov 22, 2024

Just to confirm that it is working for you (before i merge). Also, i prepared the following Wiki page for your review: here

@matthiez
Copy link
Contributor Author

Just to confirm that it is working for you (before i merge). Also, i prepared the following Wiki page for your review: here

SMS dispatch is all working, tests are passing, and the wiki LGTM.
Thanks for your help @caronc!

@caronc caronc merged commit 9e301df into caronc:master Nov 27, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants