Skip to content

Preparing an Add on release

Primož Godec edited this page Oct 8, 2021 · 16 revisions

If making release for the first time

  1. Make a PyPI and PyPI Test account if you do not have them yet and ask an administrator for permission to upload on PyPI.

  2. Make sure that you have your usernames and passwords for PyPI stored in the ~/.pypirc file which should look like this:

    [distutils]
    index-servers=
        pypi
        testpypi
    
    [testpypi]
    repository: https://test.pypi.org/legacy/
    username: <your username>
    password: <your password>
    
    [pypi]
    username: <your username>
    password: <your password>
    
  3. Install Twine: pip install twine if you do not have it installed yet.

Release making

  1. Change a version in a setup.py

  2. Build a documentation

    cd doc
    make htmlhelp
    cd ..
    
  3. Run

     python setup.py sdist
     python setup.py bdist_wheel
    
  4. Test release with installing dist/<filename>.tar.gz:

     pip install <path to the addon>/dist/<filenam>.tar.gz
    
  5. Make a release: twine upload dist/<latest tar.gz> dist/<latest .whl>

  6. Make a new tag on the Github:

    git add setup.py
    git commit -m "Release <release number>"
    git push upstream master
    git tag <release number>
    git push upstream --tags
    
  7. For add-ons available at conda-forge: Make a pull request on the appropriate conda-forge repository.

Release for Orange3-Text

  1. Update stable and master from upstream:

    git checkout stable
    git pull upstream stable
    git checkout master
    git pull upstream master
    
  2. Set IS_RELEASED = True in setup.py.

  3. Build a documentation

    cd doc
    make html
    cd ..
    
  4. Run

     python setup.py sdist
     python setup.py bdist_wheel
    
  5. Test release with installing dist/<filename>.tar.gz:

     pip install <path to the addon>/dist/<filenam>.tar.gz
    
  6. Make a release: twine upload dist/<latest tar.gz>

  7. Update the changelog:

    bash scripts/create_changelog.sh
    

    and incorporate the output in the CHANGELOG.md file. Do not forget to update links a the bottom of the file.

  8. Make a new tag on the Github:

    git add setup.py CHANGELOG.md
    git commit -m "Release <release number>"
    git push upstream master
    git tag <release number>
    git push upstream --tags
    
  9. Update the stable branch:

    git checkout stable
    git merge <release number>
    git push upstream stable
    git checkout master
    
  10. Set IS_RELEASED = False and update version (to dev) in setup.py.

  11. Set setup.py to dev version:

    git add setup.py
    git commit -m "Bump version to <development version>"
    git push upstream master
  12. For add-ons available at conda-forge: Make a pull request on the appropriate conda-forge repository. For Text, specifically, the bot automatically creates a PR, which you can merge as a maintainer in a few hours after the upload on PyPi.