Skip to content
Open
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "maxim-py"
version = "3.10.2"
version = "3.10.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Patch version bump LGTM; please verify consistency and release prep.

Looks good for a patch release. Suggest verifying there are no stray/mismatched version declarations and that PyPI doesn't already have 3.10.3.

Run this script to validate version consistency and PyPI availability:

Expected:

  • No mismatched version literals.
  • CHANGELOG updated (if you maintain one).
  • Version 3.10.3 not present on PyPI.

Optional: remember to tag the release (e.g., v3.10.3) and update any README badges if applicable. Do you want me to draft a CHANGELOG entry and release checklist?


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Extract version from pyproject.toml"
PYPROJECT_VERSION=$(python - <<'PY'
import tomllib, sys
with open("pyproject.toml","rb") as f:
    data = tomllib.load(f)
print(data["project"]["version"])
PY
)
echo "pyproject version: $PYPROJECT_VERSION"

echo
echo "2) Search for hard-coded version strings in source (e.g., __version__ = 'x.y.z')"
# Exclude common non-source directories
rg -nP --type=py -g '!**/tests/**' -g '!**/venv/**' -g '!**/.venv/**' -g '!**/env/**' -g '!**/dist/**' -g '!**/build/**' \
   -C1 '(__version__|version)\s*=\s*["'\'']\d+\.\d+\.\d+[^\n"'\''"]*["'\'']' || true

echo
echo "3) Flag any mismatches vs pyproject version"
MISMATCHES=$(rg -nP --type=py -g '!**/tests/**' -g '!**/venv/**' -g '!**/.venv/**' -g '!**/env/**' -g '!**/dist/**' -g '!**/build/**' \
   '(?<==\s*["'\''])\d+\.\d+\.\d+[^\n"'\''"]*(?=["'\''])' -o | awk -v v="$PYPROJECT_VERSION" '$0!=v {print}')
if [[ -n "${MISMATCHES}" ]]; then
  echo "Found version literals not equal to pyproject version ($PYPROJECT_VERSION):"
  rg -nP --type=py '(?<==\s*["'\''])\d+\.\d+\.\d+[^\n"'\''"]*(?=["'\''])' -n -C0
  exit 1
else
  echo "No mismatched version literals found."
fi

echo
echo "4) Check CHANGELOG mentions new version (if present)"
if fd -a -H -t f -g 'CHANGELOG*' | grep -q .; then
  fd -a -H -t f -g 'CHANGELOG*' | xargs -I{} rg -n "$PYPROJECT_VERSION" "{}" || {
    echo "Note: CHANGELOG file(s) found but no entry for $PYPROJECT_VERSION."
  }
else
  echo "No CHANGELOG file found. Skipping."
fi

echo
echo "5) Verify PyPI availability for maxim-py:$PYPROJECT_VERSION"
LATEST=$(curl -s https://pypi.org/pypi/maxim-py/json | jq -r '.info.version' || echo "unknown")
echo "PyPI latest: $LATEST"
if curl -s https://pypi.org/pypi/maxim-py/json | jq -r '.releases | keys[]' | grep -qx "$PYPROJECT_VERSION"; then
  echo "Warning: Version $PYPROJECT_VERSION already exists on PyPI. Publishing will fail."
  exit 2
else
  echo "OK: Version $PYPROJECT_VERSION not published on PyPI yet."
fi

Length of output: 1016


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Extract version from pyproject.toml
VERSION=$(python3 - <<'PY'
import tomllib
with open("pyproject.toml","rb") as f:
    print(tomllib.load(f)["project"]["version"])
PY
)
echo "Project version: $VERSION"

# 2) Search for __version__ assignments in Python source
echo
echo "Checking for __version__ assignments"
rg -nP --type py \
   --glob '!**/tests/**' --glob '!**/venv/**' --glob '!**/.venv/**' \
   --glob '!**/env/**' --glob '!**/dist/**' --glob '!**/build/**' \
   "__version__\s*=\s*['\"]\d+\.\d+\.\d+" -n || echo "→ No __version__ assignments found"

# 3) Search for other version literals in Python source
echo
echo "Checking for version = 'x.y.z' assignments"
rg -nP --type py \
   --glob '!**/tests/**' --glob '!**/venv/**' --glob '!**/.venv/**' \
   --glob '!**/env/**' --glob '!**/dist/**' --glob '!**/build/**' \
   "\bversion\s*=\s*['\"]\d+\.\d+\.\d+" -n || echo "→ No version assignments found in Python source"

# 4) Check CHANGELOG for version entry
echo
echo "Checking CHANGELOG files for $VERSION"
if fd -t f -g 'CHANGELOG*' | grep -q .; then
  fd -t f -g 'CHANGELOG*' | xargs -I{} sh -c "echo \"→ {}:\"; rg -n \"$VERSION\" \"{}\" || echo \"   (no entry for $VERSION)\""
else
  echo "→ No CHANGELOG file found; skipping."
fi

# 5) Verify PyPI availability
echo
echo "Checking PyPI for maxim-py version $VERSION"
if curl -s https://pypi.org/pypi/maxim-py/json | jq -r '.releases | keys[]' | grep -qx "$VERSION"; then
  echo "→ Warning: Version $VERSION already exists on PyPI"
else
  echo "→ OK: Version $VERSION not found on PyPI"
fi

Length of output: 1381


Version bump conflicts with existing PyPI release

  • PyPI already lists version 3.10.3 for maxim-py — publishing this bump will fail. Please choose the next available patch (e.g. 3.10.4) or coordinate with the existing release.
  • No CHANGELOG* file detected — add or update your changelog with the new version entry.
  • ✅ No hard-coded __version__ or other version = 'x.y.z' literals found in source.
🤖 Prompt for AI Agents
In pyproject.toml around line 7, the bumped version 3.10.3 conflicts with an
existing PyPI release; update the version to the next available patch (e.g.,
3.10.4) in pyproject.toml, add or update a CHANGELOG.md (or CHANGELOG.rst) with
a new entry for the chosen version including date and summary of changes, and
verify that package metadata and any CI/release workflows are using the updated
version so publishing will succeed without conflicts.

description = "A package that allows you to use the Maxim Python Library to interact with the Maxim Platform."
readme = "README.md"
requires-python = ">=3.9.20"
Expand Down