<commit_before># Release process

The release process for the python client involves creating (or updating) a
release branch, updating release tags, and creating distribution packages and
uploading them to pypi.

There are several releases per version:
- snapshot
- a1 (alpha release)
- b1 (beta release)
- final release

Between each release, there is a waiting period of about two weeks for users to
report issues. Typically, there is a single alpha or beta release, but if there
are a higher than expected number of issues there can be multiple releases
(e.g, a2 or b2).

## Automated release

### 1. (Optional) Update submodules

Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.

### 2. Run the release script and send a PR

```
export MINOR_VERSION=x
export PATCH_VERSION=y  # The latest patch version for the minor version. Not required for snapshot.
```
To create a snapshot:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
```
To create an a1 release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
```
To create a b1 release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh
```
To create a stable release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh
```
Checkout the generated local branch (named "automated-release-of-xxx") to
continue with the remaining steps.

### 3. README (not required for snapshots)
<commit_msg>added personal access token instruction<commit_after># Release process

The release process for the python client involves creating (or updating) a
release branch, updating release tags, and creating distribution packages and
uploading them to pypi.

There are several releases per version:
- snapshot
- a1 (alpha release)
- b1 (beta release)
- final release

Between each release, there is a waiting period of about two weeks for users to
report issues. Typically, there is a single alpha or beta release, but if there
are a higher than expected number of issues there can be multiple releases
(e.g, a2 or b2).

## Automated release

### 1. (Optional) Update submodules

Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.

### 2. Run the release script and send a PR
Generate a Github personal access token following instruction
[link](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)

```
export GITHUB_TOKEN=t  # github-personal-access-token
export MINOR_VERSION=x
export PATCH_VERSION=y  # The latest patch version for the minor version. Not required for snapshot.
```
To create a snapshot:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
```
To create an a1 release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
```
To create a b1 release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh
```
To create a stable release:
```
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh
```
Checkout the generated local branch (named "automated-release-of-xxx") to
continue with the remaining steps.

### 3. README (not required for snapshots)

{'fraction_non_alphanumeric': 0.10493827160493827, 'fraction_numerical': 0.011851851851851851, 'mean_word_length': 5.502407704654896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '716043', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1215, 'n_words': 404}