Release TasksΒΆ

  1. Setup pypi and testpypi accounts if you do not already have ones. Then put the following into your ~/.pypirc:

    [distutils]
        pypi
        testpypi
    
    [pypi]
    username = your_pypi_name
    password = your_pypi_password
    
    [testpypi]
    repository = https://test.pypi.org/legacy/
    username = your_testpypi_name
    password = your_testpypi_password
    

    Then register your accounts:

    # testpypi
    python3 setup.py register -r https://testpypi.python.org/pypi
    
    # pypi
    python3 setup.py register
    

    To be able to upload to pypi/testpypi without sending your password in plain text, install twine. An upload is then done simply by:

    # testpypi
    twine upload -r testpypi <filenames>
    
    # pypi
    twine upload <filenames> # Be careful!
    

    WARNING: Uploads to pypi are permanent and cannot be updated later! If a wrong file is uploaded, the only fix is to create a new release. Always use testpypi first.

  2. Bump version number:

    • in meson.build

    • in pyproject.toml

    • in docs/conf.py

  3. Regenerate and review the documentation:

    cd docs && make html && cd ..
    firefox docs/_build/html/index.html
    
  4. Install and test the git version that is to be released. In the git repository, do:

    pip install .
    cd docs
    pytest --pyargs scikits.umfpack
    cd ..
    
  5. Create a source distribution tarball, install it and test it:

    pip install build
    python3 -m build
    

    Unpack the source tarball, cd to it, and repeat the previous step.

  6. If OK, merge the version branch.

  7. Upload to testpypi and test:

    python3 -m build
    twine upload -r testpypi dist/scikit_umfpack-<version>.tar.gz
    

    Note: if the upload fails with This filename has previously been used, you should use a different version., just change the version (see step 2) to another value.

    Create a test install using venv:

    python3 -m venv venv
    source venv/bin/activate
    
    python3 -m pip install -U -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre scikit-umfpack
    
    python3 -m pip install pytest
    pytest --pyargs scikits.umfpack
    
    deactivate
    
  8. If OK, tag the version in git & push to github.

  9. Upload to pypi:

    • Check the version numbers (see step 2).

    • Do:

      python3 -m build
      twine upload dist/scikit_umfpack-<version>.tar.gz
      
    • Test:

      python3 -m venv venv
      source venv/bin/activate
      
      python3 -m pip install -U scikit-umfpack
      
      python3 -m pip install pytest
      pytest --pyargs scikits.umfpack
      
      deactivate
      
  10. Update gh-pages:

    pip install --no-build-isolation -e .
    ./docs/do-gh-pages.sh
    git push -f origin gh-pages