Skip to content

Commit dd03daf

Browse files
authored
Merge pull request #20 from posit-dev/rename-emailer-lib
Rename emailer lib
2 parents 236b418 + 42525e6 commit dd03daf

32 files changed

+603
-335
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install the project
3131
run: uv sync --all-extras --dev
3232

33-
- name: Install emailer-lib
33+
- name: Install nbmail
3434
run: uv pip install -e .
3535

3636
# quarto docs build ----
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
source-dir: docs/_site
5959

60-
test-emailer-lib:
60+
test-nbmail:
6161
runs-on: ubuntu-latest
6262
strategy:
6363
matrix:
@@ -80,19 +80,19 @@ jobs:
8080
- name: Install the project
8181
run: uv sync --all-extras --dev
8282

83-
- name: Install emailer-lib
83+
- name: Install nbmail
8484
run: uv pip install -e .
8585

8686
- name: Install the project deps
8787
run: uv pip install -e .[dev]
8888

89-
- name: Test emailer-lib
89+
- name: Test nbmail
9090
run: |
91-
uv run pytest emailer_lib/tests/ --cov=emailer_lib --cov-report=xml --cov-report=term-missing
91+
uv run pytest nbmail/tests/ --cov=nbmail --cov-report=xml --cov-report=term-missing
9292
9393
- name: Upload coverage reports
9494
uses: codecov/codecov-action@v4
9595
if: ${{ matrix.python-version == '3.12' }}
9696
with:
97-
file: emailer-lib/coverage.xml
98-
flags: emailer-lib
97+
file: nbmail/coverage.xml
98+
flags: nbmail

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ preview:
55
cd docs && quarto preview
66

77
test:
8-
pytest emailer_lib/tests emailer_lib/mjml/tests --cov-report=xml
8+
pytest nbmail/tests nbmail/mjml/tests --cov-report=xml
99

1010
test-update:
11-
pytest emailer_lib/tests emailer_lib/mjml/tests --snapshot-update
11+
pytest nbmail/tests nbmail/mjml/tests --snapshot-update
1212

1313
generate-mjml-tags:
14-
python3 emailer_lib/mjml/scripts/generate_tags.py
14+
python3 nbmail/mjml/scripts/generate_tags.py

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# emailer-lib
1+
# nbmail
22

33
<!-- [![Python Versions](https://img.shields.io/pypi/pyversions/gt_extras.svg)](https://pypi.python.org/pypi/gt-extras) -->
44
<!-- [![PyPI](https://img.shields.io/pypi/v/gt-extras?logo=python&logoColor=white&color=orange)](https://pypi.org/project/gt-extras/) -->
@@ -11,40 +11,40 @@
1111
<!-- [![Contributors](https://img.shields.io/github/contributors/posit-dev/gt-extras)](https://github.com/posit-dev/gt-extras/graphs/contributors) -->
1212
<!-- [![Codecov](https://codecov.io/gh/posit-dev/gt-extras/branch/main/graph/badge.svg)](https://codecov.io/gh/posit-dev/gt-extras) -->
1313

14-
> ⚠️ **emailer-lib is currently in development, expect breaking changes.**
14+
> ⚠️ **nbmail is currently in development, expect breaking changes.**
1515
1616

17-
### What is [emailer-lib](https://posit-dev.github.io/email-for-data-science/reference/)?
17+
### What is [nbmail](https://posit-dev.github.io/email-for-data-science/reference/)?
1818

19-
**emailer-lib** is a Python package for serializing, previewing, and sending email messages in a consistent, simple structure. It provides utilities to convert emails from different sources (Redmail, Yagmail, MJML, Quarto JSON) into a unified intermediate format, and send them via multiple backends (Gmail, SMTP, Mailgun, etc.).
19+
**nbmail** is a Python package for serializing, previewing, and sending email messages in a consistent, simple structure. It provides utilities to convert emails from different sources (Redmail, Yagmail, MJML, Quarto JSON) into a unified intermediate format, and send them via multiple backends (Gmail, SMTP, Mailgun, etc.).
2020

2121
The package is designed for data science workflows and Quarto projects, making it easy to generate, preview, and deliver rich email content programmatically.
2222

2323
<!-- ## Installation
2424
Install the latest release from your local repo or PyPI:
2525
2626
```bash
27-
pip install -e ./emailer-lib
27+
pip install -e ./nbmail
2828
```
2929
-->
3030

3131
## Example Usage
3232

3333
```python
34-
from emailer_lib import (
35-
quarto_json_to_intermediate_email,
36-
IntermediateEmail,
37-
send_intermediate_email_with_gmail,
34+
from nbmail import (
35+
quarto_json_to_email,
36+
Email,
37+
send_email_with_gmail,
3838
)
3939

4040
# Read a Quarto email JSON file
41-
email_struct = quarto_json_to_intermediate_email("email.json")
41+
email_struct = quarto_json_to_email("email.json")
4242

4343
# Preview the email as HTML
4444
email_struct.write_preview_email("preview.html")
4545

4646
# Send the email via Gmail
47-
send_intermediate_email_with_gmail("[email protected]", "your_password", email_struct)
47+
send_email_with_gmail("[email protected]", "your_password", email_struct)
4848
```
4949

5050
## Features
@@ -81,4 +81,4 @@ url = {https://github.com/posit-dev/gt-extras}, version = {0.0.1}
8181
}
8282
``` -->
8383

84-
For more information, see the [docs](https://posit-dev.github.io/email-for-data-science/reference) or [open an issue](https://github.com/posit-dev/email-for-data-science/issues) with questions or suggestions!
84+
For more information, see the [docs](https://posit-dev.github.io/email-for-data-science/reference) or [open an issue](https://github.com/posit-dev/email-for-data-science/issues) with questions or suggestions!

docs/_quarto.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ website:
2929
- orchestrating-tests.qmd
3030

3131
quartodoc:
32-
package: emailer_lib
32+
package: nbmail
3333
dir: reference
3434
title: API Reference
3535
css: reference/_styles-quartodoc.css
@@ -43,31 +43,31 @@ quartodoc:
4343
An email object that in a serializable, previewable format,
4444
optimized for emails with content generated by data scientists.
4545
contents:
46-
- name: IntermediateEmail
46+
- name: Email
4747
children: separate
48-
- name: IntermediateEmail.write_preview_email
49-
- name: IntermediateEmail.write_email_message
50-
- name: IntermediateEmail.preview_send_email
48+
- name: Email.write_preview_email
49+
- name: Email.write_email_message
50+
- name: Email.preview_send_email
5151
- title: Uploading emails
5252
desc: >
53-
Converting emails to IntermediateEmails,
53+
Converting emails to Emails,
5454
at which point they can be previewed, tested, and sent.
5555
contents:
56-
- quarto_json_to_intermediate_email
57-
- mjml_to_intermediate_email
58-
- redmail_to_intermediate_email
59-
- yagmail_to_intermediate_email
56+
- quarto_json_to_email
57+
- mjml_to_email
58+
- redmail_to_email
59+
- yagmail_to_email
6060

6161
- title: Sending
6262
desc: >
6363
Functions to sending emails with different providers.
6464
And a special handy one to bypass the intermediate object if you are sending a quarto email.
6565
contents:
66-
- send_intermediate_email_with_gmail
67-
- send_intermediate_email_with_smtp
68-
- send_intermediate_email_with_redmail
69-
- send_intermediate_email_with_yagmail
70-
- send_intermediate_email_with_mailgun
66+
- send_email_with_gmail
67+
- send_email_with_smtp
68+
- send_email_with_redmail
69+
- send_email_with_yagmail
70+
- send_email_with_mailgun
7171
- send_quarto_email_with_gmail
7272

7373
- title: Utilities
@@ -79,7 +79,7 @@ quartodoc:
7979
- title: MJML Authoring
8080
desc: >
8181
Write responsive emails with MJML
82-
package: emailer_lib
82+
package: nbmail
8383
contents:
8484
- mjml.mjml
8585
- mjml.head

docs/objects.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)