Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 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
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