Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b5c0eac
docs: Initial version
skupriienko Feb 26, 2025
612f59d
DE-1474: bump version to 0.1.0rc1
skupriienko Feb 26, 2025
837e898
Add setuptools-scm, fix license and add license-files to pyproject.toml
skupriienko Mar 31, 2025
c68bab8
fix: Remove post-release
skupriienko Mar 31, 2025
4555ad4
fix: Adjust setuptools-scm
skupriienko Mar 31, 2025
27cfd1b
fix: Adjust setuptools-scm
skupriienko Mar 31, 2025
89b7151
fix: Adjust setuptools-scm
skupriienko Mar 31, 2025
4067e9c
fix: Adjust setuptools-scm
skupriienko Mar 31, 2025
adb1092
Prepare release 0.1.0rc2
skupriienko Apr 1, 2025
154d654
Prepare release 0.1.0rc3
skupriienko Apr 1, 2025
92ad6cc
ci: Update pre-commit hooks, linting
skupriienko Apr 1, 2025
8e49a3e
ci: linting
skupriienko Apr 1, 2025
2c55a27
ci: Define version_scheme
skupriienko Apr 1, 2025
9b3b30f
ci: Define version_scheme
skupriienko Apr 1, 2025
7b14ef2
ci: Disable token
skupriienko Apr 1, 2025
ebaa4e8
ci: Enable token
skupriienko Apr 1, 2025
f0f6204
ci: Fix token keys
skupriienko Apr 1, 2025
511e233
Minor fix
skupriienko Apr 1, 2025
be2face
ci: Use pr_validation and publish workflows
skupriienko Apr 1, 2025
d27c871
ci: Update TestPyPi publishing
skupriienko Apr 2, 2025
91be76a
ci: Fix TestPyPi publishing
skupriienko Apr 2, 2025
8076122
ci: Improve workflows
skupriienko Apr 2, 2025
8918041
ci: Add python version for pre-commit
skupriienko Apr 2, 2025
af60863
ci: Improve packaging
skupriienko Apr 2, 2025
7726952
ci: Improve packaging
skupriienko Apr 2, 2025
d110761
ci: Improve versioning
skupriienko Apr 2, 2025
9007096
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
11cbab9
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
64c2a91
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
6cbeebf
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
bfaf60f
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
04d72d1
Final changes for 0.1.0 release
skupriienko Apr 2, 2025
ba93a8b
ci: Improve workflow
skupriienko Apr 2, 2025
8951a99
ci: Add py313
skupriienko Apr 7, 2025
99e2a03
docs: Update README
skupriienko Apr 7, 2025
ed3a86c
docs: Update README
skupriienko Apr 7, 2025
f0459a5
ci: Update pre-commit hooks
skupriienko Apr 7, 2025
fcc937b
docs: Fix the package name
skupriienko Apr 9, 2025
26e6cf9
Update README.md (#4)
Jvb182 Apr 9, 2025
0b9d53b
Merge remote-tracking branch 'origin/main' into release/0.1.0
skupriienko Apr 9, 2025
12144c6
docs: Add a link to a full list of supported endpoints
skupriienko Apr 11, 2025
a41fd3a
docs: Add more examples to README; fix the structure
skupriienko Apr 11, 2025
b45820e
docs: Add get_domains_with_filters to examples, fix examples and tests
skupriienko Apr 11, 2025
5425a84
docs: Fix table of content
skupriienko Apr 11, 2025
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
12 changes: 8 additions & 4 deletions .github/workflows/commit_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12' # Specify a Python version explicitly
- uses: pre-commit/[email protected]

test:
Expand All @@ -25,14 +27,15 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# TODO": Enable py313 support when all packages will be available on the conda 'main' channel
python-version: ["3.9", "3.10", "3.11", "3.12"]
#environment: mailgun
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
APIKEY: ${{ secrets.APIKEY }}
DOMAIN: ${{ secrets.DOMAIN }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for setuptools-scm

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -44,5 +47,6 @@ jobs:
run: |
pip install .
conda info

- name: Test package imports
run: python -c "import mailgun"
28 changes: 28 additions & 0 deletions .github/workflows/pr_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Validation

on:
pull_request:
branches: [main]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build package
run: |
pip install build setuptools wheel setuptools-scm
python -m build

- name: Test installation
run: |
pip install dist/*.whl
python -c "from importlib.metadata import version; print(version('mailgun-python'))"
77 changes: 77 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Publish Package

on:
push:
tags: ['v*'] # Triggers on any tag push
release:
types: [published] # Triggers when a GitHub release is published
workflow_dispatch: # Manual trigger

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install build tools
run: pip install build setuptools wheel setuptools-scm twine

- name: Extract version
id: get_version
run: |
# Get clean version from the tag or release
if [[ "${{ github.event_name }}" == "release" ]]; then
# For releases, get the version from the release tag
TAG_NAME="${{ github.event.release.tag_name }}"
else
# For tags, get version from the tag
TAG_NAME="${{ github.ref_name }}"
fi

# Remove 'v' prefix
VERSION=$(echo $TAG_NAME | sed 's/^v//')

# Check if this is a stable version (no rc, alpha, beta, dev, etc.)
if [[ $TAG_NAME =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "IS_STABLE=true" >> $GITHUB_ENV
else
echo "IS_STABLE=false" >> $GITHUB_ENV
fi

echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Build package
run: |
# Force clean version
export SETUPTOOLS_SCM_PRETEND_VERSION=$VERSION
python -m build
twine check dist/*

# Always publish to TestPyPI for all tags and releases
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
skip-existing: true
verbose: true

# Only publish to PyPI for stable GitHub releases (no RC/alpha/beta)
- name: Publish to PyPI
if: github.event_name == 'release' && env.IS_STABLE == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ repos:
exclude: ^tests

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.31.1
rev: 0.32.1
hooks:
- id: check-github-workflows

Expand All @@ -93,7 +93,7 @@ repos:
- --ignore-init-module-imports

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -104,7 +104,7 @@ repos:
exclude: ^tests

- repo: https://github.com/PyCQA/pylint
rev: v3.3.4
rev: v3.3.6
hooks:
- id: pylint
args:
Expand All @@ -114,11 +114,11 @@ repos:
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
args: [--py39-plus, --keep-runtime-typing]

- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: v0.9.6
rev: v0.11.4
hooks:
# Run the linter.
- id: ruff
Expand All @@ -143,12 +143,12 @@ repos:
exclude: ^mailgun/examples/

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.393
rev: v1.1.398
hooks:
- id: pyright

- repo: https://github.com/PyCQA/bandit
rev: 1.8.2
rev: 1.8.3
hooks:
- id: bandit
args: ["-c", "pyproject.toml", "-r", "."]
Expand All @@ -157,7 +157,7 @@ repos:
additional_dependencies: [".[toml]"]

- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.12.4
rev: v1.31.1
hooks:
- id: typos

Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CHANGELOG

We [keep a changelog.](http://keepachangelog.com/)

## Next release

## Version 0.1.0 (2025-04-02) - Public Release

### Added

- CHANGELOG.md

### Technical (internal)

- Initial version

### Tickets closed

- [DE-1453](https://mailgun.atlassian.net/browse/DE-1453) - Define MVP - Support all of the major functionality and Mailgun APIs

### Pull Requests Merged

- [PR_2](https://github.com/mailgun/mailgun-python/pull/2) - JIRA-727: Done ticket title
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"

clean: clean-cov clean-build clean-env clean-pyc clean-test clean-temp clean-other ## remove all build, test, coverage and Python artifacts
clean: clean-cov clean-build clean-pyc clean-test clean-temp clean-other ## remove all build, test, coverage and Python artifacts

clean-cov:
rm -rf .coverage
Expand Down Expand Up @@ -90,7 +90,6 @@ environment: ## handles environment creation
environment-dev: ## Handles environment creation
conda env create -n $(CONDA_ENV_NAME)-dev -y --file environment-dev.yml
conda run --name $(CONDA_ENV_NAME)-dev pip install -e .
$(CONDA_ACTIVATE) $(CONDA_ENV_NAME)-dev

install: clean ## install the package to the active Python's site-packages
pip install .
Expand Down
Loading