mindee / devrel

Developer Relations @ Mindee
The Unlicense
5 stars 6 forks source link

Write new Python SDK version processes #47

Closed fharper closed 3 years ago

fharper commented 3 years ago

Write new Python SDK version processes. Examples: tag the new version, update the releases notes, push on PyPI...

fharper commented 3 years ago

GitHub Release

We follow the semantic versioning standard.

  1. Update the version number in  setup.py
  2. Update CHANGELOG.md by adding details about the new version
  3. Commit those changes with the message chg: 🔖 prepare vX.X.X

Draft a new release

  1. Create a new tag with the new version number vX.X.X
  2. Set the release title to the same name
  3. Copy your release notes CHANGELOG.md
  4. Publish the release

Next step is to deploy the package on PyPI.

PyPI

First time setup

You need to add the configuration to be able to publish from your computer, but before that, ensure you have the latest pip version, the building and publishing tools installed:

python -m pip install --upgrade pip
python -m pip install --upgrade build
python -m pip install --upgrade twine

In your home directory, create .pypirc file with this content by replacing <TOKEN> with the proper token information for both sites:

[distutils]
index-servers =
    mindee
    mindee-test

[mindee]
repository = https://upload.pypi.org/legacy/
username = __token__
password = <TOKEN>

[mindee-test]
repository = https://test.pypi.org/legacy/
username = __token__
password = <TOKEN>
fharper commented 3 years ago

PR sent https://github.com/mindee/devrel/pull/69

fharper commented 3 years ago

done https://github.com/mindee/devrel/blob/main/SDKs/SDKs.md#python-sdk-new-release-process