Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ae7186b
refact: Improve and refactor client, update and add tests
skupriienko Mar 31, 2026
9c750c2
chore: Improve package management; update changelog
skupriienko Mar 31, 2026
142828a
refact: Improve and refactor client, update and add tests
skupriienko Mar 31, 2026
d1bb937
ci: Update CI workflows; update dependency pinnings
skupriienko Mar 31, 2026
af8826a
refactor(client): Remove legacy logging stuff, update and add tests; …
skupriienko Apr 1, 2026
9ff1484
Move py.typed to the mailjet_rest folder, update security policy file…
skupriienko Apr 1, 2026
2239ad2
ci: Add ruff pre-commit hook
skupriienko Apr 1, 2026
27769d3
style(client): Apply ruff linter & formatter
skupriienko Apr 1, 2026
db6418b
test: Fix side-effects in assertions
skupriienko Apr 1, 2026
6da2627
ci: Fix refurb pre-commit hook
skupriienko Apr 1, 2026
bbc37a1
test: verify TemplateLanguage and Variables serialization (#97)
skupriienko Apr 1, 2026
8659003
refact: Improve and refactor client, update and add tests
skupriienko Apr 1, 2026
cc66c3a
refact: Improve and refactor client, update and add tests
skupriienko Apr 1, 2026
f1de328
refact: Improve and refactor client, update and add tests
skupriienko Apr 2, 2026
174589f
ci: Improve CI workflows
skupriienko Apr 2, 2026
b97acce
ci: Improve CI workflows
skupriienko Apr 2, 2026
0014e2e
ci: Improve CI workflows: add twine to check dist
skupriienko Apr 2, 2026
6e0956d
docs: Update changelog
skupriienko Apr 2, 2026
e559bd7
chore: Add a smoke test example to samples
skupriienko Apr 2, 2026
9e8e230
refactor: implement OWASP security mitigations and robust retries
skupriienko Apr 2, 2026
0de146a
feat: modernize DX with context managers, telemetry, and graceful deg…
skupriienko Apr 9, 2026
cfef939
chore: consolidate tooling with Ruff and add Python 3.14 support
skupriienko Apr 9, 2026
7f48e35
docs: Update changelog
skupriienko Apr 9, 2026
ff75949
style: Apply linters, fix timeout types
skupriienko Apr 9, 2026
55b3fa3
ci: Run unit tests only
skupriienko Apr 9, 2026
22818fb
style: Fix markdown linter errors
skupriienko Apr 9, 2026
df91619
style: Apply linters, fix timeout types
skupriienko Apr 9, 2026
43477f3
refactor: overhaul core architecture for security hardening and resil…
skupriienko Apr 11, 2026
d75bcdf
refactor: Add allowed root domain variable, update tests
skupriienko Apr 11, 2026
9b8ce7c
refactor: Use the class SafeGuard as a single point of guardrails
skupriienko Apr 13, 2026
12a0925
docs: Update docstrings
skupriienko Apr 14, 2026
ed1640f
refactor: optimize core performance, enforce security guardrails, and…
skupriienko Apr 17, 2026
4c0520d
refactor: Use _JSON_HEADERS and _TEXT_HEADERS as MappingProxyType con…
skupriienko Apr 17, 2026
b0d013e
refactor(client): Use cache for dynamic endpoints; override '__dir__'…
skupriienko Apr 22, 2026
a108a6a
fix: Improve guardrails
skupriienko Apr 22, 2026
d3db2a1
Clean up
skupriienko Apr 22, 2026
1333afd
build: Update dependencies
skupriienko Apr 23, 2026
65aca7a
refactor: Restructure client.py
skupriienko Apr 23, 2026
92f53bf
chore: Deprecate obsolete logging utility functions
skupriienko Apr 23, 2026
27463c1
fix: Use cache for endpoints correctly
skupriienko Apr 23, 2026
e79148c
test: Add responses as a dependency, add performance tests
skupriienko Apr 24, 2026
302d3f5
test: Add responses as a dependency, add performance tests
skupriienko Apr 24, 2026
54d202f
refactor: Drop regex matching for version
skupriienko Apr 24, 2026
214da3e
docs: Update the changelog
skupriienko Apr 24, 2026
faa6136
Potential fix for pull request finding 'Unused local variable'
skupriienko Apr 24, 2026
f06236c
test: Update legacy tests
skupriienko Apr 24, 2026
078ec0a
docs: Update readme
skupriienko Apr 24, 2026
0b08a2d
refactor: Use dataclasses with additional parameters
skupriienko Apr 24, 2026
842adef
docs: Update changelog and performance data
skupriienko Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ updates:
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
minor-and-patch:
update-types: [ "minor", "patch" ]
python-packages:
patterns:
- "*"

# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
# Workflow files stored in the default location of `.github/workflows`
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
directory: '/'
schedule:
interval: 'weekly'
31 changes: 22 additions & 9 deletions .github/workflows/commit_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@ name: CI

on:
push:
branches:
- main
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
pre-commit:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12' # Specify a Python version explicitly
python-version: '3.13' # Specify a Python version explicitly
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

test:
name: test py${{ matrix.python-version }} on ${{ matrix.os }}
name: Test py${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -35,19 +36,31 @@ jobs:
MJ_APIKEY_PUBLIC: ${{ secrets.MJ_APIKEY_PUBLIC }}
MJ_APIKEY_PRIVATE: ${{ secrets.MJ_APIKEY_PRIVATE }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Get full history with tags (required for setuptools-scm)
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
- name: Set up Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
with:
python-version: ${{ matrix.python-version }}
channels: defaults
show-channel-urls: true
environment-file: environment.yaml
cache: 'pip' # Drastically speeds up CI by caching pip dependencies

- name: Install the package
- name: Install dependencies and package
run: |
python -m pip install --upgrade pip
pip install .
conda info

- name: Test package imports
run: python -c "import mailjet_rest"

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install pytest

- name: Run Unit & Integration Tests
run: pytest tests/ -v
16 changes: 9 additions & 7 deletions .github/workflows/pr_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR Validation

on:
pull_request:
branches: [main]
branches: [master]

permissions:
contents: read
Expand All @@ -11,21 +11,23 @@ jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.13'

- name: Build package
run: |
pip install --upgrade build setuptools setuptools-scm
pip install --upgrade build setuptools setuptools-scm twine
python -m build
twine check dist/*

- name: Test installation
- name: Test isolated installation
run: |
# Install the built wheel to ensure packaging didn't miss files
pip install dist/*.whl
python -c "from importlib.metadata import version; print(version('mailjet_rest'))"
python -c "import mailjet_rest; from importlib.metadata import version; print(f'Successfully installed v{version(\"mailjet_rest\")}')"
16 changes: 11 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ permissions:

jobs:
publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest

permissions:
id-token: write # Required for trusted publishing
contents: read

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-depth: 0 # MANDATORY: Required for setuptools_scm to read the git tag

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.13'

- name: Install build tools
run: pip install --upgrade build setuptools setuptools-scm twine
Expand Down Expand Up @@ -61,11 +63,15 @@ jobs:
export SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION
python -m build

- name: Check dist
- name: Verify package (check dist)
run: |
ls -alh
twine check dist/*

- name: Verify wheel contents
run: |
unzip -l dist/*.whl

# Always publish to TestPyPI for all tags and releases
# TODO: Enable it later.
# - name: Publish to TestPyPI
Expand Down
Loading
Loading