This document outlines the steps needed to create and publish PyGRANSO version 2.0.
-
Run all tests
- Run CPU tests:
python test_cpu.py - Run CUDA tests:
python test_cuda.py(if CUDA available) - Verify all example notebooks run successfully
- Test on both CPU and GPU (if available)
- Run CPU tests:
-
Code formatting
- Ensure all files are formatted with ruff:
ruff format . - Run linting checks:
ruff check . - Fix any critical linting errors
- Ensure all files are formatted with ruff:
-
Memory leak verification
- Test that snapshot memory fixes work correctly
- Monitor memory usage during long optimization runs
- Verify no memory leaks in GPU mode
-
Update version in
pyproject.toml- Change
version = "0.1.0"toversion = "2.0.0"
- Change
-
Update version in
setup.py- Change
version="1.2.0"toversion="2.0.0"
- Change
-
Update
CHANGELOG.md- Add new section for version 2.0.0
- Document all major changes:
- Migration to
uvpackage manager - CUDA and memory fixes
- Snapshot memory leak fixes
- Code formatting improvements
- Updated dependencies (PyTorch 2.8+, NumPy 2.0+ compatibility)
- New test notebooks for CPU/CUDA compatibility
- Migration to
- Include breaking changes (if any)
- Include migration guide (if needed)
-
Update
README.md(if needed)- Update installation instructions if changed
- Update Python version requirement (currently requires >=3.13.7)
- Update any version-specific notes
- Verify all links work
-
Review
pyproject.tomldependencies- Verify all dependency versions are appropriate
- Check if
requires-python = ">=3.13.7"is correct (seems high - verify) - Ensure all dependencies are available on PyPI
- Update
uv.lockif needed:uv lock
-
Test installation
- Test fresh installation:
pip install .oruv pip install -e . - Test installation from source:
pip install git+https://github.com/sun-umn/PyGRANSO.git - Verify all dependencies install correctly
- Test fresh installation:
-
Update documentation
- Review and update docstrings if needed
- Update any version-specific documentation
- Verify examples are up-to-date
-
Create release notes
- Summarize major features and improvements
- List breaking changes (if any)
- Include migration guide for users upgrading from 1.x
-
Commit all changes
git add . git commit -m "Prepare for PyGRANSO 2.0.0 release"
-
Merge to main branch (if on feature branch)
git checkout main git merge rd.uv-upgrade # or your feature branch name -
Verify branch status
- Ensure you're on
mainbranch - Ensure all changes are committed
- Ensure branch is up-to-date with remote
- Ensure you're on
-
Create annotated git tag
git tag -a v2.0.0 -m "PyGRANSO 2.0.0 Release Major changes: - Migration to uv package manager - CUDA and memory leak fixes - Snapshot memory optimization - Code formatting improvements - Updated dependencies and Python 3.13+ support"
-
Push tag to remote
git push origin v2.0.0
-
Push commits to main
git push origin main
- Create GitHub Release
- Go to: https://github.com/sun-umn/PyGRANSO/releases/new
- Select tag:
v2.0.0 - Release title:
PyGRANSO 2.0.0 - Copy content from
CHANGELOG.mdfor version 2.0.0 - Mark as "Latest release" if this is the newest version
- Attach any release assets if needed
-
Build distribution packages
# Using uv uv build # Or using traditional tools python -m build
-
Test installation from built packages
pip install dist/pygranso-2.0.0-py3-none-any.whl --force-reinstall
-
Upload to PyPI (if maintaining PyPI releases)
# Test on TestPyPI first uv publish --publish-url https://test.pypi.org/legacy/ dist/* # Then publish to real PyPI uv publish dist/*
Note: You'll need PyPI credentials configured
-
Verify release
- Check GitHub release page
- Verify tag exists:
git tag -l v2.0.0 - Test installation from GitHub:
pip install git+https://github.com/sun-umn/[email protected] - Test installation from PyPI (if published):
pip install pygranso==2.0.0
-
Update development version
- Update
pyproject.tomltoversion = "2.0.1.dev0"(or next dev version) - Update
setup.pyaccordingly - Commit:
git commit -m "Bump version to 2.0.1.dev0"
- Update
-
Announce release
- Update project website (if applicable)
- Announce on relevant forums/mailing lists
- Update any related documentation sites
- Current branch:
rd.uv-upgrade - Current version in pyproject.toml:
0.1.0(needs update) - Current version in setup.py:
1.2.0(needs update) - Last release:
v1.2.0 - Python requirement:
>=3.13.7(verify this is correct - seems unusually high)
- Python version requirement change (if moving from 3.9+ to 3.13.7+)
- NumPy 2.0 compatibility (Inf import fix)
- Dependency updates may affect users
- Test on Python 3.13.7+ (verify this requirement)
- Test on Python 3.9-3.12 (if still supporting)
- Test CPU-only mode
- Test CUDA mode (if available)
- Test with limited memory BFGS
- Test with full memory BFGS
- Test all example notebooks
-
Python version requirement: Is
>=3.13.7correct? This seems very restrictive. Consider:- What's the minimum Python version that works?
- Should it be
>=3.9or>=3.10? - Update
pyproject.tomlaccordingly
-
Version numbering: Confirm 2.0.0 is appropriate:
- Are there breaking changes that warrant major version bump?
- Or should this be 1.3.0?
-
Dependencies: Review if all dependencies in
pyproject.tomlare necessary:- Some may be optional (e.g.,
wandb,optuna) - Consider making them optional dependencies
- Some may be optional (e.g.,
-
Release assets: Determine if you need to create:
- Source distributions (.tar.gz)
- Wheel files (.whl)
- Documentation archives
Last Updated: 2026-02-13
Prepared for: PyGRANSO 2.0.0 Release