Skip to content

Commit 7b2d1c0

Browse files
authored
Merge branch 'langfuse:main' into main
2 parents aaebde4 + f2d5da4 commit 7b2d1c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4143
-483
lines changed

.github/workflows/release.yml

Lines changed: 439 additions & 10 deletions
Large diffs are not rendered by default.

CLAUDE.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This is the Langfuse Python SDK, a client library for accessing the Langfuse obs
1212
```bash
1313
# Install Poetry plugins (one-time setup)
1414
poetry self add poetry-dotenv-plugin
15-
poetry self add poetry-bumpversion
1615

1716
# Install all dependencies including optional extras
1817
poetry install --all-extras
@@ -50,16 +49,21 @@ poetry run pre-commit run --all-files
5049

5150
### Building and Releasing
5251
```bash
53-
# Build the package
52+
# Build the package locally (for testing)
5453
poetry build
5554

56-
# Run release script (handles versioning, building, tagging, and publishing)
57-
poetry run release
58-
5955
# Generate documentation
6056
poetry run pdoc -o docs/ --docformat google --logo "https://langfuse.com/langfuse_logo.svg" langfuse
6157
```
6258

59+
Releases are automated via GitHub Actions. To release:
60+
1. Go to Actions > "Release Python SDK" workflow
61+
2. Click "Run workflow"
62+
3. Select version bump type (patch/minor/major/prerelease)
63+
4. For prereleases, select the type (alpha/beta/rc)
64+
65+
The workflow handles versioning, building, PyPI publishing (via OIDC), and GitHub release creation.
66+
6367
## Architecture
6468

6569
### Core Components
@@ -112,7 +116,7 @@ Environment variables (defined in `_client/environment_variables.py`):
112116
- `pyproject.toml`: Poetry configuration, dependencies, and tool settings
113117
- `ruff.toml`: Local development linting config (stricter)
114118
- `ci.ruff.toml`: CI linting config (more permissive)
115-
- `langfuse/version.py`: Version string (updated by release script)
119+
- `langfuse/version.py`: Version string (updated by CI release workflow)
116120

117121
## API Generation
118122

CONTRIBUTING.md

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
```
88
poetry self add poetry-dotenv-plugin
9-
poetry self add poetry-bumpversion
109
```
1110

1211
### Install dependencies
@@ -58,34 +57,25 @@ poetry run mypy langfuse --no-error-summary
5857

5958
### Publish release
6059

61-
#### Release script
62-
63-
Make sure you have your PyPi API token setup in your poetry config. If not, you can set it up by running:
64-
65-
```sh
66-
poetry config pypi-token.pypi $your-api-token
67-
```
68-
69-
Run the release script:
70-
71-
```sh
72-
poetry run release
73-
```
74-
75-
#### Manual steps (for prepatch versions)
76-
77-
1. `poetry version patch`
78-
- `poetry version prepatch` for pre-release versions
79-
2. `poetry install`
80-
3. `poetry build`
81-
4. `git commit -am "chore: release v{version}"`
82-
5. `git push`
83-
6. `git tag v{version}`
84-
7. `git push --tags`
85-
8. `poetry publish`
86-
- Create PyPi API token: <https://pypi.org/manage/account/token/>
87-
- Setup: `poetry config pypi-token.pypi your-api-token`
88-
9. Create a release on GitHub with the changelog
60+
Releases are automated via GitHub Actions using PyPI Trusted Publishing (OIDC).
61+
62+
To create a release:
63+
64+
1. Go to [Actions > Release Python SDK](https://github.com/langfuse/langfuse-python/actions/workflows/release.yml)
65+
2. Click "Run workflow"
66+
3. Select the version bump type:
67+
- `patch` - Bug fixes (1.0.0 → 1.0.1)
68+
- `minor` - New features (1.0.0 → 1.1.0)
69+
- `major` - Breaking changes (1.0.0 → 2.0.0)
70+
- `prerelease` - Pre-release versions (1.0.0 → 1.0.0a1)
71+
4. For pre-releases, select the type: `alpha`, `beta`, or `rc`
72+
5. Click "Run workflow"
73+
74+
The workflow will automatically:
75+
- Bump the version in `pyproject.toml` and `langfuse/version.py`
76+
- Build the package
77+
- Publish to PyPI
78+
- Create a git tag and GitHub release with auto-generated release notes
8979

9080
### SDK Reference
9181

0 commit comments

Comments
 (0)