APILinker uses bump-my-version for automated version management.
# Windows
.\bump.ps1 patch # 0.5.0 -> 0.5.1
.\bump.ps1 minor # 0.5.0 -> 0.6.0
.\bump.ps1 major # 0.5.0 -> 1.0.0# Linux/Mac
./bump.sh patch
./bump.sh minor
./bump.sh majorWhen you run a bump command, it automatically:
- ✅ Updates version in 14 files
- ✅ Creates a git commit with message:
Bump version: X.Y.Z -> X.Y.Z+1 - ✅ Creates a git tag:
vX.Y.Z - ✅ Ready to push!
pip install bump-my-versionOr add to development dependencies:
pip install -e ".[dev]"# Windows PowerShell
.\bump.ps1 patch# Linux/Mac
chmod +x bump.sh
./bump.sh minor# Windows - Set UTF-8 encoding first
$env:PYTHONIOENCODING='utf-8'
.\.venv\Scripts\bump-my-version bump patch# Linux/Mac
export PYTHONIOENCODING=utf-8
./.venv/bin/bump-my-version bump minor# Patch release (0.5.0 -> 0.5.1) - Bug fixes
bump-my-version bump patch
# Minor release (0.5.0 -> 0.6.0) - New features, backward compatible
bump-my-version bump minor
# Major release (0.5.0 -> 1.0.0) - Breaking changes
bump-my-version bump majorWhen you run a bump command, it automatically:
-
✅ Updates version in 14 files:
pyproject.tomlapilinker/__init__.pysetup.pyCITATION.cffROADMAP.mdTECHNICAL_DOCUMENTATION.mddocs/sphinx_setup/conf.pyapilinker/core/plugins.pyapilinker/connectors/scientific/crossref.pyapilinker/connectors/scientific/semantic_scholar.pyapilinker/connectors/scientific/orcid.pyapilinker/connectors/general/github.pytests/test_plugins.pyREADME.md(manually update changelog)paper/paper.md(manually update when publishing)
-
✅ Creates a git commit with message:
Bump version: X.Y.Z → X.Y.Z+1 -
✅ Creates a git tag:
vX.Y.Z
# Dry run (see what would change without making changes)
$env:PYTHONIOENCODING='utf-8'
.\.venv\Scripts\bump-my-version bump patch --dry-run --allow-dirty
# Skip git commit
.\.venv\Scripts\bump-my-version bump patch --no-commit
# Skip git tag
.\.venv\Scripts\bump-my-version bump patch --no-tag
# Allow uncommitted changes
.\.venv\Scripts\bump-my-version bump patch --allow-dirty
# Show current version
.\.venv\Scripts\bump-my-version show current_versionThe configuration is in .bumpversion.toml which specifies:
- Current version
- Files to update and their search/replace patterns
- Git commit/tag settings
APILinker follows Semantic Versioning:
- MAJOR (X.0.0): Breaking changes, incompatible API changes
- MINOR (0.X.0): New features, backward compatible
- PATCH (0.0.X): Bug fixes, backward compatible
If you need to manually update version:
- Edit
apilinker/__init__.pyto change__version__ - Run:
bump-my-version bump patch --no-tag --no-commit --new-version X.Y.Z - This will update all files without creating commit/tag
# 1. Make your changes and test
pytest --cov=apilinker --cov-fail-under=80
# 2. Bump version (creates commit and tag)
.\bump.ps1 minor # Windows
# ./bump.sh minor # Linux/Mac
# 3. Update CHANGELOG.md manually
# Add release notes for the new version
# 4. Amend the bump commit to include changelog
git add CHANGELOG.md README.md
git commit --amend --no-edit
# 5. Push with tags (triggers PyPI release via release.yml workflow)
git push origin main --tagsNote: Pushing tags triggers the GitHub Actions release.yml workflow which automatically publishes to PyPI (requires PYPI_API_TOKEN secret in GitHub repository settings).
# On main branch with version 0.5.0
# Found critical bug, need 0.5.1
# 1. Fix the bug
# 2. Bump patch version
bump-my-version bump patch
# 3. Push
git push origin main --tags# Commit or stash your changes first
git status
git commit -am "Your changes"
# Then bump
bump-my-version bump patchCheck that all files listed in .bumpversion.toml exist.
# Check current version in config
bump-my-version show current_version
# Check actual version in code
python -c "import apilinker; print(apilinker.__version__)"
# If they differ, update .bumpversion.toml manuallyIn your GitHub Actions workflow:
- name: Bump version and push tag
run: |
pip install bump-my-version
bump-my-version bump patch
git push origin main --tagsIf you prefer not to use bump-my-version, update version in:
apilinker/__init__.py- This is the source of truth- Run script to sync to other files (or update manually)