Skip to content

Commit 98c3475

Browse files
committed
initial release please config
Signed-off-by: Michael Beemer <michael.beemer@dynatrace.com>
1 parent 1cef37c commit 98c3475

File tree

7 files changed

+178
-16
lines changed

7 files changed

+178
-16
lines changed

.github/workflows/lint-pr.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,38 @@ on:
1313
- synchronize
1414

1515
permissions:
16-
pull-requests: read
16+
pull-requests: write
1717

1818
jobs:
1919
main:
2020
name: Validate PR title
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: amannn/action-semantic-pull-request@v5
24+
id: lint_pr_title
2425
env:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- uses: marocchino/sticky-pull-request-comment@v2
29+
# When the previous steps fails, the workflow would stop. By adding this
30+
# condition you can continue the execution with the populated error message.
31+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
32+
with:
33+
header: pr-title-lint-error
34+
message: |
35+
Hey there and thank you for opening this pull request! 👋🏼
36+
37+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
38+
39+
Details:
40+
41+
```
42+
${{ steps.lint_pr_title.outputs.error_message }}
43+
```
44+
45+
# Delete a previous comment when the issue has been resolved
46+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
47+
uses: marocchino/sticky-pull-request-comment@v2
48+
with:
49+
header: pr-title-lint-error
50+
delete: true

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Run Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
12+
# Release-please creates a PR that tracks all changes
13+
steps:
14+
- uses: google-github-actions/release-please-action@v3
15+
id: release
16+
with:
17+
command: manifest
18+
token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}}
19+
default-branch: main
20+
signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>"
21+
outputs:
22+
release_created: ${{ steps.release.outputs.releases_created }}
23+
all: ${{ toJSON(steps.release.outputs) }}
24+
paths_released: ${{ steps.release.outputs.paths_released }}
25+
26+
# pypi-release:
27+
# needs: release-please
28+
# runs-on: ubuntu-latest
29+
# if: ${{ needs.release-please.outputs.release_created }}
30+
# environment: release
31+
# permissions:
32+
# # IMPORTANT: this permission is mandatory for trusted publishing to pypi
33+
# id-token: write
34+
# container:
35+
# image: "python:3.12"
36+
37+
# steps:
38+
# - uses: actions/checkout@v4
39+
# with:
40+
# submodules: recursive
41+
42+
# - name: Cache virtualenvironment
43+
# uses: actions/cache@v4
44+
# with:
45+
# path: ~/.venv
46+
# key: ${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
47+
48+
# - name: Upgrade pip
49+
# run: pip install --upgrade pip
50+
51+
# - name: Create and activate Virtualenv
52+
# run: |
53+
# [ ! -d ".venv" ] && python -m venv .venv
54+
# . .venv/bin/activate
55+
56+
# - name: Install dependencies
57+
# run: pip install -r requirements.txt
58+
59+
# - name: Install pypa/build
60+
# run: >-
61+
# python -m
62+
# pip install
63+
# build
64+
# --user
65+
66+
# - name: Build a binary wheel and a source tarball
67+
# run: >-
68+
# python -m
69+
# build
70+
# --sdist
71+
# --wheel
72+
# --outdir dist/
73+
# .
74+
75+
# - name: Publish a Python distribution to PyPI
76+
# uses: pypa/gh-action-pypi-publish@release/v1

.release-please-manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"hooks/openfeature-hooks-opentelemetry": "0.1.0",
3+
"providers/openfeature-provider-flagd": "0.1.0"
4+
}

CONTRIBUTING.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,20 @@ We use `pytest` for our unit testing, making use of `parametrized` to inject cas
2828

2929
These are planned once the SDK has been stabilized and a Flagd provider implemented. At that point, we will utilize the [gherkin integration tests](https://github.com/open-feature/test-harness/blob/main/features/evaluation.feature) to validate against a live, seeded Flagd instance.
3030

31-
### Packaging
32-
33-
We publish to the PyPI repository, where you can find each individual package:
34-
35-
- [openfeature-provider-flagd](https://pypi.org/project/openfeature-provider-flagd/)
36-
- [openfeature-hooks-opentelemetry](https://pypi.org/project/openfeature-hooks-opentelemetry/)
37-
3831
## Pull Request
3932

4033
All contributions to the OpenFeature project are welcome via GitHub pull requests.
4134

4235
To create a new PR, you will need to first fork the GitHub repository and clone upstream.
4336

4437
```bash
45-
git clone https://github.com/open-feature/python-sdk-contrib.git openfeature-python-sdk-contrib
38+
git clone https://github.com/open-feature/python-sdk-contrib.git
4639
```
4740

4841
Navigate to the repository folder
4942

5043
```bash
51-
cd openfeature-python-sdk-contrib
44+
cd python-sdk-contrib
5245
```
5346

5447
Add your fork as an origin

hooks/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# OpenFeature Python Hooks
2+
23
Hooks are a mechanism whereby application developers can add arbitrary behavior to flag evaluation.
3-
They operate similarly to middleware in many web frameworks. Please see the
4-
[spec](https://openfeature.dev/specification/sections/hooks) for more details.
4+
They operate similarly to middleware in many web frameworks.
5+
Please see the [spec](https://openfeature.dev/specification/sections/hooks) for more details.

providers/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# OpenFeature Python Providers
2-
Providers are responsible for performing flag evaluation. They provide an abstraction between the underlying
3-
flag management system and OpenFeature itself. This allows providers to be changed without requiring a major
4-
code refactor. Please see the [spec]("https://github.com/open-feature/spec/blob/main/specification/sections/02-providers.md")
5-
for more details.
2+
3+
Providers are responsible for performing flag evaluation.
4+
They provide an abstraction between the underlying flag management system and OpenFeature itself.
5+
This allows providers to be changed without requiring a major code refactor.
6+
Please see the [spec](https://openfeature.dev/specification/sections/providers) for more details.

release-please-config.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"bootstrap-sha": "1cef37c5d8c7d97ee52a8e6b71f12150063b8503",
3+
"separate-pull-requests": true,
4+
"release-type": "python",
5+
"bump-minor-pre-major": true,
6+
"bump-patch-for-minor-pre-major": true,
7+
"changelog-sections": [
8+
{
9+
"type": "fix",
10+
"section": "🐛 Bug Fixes"
11+
},
12+
{
13+
"type": "feat",
14+
"section": "✨ New Features"
15+
},
16+
{
17+
"type": "chore",
18+
"section": "🧹 Chore"
19+
},
20+
{
21+
"type": "docs",
22+
"section": "📚 Documentation"
23+
},
24+
{
25+
"type": "perf",
26+
"section": "🚀 Performance"
27+
},
28+
{
29+
"type": "build",
30+
"hidden": true,
31+
"section": "🛠️ Build"
32+
},
33+
{
34+
"type": "deps",
35+
"section": "📦 Dependencies"
36+
},
37+
{
38+
"type": "ci",
39+
"hidden": true,
40+
"section": "🚦 CI"
41+
},
42+
{
43+
"type": "refactor",
44+
"section": "🔄 Refactoring"
45+
},
46+
{
47+
"type": "revert",
48+
"section": "🔙 Reverts"
49+
},
50+
{
51+
"type": "style",
52+
"hidden": true,
53+
"section": "🎨 Styling"
54+
},
55+
{
56+
"type": "test",
57+
"hidden": true,
58+
"section": "🧪 Tests"
59+
}
60+
],
61+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
62+
}

0 commit comments

Comments
 (0)