[v1.0.0] Alpha to Stable Deployment#1
Conversation
# 1.0.0-alpha.1 (2024-12-25) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to include test packaer code ([4aab2ec](4aab2ec)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to include test packaer code ([4aab2ec](4aab2ec)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to include test packaer code ([4aab2ec](4aab2ec)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to include test packaer code ([4aab2ec](4aab2ec)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
# 1.0.0-alpha.1 (2024-12-26) ### Bug Fixes * add dependency between test and release workflow ([8507d9e](8507d9e)) * change python to python3.12 in tests and add package-lock.json ([1a21f0d](1a21f0d)) * clear changelog and remove tags ([85480a4](85480a4)) * remove example output from readme ([9783a2b](9783a2b)) * update test workflow to include test packaer code ([4aab2ec](4aab2ec)) * update test workflow to use poetry to install Python dependencies ([810c2d4](810c2d4)) ### Features * add examples ([6d581b0](6d581b0)) * add logging, error handling and clean up ([4330061](4330061)) * add semantic release workflow ([012745c](012745c)) * add unit tests ([92e2539](92e2539)) * Add unit tests and github actions workflow for tests ([df792e7](df792e7))
Installation section had `pip install -r poetry` but should be `pip install poetry`
There was a problem hiding this comment.
Pull Request Overview
This PR delivers the initial stable release (v1.0.0) of the Python-based HTML email generator library, including core generation logic, tests, examples, and CI/CD setup.
- Introduces
EmailHTMLGeneratorclass with YAML-driven HTML/email generation and embedded Base64 images - Adds comprehensive unit tests and sample YAML configurations
- Sets up CLI, documentation (README), and semantic-release workflows
Reviewed Changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| emailer/generator.py | Core generator implementation with section- and image-builders |
| tests/unittests/test_email_html_generator.py | Unit tests for config loading and HTML generation |
| emailer/cli.py | CLI entrypoint for invoking the generator |
| samples/*.yaml | Example configurations for various email templates |
| pyproject.toml | Package metadata and dependency configuration |
| README.md | User documentation and usage guide |
| .github/workflows/*.yaml | CI tests and release workflows |
| RELEASE_NOTES.md | Release notes for v1.0.0 |
Comments suppressed due to low confidence (3)
samples/functionality.yaml:8
- Invalid section type "headers"—the generator expects "header". Update to match the supported types or enhance validation.
- type: "headers"
README.md:3
- Filename typo in the image path:
newletter_header.jpgshould likely benewsletter_header.jpgto match the project name.
<img src="assets/newletter_header.jpg">
emailer/generator.py:175
- There are no unit tests covering
build_block_sectionor link/button rendering. Consider adding tests for block layouts andbuild_link_columnto ensure coverage.
elif section_type == "block":
| <title>{title}</title> | ||
| <style> |
There was a problem hiding this comment.
The HTML template string duplicates <title> and <style> tags (lines 88–91). Remove the extra <title> and redundant <style> to ensure valid head markup.
| <title>{title}</title> | |
| <style> |
| button_height = column.get("styles", {}).get("button-height", "auto") # Default to 16px if not provided | ||
| button_height = column.get("styles", {}).get("background-button-color", "none") |
There was a problem hiding this comment.
The next line overwrites button_height with background-button-color. This looks like a typo—use separate variables for height and background color or correct the key lookup.
| button_height = column.get("styles", {}).get("button-height", "auto") # Default to 16px if not provided | |
| button_height = column.get("styles", {}).get("background-button-color", "none") | |
| button_height = column.get("styles", {}).get("button-height", "auto") # Default to "auto" if not provided | |
| background_button_color = column.get("styles", {}).get("background-button-color", "none") # Default to "none" if not provided |
| str: The Content-ID (CID) for the image. | ||
| """ | ||
| cid = os.path.basename(image_path).replace(".", "_") | ||
| self.inline_images[cid] = image_path |
There was a problem hiding this comment.
The inline_images dictionary is never initialized in __init__. Add self.inline_images = {} before it's first used to avoid an AttributeError.
| @mock.patch("builtins.open", new_callable=mock.mock_open) | ||
| def test_generate_html(mock_open, mock_exists, mock_yaml_file, mock_config): | ||
| """Test generating HTML from the configuration.""" | ||
| with mock.patch("main.utils.email_html_generator.EmailHTMLGenerator.load_config", return_value=mock_config): |
There was a problem hiding this comment.
The import path for patching load_config is incorrect. The class lives in emailer.generator, so patch emailer.generator.EmailHTMLGenerator.load_config instead.
| with mock.patch("main.utils.email_html_generator.EmailHTMLGenerator.load_config", return_value=mock_config): | |
| with mock.patch("emailer.generator.EmailHTMLGenerator.load_config", return_value=mock_config): |
| # The template has the following sections: | ||
| # - Image header as a banner of the email | ||
| # - Details of who the email is from and for, and purpose | ||
| # - Paragarph of the details of the email, including any updates |
There was a problem hiding this comment.
Typo in comment: "Paragarph" should be spelled "Paragraph".
| # - Paragarph of the details of the email, including any updates | |
| # - Paragraph of the details of the email, including any updates |
| # Professional Newsletter Template | ||
| # A template for creating a professional-looking newsletter. This template includes a header, an introductory paragraph, a main content section, and a footer with an image. | ||
|
|
||
| title: "Corporate Anouncement" |
There was a problem hiding this comment.
Typo in the title: "Anouncement" should be spelled "Announcement".
| title: "Corporate Anouncement" | |
| title: "Corporate Announcement" |
Title
Release html email generator libraryDescription
What
This pull request releases the initial stable release of the html email generator library built in Python. Users are able to use this library to generate HTML files that can be embedded into emails to allow for a professional look to an email in an easy, yaml-config driven manner.
Why
Initial release.
How
Change python to python3.12 in tests and add package-lock.json (1a21f0d)
Clear changelog and remove tags (85480a4)
Remove example output from readme (9783a2b)
Add examples (6d581b0)
Add logging, error handling and clean up (4330061)
Add semantic release workflow (012745c)
Add library code for HTML generator class
Impact
Testing
Unit Tests
Integration Tests
None
Manual Testing
Checklist
Additional Comments
None