Skip to content

Commit cd5bd3f

Browse files
committed
Update reporting tags, code coverage
1 parent b10daa1 commit cd5bd3f

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# postmark-python
22

3-
[![PyPI version](https://badge.fury.io/py/postmark.svg)](https://badge.fury.io/py/postmark)
43
[![Python Versions](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12-blue)](https://www.python.org/)
54
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
65
[![Tests](https://github.com/ActiveCampaign/postmark-python/actions/workflows/tests.yml/badge.svg)](https://github.com/ActiveCampaign/postmark-python/actions/workflows/tests.yml)

postmark/clients/account_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import sys
44
import time
5+
import uuid
56
from typing import Any, Dict, List, Optional, Union
67

78
import httpx
@@ -18,7 +19,6 @@
1819
from postmark.models.signatures import SenderSignatureManager
1920
from postmark.models.templates import AccountTemplateManager
2021

21-
from .. import __version__
2222
from ..exceptions import (
2323
PostmarkException,
2424
RateLimitException,
@@ -75,7 +75,10 @@ def __init__(
7575
"X-Postmark-Account-Token": self.account_token,
7676
"Accept": "application/json",
7777
"Content-Type": "application/json",
78-
"User-Agent": f"Postmark.PY - {__version__} (Python/{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro})",
78+
"X-Postmark-Client": "postmark-python",
79+
"X-Postmark-Client-Version": "0.2",
80+
"X-Postmark-Correlation-Id": str(uuid.uuid4()),
81+
"User-Agent": f"Python/{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
7982
},
8083
verify=self.verify_ssl,
8184
timeout=self.timeout,

postmark/clients/server_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import sys
44
import time
5+
import uuid
56
from typing import Any, Dict, List, Optional, Union
67

78
import httpx
@@ -23,7 +24,6 @@
2324
from postmark.models.templates import TemplateManager
2425
from postmark.models.webhooks import WebhookManager
2526

26-
from .. import __version__
2727
from ..exceptions import (
2828
PostmarkException,
2929
RateLimitException,
@@ -86,7 +86,10 @@ def __init__(
8686
"X-Postmark-Server-Token": self.server_token,
8787
"Accept": "application/json",
8888
"Content-Type": "application/json",
89-
"User-Agent": f"Postmark.PY - {__version__} (Python/{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro})",
89+
"X-Postmark-Client": "postmark-python",
90+
"X-Postmark-Client-Version": "0.2",
91+
"X-Postmark-Correlation-Id": str(uuid.uuid4()),
92+
"User-Agent": f"Python/{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
9093
},
9194
verify=self.verify_ssl,
9295
timeout=self.timeout,

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ ignore_missing_imports = true
5454
skips = ["B101"] # assert statements are fine in tests
5555
exclude_dirs = ["tests"]
5656

57+
[tool.coverage.report]
58+
omit = ["*/enums.py"]
59+
5760
[build-system]
5861
requires = ["poetry-core"]
5962
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)