-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
⚡ 🔨 Refactor and Update Email Template with Formatted Date, Time, and New Design #86
Merged
ARYAN-NIKNEZHAD
merged 65 commits into
Lazarus-org:develop
from
FATEMEH-Z-HASHEMI:refactor/email-template
Sep 17, 2024
Merged
⚡ 🔨 Refactor and Update Email Template with Formatted Date, Time, and New Design #86
ARYAN-NIKNEZHAD
merged 65 commits into
Lazarus-org:develop
from
FATEMEH-Z-HASHEMI:refactor/email-template
Sep 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Develop to Main
Develop to Main
Added CI workflow and Open Issues badges Fixed address of each badge
- Added classifiers to specify the supported Python versions, license, and intended audience. - Added URLs for documentation, source code, and issue tracker. - Added repository URL for easy access to - Included relevant keywords to improve package discoverability.
🔨 📚 Refactor/docs
…ld-config 🔧 Update/build config
…il-template ⚡ Update(template) email_notifier img
Fixed skip python 3.11, 3.9, 3.8 in tox job
…hon-version 🐛 fix(CI):skip some python versions on tox
Refactored keywords to remove unneccessary keywords Refactored classifiers to add django 5.1 framework
…ode-base 📚 Refactor/code base
⚡ 🔨 refactor(docs):update quick start section
- converted the �nsicolors class to a dataclass with rozen=true, ensuring immutability and preventing accidental modification of color codes.
📚 ⚡ docs: add codecov badges
- Set 1.0.0 version for start point
Imporved docs structure and badges path
⚡ 📚 🔨 refactor(docs): Update readme & rst files
…ocs-and-build 🔨 📚 Refactor/docs and build
…st-docs ⚡ 🔨 📚 🎨 refactor(docs): Improve rst docs
- Added execution_tracker decorator to enhance logging capabilities by tracking performance metrics - Functionality: - Execution Time: Logs the execution time of the decorated function, reporting in seconds and minutes based on duration - Database Queries: Optionally logs the number of database queries for decorated function if DEBUG is True and log_queries is enabled. - Query Threshold: Provides a warning log if the number of queries exceeds a specified threshold. - Error Handling: Logs any exceptions raised during function execution.
- Added validate_integer_setting to validate positive integer. - Updated execution_tracker decorator to add validators.
- Tests Added: Implemented a suite of tests for the execution_tracker decorator, covering various scenarios including performance metrics, database queries, and error handling. - Details: - Test Suite: TestExecutionTracker - test_execution_tracker_raises_error_on_invalid_attribute: - Verifies that a ValueError is raised when invalid logging levels or query thresholds are provided to the decorator. - test_execution_tracker_raises_error_on_invalid_log_queries: - Checks that a ValueError is raised when an invalid value is provided for log_queries. - test_execution_tracker_execution_time: - Validates that database queries are logged when log_queries is enabled and DEBUG is True. - test_execution_tracker_query_threshold_warning: - Ensures that a warning is logged when the number of queries exceeds the specified threshold. - test_execution_tracker_logs_queries_debug_false: - Tests that a warning is logged when log_queries is enabled but DEBUG is set to False, indicating that database queries are not tracked. - test_execution_tracker_error_handling: - Checks that errors are logged correctly when the decorated function raises an exception Ensured compatibility with various Python versions and Django settings to reflect realistic scenarios. Closes Lazarus-org#80
- Added documentation for the newly implemented execution_tracker decorator. - Updated the README to include detailed information on how to use the decorator, including example usage. - Added descriptions for the decorator's arguments - Included example log outputs for both cases where log_queries is enabled and where DEBUG is False.
…tion-tracker ✨ Feat/execution tracker
⚡ 📚 Update/docs
…ted date and time - Refactored EmailHandler to add two new time formats (ormatted_date and ormatted_time) for inclusion in the email template. - ormatted_date now uses the format %d %B %Y, with the month name in uppercase. - ormatted_time uses the format %I:%M %p. - Updated the context in ender_template to include date and ime for enhanced readability in the email notifications. - Ensured backward compatibility with the existing log entry and request data.
…roved styles - Refactored the email template for log notifications to introduce a new design with updated styles. - Changed the background color to #2C333B for a darker theme, with the content area having a light background #ECE9E1. - Added a new header with a logo and branding (LAZARUS) for improved visual identity. - Included the date and ime in a more readable and prominent format. - Updated the layout to have a more modern look with rounded corners and shadow effects for better visual presentation. - Improved the structure and alignment of log message content, IP address, and browser information for clearer readability. - Retained automated message disclaimers at the bottom of the email template. Closes Lazarus-org#85
FATEMEH-Z-HASHEMI
force-pushed
the
refactor/email-template
branch
from
September 17, 2024 23:05
2d38467
to
a0902b7
Compare
ARYAN-NIKNEZHAD
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Sep 17, 2024
ARYAN-NIKNEZHAD
approved these changes
Sep 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 👌
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the email notification system by updating the context data with formatted date and time values and redesigning the email template with a modern look.
Key Changes:
Email Context Refactor:
EmailHandler
to includeformatted_date
andformatted_time
in the template context for enhanced readability.formatted_date
: Uses the format%d %B %Y
, ensuring the month name is in uppercase.formatted_time
: Uses the format%I:%M %p
.render_template
to include these new values in the context while maintaining backward compatibility with existing log entry and request data.Template Redesign:
#2C333B
for a darker theme, and the content area now has a light background#ECE9E1
.LAZARUS
), enhancing the visual identity of the email.This PR closes issue #85.