Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/conventional-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Conventional Commit

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
conventional-commit:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to read PR titles

steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types:
| # mirrors changelog-sections in the /release-please-config.json
chore
ci
deps
docs
feat
fix
perf
refactor
test
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:

env:
tag_name: ${{ github.event.release.tag_name || github.ref_name }}
artifact-name: flagsmith-common-${{ github.event.release.tag_name || github.ref_name }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: 3.12

- name: Install Poetry
run: pipx install poetry

- name: Build Package
run: poetry build

- uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact-name }}
path: dist/

- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.tag_name }}
files: dist/*

publish:
runs-on: ubuntu-latest
needs: build

permissions:
id-token: write # for pypa/gh-action-pypi-publish to authenticate with PyPI

steps:
- uses: actions/download-artifact@v4
with:
name: ${{ env.artifact-name }}
path: dist/

- uses: pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
name: Python Checks and Unit Tests
name: Python Checks and Unit Tests

on:
pull_request:

jobs:
test:
lint-test:
runs-on: ubuntu-latest
name: Python Checks and Unit Tests

steps:
- name: Cloning repo
uses: actions/checkout@v3
strategy:
max-parallel: 2
matrix:
python-version: ["3.11", "3.12"]

- name: Install poetry
run: pipx install poetry
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: 3.12
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: pipx install poetry

- name: Install Dependencies
run: poetry install --with dev
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Please

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write # for googleapis/release-please-action to create release commit
pull-requests: write # for googleapis/release-please-action to create release PR

steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{secrets.RELEASE_PLEASE_GITHUB_TOKEN}}

outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.pyc
.coverage
common.sqlite3
dist/
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ repos:
hooks:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- repo: local
hooks:
- id: python-typecheck
Expand Down
160 changes: 160 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Changelog

<a name="v1.5.2"></a>

## [v1.5.2](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.5.2) - 25 Mar 2025

### What's Changed

- fix: Liveness probe performs database queries by [@khvn26](https://github.com/khvn26) in https://github.com/Flagsmith/flagsmith-common/pull/19

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.5.1...v1.5.2

[Changes][v1.5.2]

<a name="v1.5.1"></a>

## [v1.5.1](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.5.1) - 25 Mar 2025

### What's Changed

- fix: Rule is asserted in `SegmentSerializer` when `segment` is not `None` by [@khvn26](https://github.com/khvn26) in https://github.com/Flagsmith/flagsmith-common/pull/18

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.5.0...v1.5.1

[Changes][v1.5.1]

<a name="v1.5.0"></a>

## [v1.5.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.5.0) - 25 Mar 2025

### What's Changed

- feat: Add `version_of` to rules and conditions serializers by [@zachaysan](https://github.com/zachaysan) in https://github.com/Flagsmith/flagsmith-common/pull/11
- feat: Add healthcheck views + urls, typing, ruff linting, src layout by [@khvn26](https://github.com/khvn26) in https://github.com/Flagsmith/flagsmith-common/pull/13
- feat: Prometheus support, core entrypoint, packaging improvements by [@khvn26](https://github.com/khvn26) and [@rolodato](https://github.com/rolodato) in https://github.com/Flagsmith/flagsmith-common/pull/17
- feat: Add `MANAGE_SEGMENT_OVERRIDES` permission by [@francescolofranco](https://github.com/francescolofranco) in https://github.com/Flagsmith/flagsmith-common/pull/14
- feat: Add Makefile for development setup and installation instructions by [@francescolofranco](https://github.com/francescolofranco) in https://github.com/Flagsmith/flagsmith-common/pull/15
- fix: Clarify change request wording by [@zachaysan](https://github.com/zachaysan) in https://github.com/Flagsmith/flagsmith-common/pull/10
- fix: Handle missing condition by [@zachaysan](https://github.com/zachaysan) in https://github.com/Flagsmith/flagsmith-common/pull/12
- fix: `self_hosted_data` is cached indefinitely by [@khvn26](https://github.com/khvn26) in https://github.com/Flagsmith/flagsmith-common/pull/16

### New Contributors

- [@francescolofranco](https://github.com/francescolofranco) made their first contribution in https://github.com/Flagsmith/flagsmith-common/pull/15
- [@rolodato](https://github.com/rolodato) made their first contribution in https://github.com/Flagsmith/flagsmith-common/pull/17

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.2...v1.5.0

[Changes][v1.5.0]

<a name="v1.4.2"></a>

## [v1.4.2](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.4.2) - 04 Dec 2024

### What's Changed

- fix: segment limit validation versioning by [@matthewelwell](https://github.com/matthewelwell) in https://github.com/Flagsmith/flagsmith-common/pull/9

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.1...v1.4.2

[Changes][v1.4.2]

<a name="v1.4.1"></a>

## [v1.4.1](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.4.1) - 04 Dec 2024

### What's Changed

- fix: segment limit validation versioning by [@matthewelwell](https://github.com/matthewelwell) in https://github.com/Flagsmith/flagsmith-common/pull/8

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.0...v1.4.1

[Changes][v1.4.1]

<a name="v1.4.0"></a>

## [v1.4.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.4.0) - 04 Dec 2024

### What's Changed

- feat(org/permissions): Add org permission constants by [@gagantrivedi](https://github.com/gagantrivedi) in https://github.com/Flagsmith/flagsmith-common/pull/7

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.3.0...v1.4.0

[Changes][v1.4.0]

<a name="v1.3.0"></a>

## [v1.3.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.3.0) - 03 Dec 2024

### What's Changed

- fix: Ensure owning segment matches to parent segment from rule or condition by [@zachaysan](https://github.com/zachaysan) in https://github.com/Flagsmith/flagsmith-common/pull/5

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.2.0...v1.3.0

[Changes][v1.3.0]

<a name="v1.2.0"></a>

## [v1.2.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.2.0) - 05 Nov 2024

### What's Changed

- feat(env/perms): add cr related perms to tag_supported_permissions by [@gagantrivedi](https://github.com/gagantrivedi) in https://github.com/Flagsmith/flagsmith-common/pull/6

### New Contributors

- [@gagantrivedi](https://github.com/gagantrivedi) made their first contribution in https://github.com/Flagsmith/flagsmith-common/pull/6

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.1.0...v1.2.0

[Changes][v1.2.0]

<a name="v1.1.0"></a>

## [v1.1.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.1.0) - 23 Oct 2024

### What's Changed

- chore: add configuration files by [@matthewelwell](https://github.com/matthewelwell) in https://github.com/Flagsmith/flagsmith-common/pull/2
- deps: lock to django 4 by [@matthewelwell](https://github.com/matthewelwell) in https://github.com/Flagsmith/flagsmith-common/pull/3
- feat: Add workflows change request concerns by [@zachaysan](https://github.com/zachaysan) in https://github.com/Flagsmith/flagsmith-common/pull/4

### New Contributors

- [@zachaysan](https://github.com/zachaysan) made their first contribution in https://github.com/Flagsmith/flagsmith-common/pull/4

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/compare/v1.0.0...v1.1.0

[Changes][v1.1.0]

<a name="v1.0.0"></a>

## [v1.0.0](https://github.com/Flagsmith/flagsmith-common/releases/tag/v1.0.0) - 18 Jul 2024

### What's Changed

- feat: add serializers for versioning change requests by [@matthewelwell](https://github.com/matthewelwell) in https://github.com/Flagsmith/flagsmith-common/pull/1

### New Contributors

- [@matthewelwell](https://github.com/matthewelwell) made their first contribution in https://github.com/Flagsmith/flagsmith-common/pull/1

**Full Changelog**: https://github.com/Flagsmith/flagsmith-common/commits/v1.0.0

[Changes][v1.0.0]

[v1.5.2]: https://github.com/Flagsmith/flagsmith-common/compare/v1.5.1...v1.5.2
[v1.5.1]: https://github.com/Flagsmith/flagsmith-common/compare/v1.5.0...v1.5.1
[v1.5.0]: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.2...v1.5.0
[v1.4.2]: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.1...v1.4.2
[v1.4.1]: https://github.com/Flagsmith/flagsmith-common/compare/v1.4.0...v1.4.1
[v1.4.0]: https://github.com/Flagsmith/flagsmith-common/compare/v1.3.0...v1.4.0
[v1.3.0]: https://github.com/Flagsmith/flagsmith-common/compare/v1.2.0...v1.3.0
[v1.2.0]: https://github.com/Flagsmith/flagsmith-common/compare/v1.1.0...v1.2.0
[v1.1.0]: https://github.com/Flagsmith/flagsmith-common/compare/v1.0.0...v1.1.0
[v1.0.0]: https://github.com/Flagsmith/flagsmith-common/tree/v1.0.0

<!-- Generated by https://github.com/rhysd/changelog-from-release v3.7.2 -->
62 changes: 62 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"bootstrap-sha": "77939497c31701d6c1eb49fdbec810134254fb58",
"packages": {
".": {
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"changelog-path": "CHANGELOG.md",
"draft": false,
"include-component-in-tag": false,
"prerelease": false,
"release-type": "python"
}
},
"changelog-sections": [
{
"type": "chore",
"hidden": false,
"section": "Other"
},
{
"type": "ci",
"hidden": false,
"section": "CI"
},
{
"type": "deps",
"hidden": false,
"section": "Dependency Updates"
},
{
"type": "docs",
"hidden": false,
"section": "Docs"
},
{
"type": "feat",
"hidden": false,
"section": "Features"
},
{
"type": "fix",
"hidden": false,
"section": "Bug Fixes"
},
{
"type": "perf",
"hidden": false,
"section": "Performance Improvements"
},
{
"type": "refactor",
"hidden": false,
"section": "Refactoring"
},
{
"type": "test",
"hidden": false,
"section": "Tests"
}
]
}