Skip to main content

Sync __version__ in __init__.py with version in pyproject.toml

Project description

sync-version

pytestpythonCode style: blackLicense: MITPyPI version

sync version in pyproject.toml (if pyproject.toml does not have version info, then version in package.json) with version in init.py

Install it

pip install sync-version

# or pip install git+https://github.com/ffreemt/sync-version
# poetry add git+https://github.com/ffreemt/sync-version
# git clone https://github.com/ffreemt/sync-version && cd sync-version

Use it

poetry version prerelease
sync-version  # or python -m sync_version

poetry version patch
sync-version  # or python -m sync_version

# dry-run
sync-version --dry-run

# debug and dry-run
sync-version --debug --dry-run

Typical workflow

poetry version prerelease
# yarn version --new-version 0.1.5ax, for example, if necessary

sync-version  # update __version__ in module_name/__init__.py

git add . && git commit -m "Update ..."
git push

poetry build  # or pdm build
poetry publish  # or pdm publish --no-build or twine upload --skip=existing dist\*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sync-version-0.1.5a1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

sync_version-0.1.5a1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page