Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 2.37 KB

pypi_update_guide.md

File metadata and controls

53 lines (31 loc) · 2.37 KB

Deployment and Publishing Guide for Python SDK

Creating and deploying a new package version is easy!

Prerequisites

  1. Ensure you're on the latest master branch

  2. Ensure the master already has an incremented version

  3. (Required if you are manually publishing to PyPI) Ensure you have access to a PyPI account that is a maintainer of scaleapi on PyPI

How to Bump Project Version

Ensure _version.py has an updated project version. If not, please increment the project version, commit and push the changes.

We use semantic versioning. If you are adding a meaningful feature, bump the minor version. If you are fixing a bug, bump the incremental version.

Deployment:

Automated Deployment and Publish with CircleCI:

Our repo already has a publish worklow built into the CircleCI. It's trigerred when there's a new release on GitHub, with a specific version tag.

In order to deploy and publish a new version:

  • Create a new Release on GitHub
  • Create and assign a new tag in the release page with the following template: vX.Y.Z Please make sure X.Y.Z is matching the version in the _version.py.
    • i.e. If the version in _version.py is 2.3.1 then the tag should be v2.3.1
  • Provide release notes by following the Release Notes Template and filling relevant sections to your changes.

(Unpreferred) Manual Deployment and Publish:

Step 1: Run Publish Script

./publish.sh

If you want to run test cases via pytest before publishing, add the optional runtest arg to the script.

You need to set your own test key as SCALE_TEST_API_KEY environment variable before running.

SCALE_TEST_API_KEY="{apikey}|{userid}|test" ./publish.sh runtest

Step 2: Check out the PyPI page to ensure all looks good

https://pypi.org/project/scaleapi/

Step 3: Create a New Release

Create a new release on GitHub with a matching version tag (i.e. v2.0.1). Provide release notes by following the Release Notes Template and filling relevant sections to your changes.