Skip to content

Commit cb626f4

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents ec0c9df + 15ba8b1 commit cb626f4

File tree

6 files changed

+60
-65
lines changed

6 files changed

+60
-65
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
# Define OS and Python versions to use. 3.x is the latest minor version.
2323
matrix:
24-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.x"]
24+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.x"]
2525
os: [ubuntu-latest]
2626

2727
# Sequence of tasks for this job

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ A simple, command line mail merge tool.
2323

2424
## Quickstart
2525
```console
26-
$ pip install mailmerge
26+
$ pipx install mailmerge
27+
$ pipx ensurepath
2728
$ mailmerge
2829
```
2930

@@ -32,12 +33,8 @@ $ mailmerge
3233
## Install
3334
System-wide install.
3435
```console
35-
$ pip install mailmerge
36-
```
37-
38-
System-wide install requiring administrator privileges. Use this if you get a `Permission denied` error.
39-
```console
40-
$ sudo pip install mailmerge
36+
$ pipx install mailmerge
37+
$ pipx ensurepath
4138
```
4239

4340
Fedora package install.
@@ -208,6 +205,7 @@ This example will send progress reports to students. The template uses more of
208205
TO: {{email}}
209206
SUBJECT: EECS 280 Mid-semester Progress Report
210207
FROM: My Self <[email protected]>
208+
REPLY-TO: My Reply Self <[email protected]>
211209
212210
Dear {{name}},
213211

mailmerge/__main__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def main(sample, dry_run, limit, no_limit, resume,
7373
"""
7474
# We need an argument for each command line option. That also means a lot
7575
# of local variables.
76-
# pylint: disable=too-many-arguments, too-many-locals
76+
# pylint: disable=too-many-arguments
77+
# pylint: disable=too-many-positional-arguments
78+
# pylint: disable=too-many-locals
7779

7880
# Convert paths from string to Path objects
7981
# https://github.com/pallets/click/issues/405
@@ -315,8 +317,7 @@ def read_csv_database(database_path):
315317
csvdialect.strict = True
316318
reader = csv.DictReader(database_file, dialect=csvdialect)
317319
try:
318-
for row in reader:
319-
yield row
320+
yield from reader
320321
except csv.Error as err:
321322
raise exceptions.MailmergeError(
322323
f"{database_path}:{reader.line_num}: {err}"

pyproject.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[build-system]
2+
requires = ["setuptools>=64.0.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "mailmerge"
7+
version = "2.2.4"
8+
description = "A simple, command line mail merge tool"
9+
keywords = ["mail merge", "mailmerge", "email"]
10+
authors = [{ email = "[email protected]" }, { name = "Andrew DeOrio" }]
11+
license = {file = "LICENSE"}
12+
readme = "README.md"
13+
requires-python = ">=3.6"
14+
dependencies = [
15+
"click",
16+
"jinja2",
17+
"markdown",
18+
"html5lib"
19+
]
20+
21+
[project.optional-dependencies]
22+
dev = [
23+
"twine",
24+
"tox",
25+
]
26+
test = [
27+
"check-manifest",
28+
"freezegun",
29+
"pycodestyle",
30+
"pydocstyle",
31+
"pylint",
32+
"pytest",
33+
"pytest-cov",
34+
"pytest-mock",
35+
]
36+
37+
[project.scripts]
38+
mailmerge = "mailmerge.__main__:main"
39+
40+
[project.urls]
41+
homepage = "https://github.com/awdeorio/mailmerge/"
42+
43+
[tool.setuptools]
44+
packages = ["mailmerge"]

setup.py

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,5 @@
1-
"""Mailmerge build and install configuration."""
2-
from pathlib import Path
3-
import setuptools
1+
"""Support legacy tools."""
42

3+
from setuptools import setup
54

6-
# Read the contents of README file
7-
PROJECT_DIR = Path(__file__).parent
8-
README = PROJECT_DIR/"README.md"
9-
LONG_DESCRIPTION = README.open(encoding="utf8").read()
10-
11-
12-
setuptools.setup(
13-
name="mailmerge",
14-
description="A simple, command line mail merge tool",
15-
long_description=LONG_DESCRIPTION,
16-
long_description_content_type="text/markdown",
17-
version="2.2.3",
18-
author="Andrew DeOrio",
19-
author_email="[email protected]",
20-
url="https://github.com/awdeorio/mailmerge/",
21-
license="MIT",
22-
packages=["mailmerge"],
23-
keywords=["mail merge", "mailmerge", "email"],
24-
install_requires=[
25-
"click",
26-
"jinja2",
27-
"markdown",
28-
"html5lib"
29-
],
30-
extras_require={
31-
"dev": [
32-
"pdbpp",
33-
"twine",
34-
"tox",
35-
],
36-
"test": [
37-
"check-manifest",
38-
"freezegun",
39-
"pycodestyle",
40-
"pydocstyle",
41-
"pylint",
42-
"pytest",
43-
"pytest-cov",
44-
"pytest-mock",
45-
],
46-
},
47-
python_requires='>=3.6',
48-
entry_points={
49-
"console_scripts": [
50-
"mailmerge = mailmerge.__main__:main",
51-
]
52-
},
53-
)
5+
setup()

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Local host configuration with one Python 3 version
22
[tox]
3-
envlist = py36, py37, py38, py39, py310
3+
envlist = py38, py39, py310, py311, py312
44

55
# GitHub Actions configuration with multiple Python versions
66
# https://github.com/ymyzk/tox-gh-actions#tox-gh-actions-configuration
77
[gh-actions]
88
python =
9-
3.6: py36
10-
3.7: py37
119
3.8: py38
1210
3.9: py39
1311
3.10: py310
12+
3.11: py311
13+
3.12: py312
1414

1515
# Run unit tests
1616
# HACK: Pydocstyle fails to find tests. Invoke a shell to use a glob.

0 commit comments

Comments
 (0)