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

Load Notifications and Emoji Engine on Demand #1020

Merged
merged 11 commits into from
Dec 27, 2023
Merged

Conversation

caronc
Copy link
Owner

@caronc caronc commented Dec 22, 2023

Description:

Related issue (if applicable): n/a

This is a massive re-factor of how notifications are loaded into memory. It also refactors the way the Emoji engine is loaded (saving on memory when it's not needed).

After this PR, notifications are no longer loaded on the import apprise command. Instead leveraging a new library, they are only imported on demand.

  • Improved startup logging and information on load times (both Native Notifications and Custom ones loaded thereafter)
  • Testing re-factored to better handle the dynamic reloading of modules to test how they handle.

Breaking Changes

  • This will require the Apprise API to be refactored to work correctly once this is merged. It will also break anyone who learned of the 'under-the-hood' Apprise environment and was manipulating the old SCHEMA -> Module mapping.

Those using the library as it was intended will not see any breakage at all.

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

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cda6925) 99.55% compared to head (b421dfd) 99.27%.
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1020      +/-   ##
==========================================
- Coverage   99.55%   99.27%   -0.28%     
==========================================
  Files         130      136       +6     
  Lines       17281    17657     +376     
  Branches     3523     3603      +80     
==========================================
+ Hits        17204    17529     +325     
- Misses         68      119      +51     
  Partials        9        9              

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

@caronc caronc merged commit 9dcf769 into master Dec 27, 2023
12 checks passed
@caronc caronc deleted the load-on-demand-refactor branch December 29, 2023 18:43
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