Skip to content

Commit 8d49d40

Browse files
committed
chore: exposing version and preparing 0.3.2 release
1 parent a57eb39 commit 8d49d40

File tree

7 files changed

+47
-14
lines changed

7 files changed

+47
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ __pycache__/
88
.idea/
99
.vscode/
1010
tests/__pycache__/
11+
dist/

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [0.3.2](https://github.com/syntasso/kratix-python/compare/v0.3.1...v0.3.2) (2025-11-23)
4+
5+
6+
### Chores
7+
8+
* setting python 3.10 as minimum required version
9+
10+
## [0.3.1](https://github.com/syntasso/kratix-python/compare/v0.3.0...v0.3.1) (2025-11-23)
11+
12+
13+
### Chores
14+
15+
* configuring application for release
16+
* exposing version in the package
17+
18+
319
## [0.3.0](https://github.com/syntasso/kratix-python/compare/v0.2.0...v0.3.0) (2025-10-29)
420

521

RELEASING.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,37 @@
22

33
This document captures the steps for cutting a new version of the SDK and publishing it to PyPI.
44

5-
1. **Prep the repo**
5+
1. **Set up Poetry credentials (one-time per machine)**
6+
```bash
7+
poetry config repositories.testpypi https://test.pypi.org/legacy/
8+
# Use a TestPyPI API token copied from https://test.pypi.org/manage/account/token/
9+
poetry config pypi-token.testpypi <TESTPYPI_API_TOKEN>
10+
# For the main PyPI token (if not already configured)
11+
poetry config pypi-token.pypi <PYPI_API_TOKEN>
12+
```
13+
Alternatively export `POETRY_HTTP_BASIC_TESTPYPI_USERNAME="__token__"` and `POETRY_HTTP_BASIC_TESTPYPI_PASSWORD="<token>"` before publishing.
14+
15+
2. **Prep the repo**
616
- Update `pyproject.toml` with the new version under `[tool.poetry]`.
717
- Add an entry to `CHANGELOG.md` summarising the release and changes.
818
- Commit your work before building artifacts.
919

10-
2. **Run quality checks**
20+
3. **Run quality checks**
1121
```bash
1222
make install # installs dependencies
1323
make fmt && make lint # optional but recommended
1424
make test # run pytest
1525
```
1626

17-
3. **Build distributions**
27+
4. **Build distributions**
1828
```bash
1929
poetry build
2030
ls dist/ # verify the wheel and sdist exist
2131
tar tf dist/kratix-sdk-<version>.tar.gz | head
2232
```
2333
Inspect the contents to ensure only expected files are included.
2434

25-
4. **Publish to TestPyPI (recommended)**
35+
5. **Publish to TestPyPI (recommended)**
2636
```bash
2737
poetry publish --repository testpypi --build
2838
python -m venv /tmp/kratix-sdk-test
@@ -31,15 +41,14 @@ This document captures the steps for cutting a new version of the SDK and publis
3141
```
3242
Run a quick smoke test (`python -c "import kratix_sdk; print(kratix_sdk.__version__)"`) to ensure the build works.
3343

34-
5. **Publish to PyPI**
44+
6. **Publish to PyPI**
3545
```bash
3646
poetry publish --build
3747
git tag v<version>
3848
git push origin main --tags
3949
```
4050
PyPI credentials/API token must be configured in `~/.pypirc` beforehand.
4151

42-
6. **Communicate the release**
52+
7. **Communicate the release**
4353
- Share release notes on the relevant channels.
4454
- Update downstream sample projects if they pin versions.
45-

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# kratix-python
22

3-
You can read library document [here](https://syntasso.github.io/kratix-python).
3+
Library documentation can be found [here](https://syntasso.github.io/kratix-python).
44

55
## Installation
66

kratix_sdk/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from importlib import metadata as importlib_metadata
2+
13
from .status import Status
24
from .resource import Resource
35
from .kratix_sdk import (
@@ -12,6 +14,11 @@
1214
from .promise import Promise
1315
from .types import GroupVersionKind, DestinationSelector
1416

17+
try:
18+
__version__ = importlib_metadata.version("kratix-sdk")
19+
except importlib_metadata.PackageNotFoundError: # pragma: no cover - source tree fallback
20+
__version__ = "0.0.0"
21+
1522
__all__ = [
1623
"Status",
1724
"Resource",
@@ -25,4 +32,5 @@
2532
"get_output_dir",
2633
"get_metadata_dir",
2734
"set_metadata_dir",
35+
"__version__",
2836
]

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "kratix-sdk"
7-
version = "0.3.0"
7+
version = "0.3.2"
88
description = "Kratix SDK for writing Promises workflows"
99
readme = "Readme.md"
1010
authors = ["Syntasso <[email protected]>"]
@@ -20,7 +20,6 @@ classifiers = [
2020
"License :: OSI Approved :: Apache Software License",
2121
"Programming Language :: Python",
2222
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Programming Language :: Python :: 3.12",
@@ -35,7 +34,7 @@ classifiers = [
3534
"Changelog" = "https://github.com/syntasso/kratix-python/blob/main/CHANGELOG.md"
3635

3736
[tool.poetry.dependencies]
38-
python = ">=3.9"
37+
python = ">=3.10"
3938
kubernetes = ">=33.0.0,<35"
4039
PyYAML = ">=6.0.0,<7"
4140

0 commit comments

Comments
 (0)