Skip to content

Commit 622b372

Browse files
authored
feat: Add Codspeed benchmark (#244)
1 parent 8e07687 commit 622b372

File tree

7 files changed

+259
-102
lines changed

7 files changed

+259
-102
lines changed

.github/workflows/pull-request.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ jobs:
3030
python-version: ${{ matrix.python-version }}
3131

3232
- name: Install Dependencies
33+
if: ${{ matrix.python-version == '3.8' }}
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt -r requirements-dev-3.8.txt
37+
38+
- name: Install Dependencies
39+
if: ${{ matrix.python-version != '3.8' }}
3340
run: |
3441
python -m pip install --upgrade pip
3542
pip install -r requirements.txt -r requirements-dev.txt
@@ -57,3 +64,10 @@ jobs:
5764
minimum_coverage: 100
5865
fail_below_threshold: true
5966
show_missing: true
67+
68+
- name: Run Benchmarks
69+
if: ${{ matrix.python-version == '3.12' }}
70+
uses: CodSpeedHQ/action@v3
71+
with:
72+
token: ${{ secrets.CODSPEED_TOKEN }}
73+
run: pytest --codspeed

flag_engine/identities/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class IdentityModel(BaseModel):
4747

4848
dashboard_alias: typing.Optional[str] = None
4949

50-
@computed_field # type: ignore[misc]
50+
@computed_field # type: ignore[prop-decorator]
5151
@property
5252
def composite_key(self) -> str:
5353
return self.generate_composite_key(self.environment_api_key, self.identifier)

requirements-dev-3.8.txt

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements-dev.in --constraints requirements.txt -o requirements-dev.txt --python-version 3.8
3+
absolufy-imports==0.3.1
4+
# via -r requirements-dev.in
5+
annotated-types==0.5.0
6+
# via
7+
# -c requirements.txt
8+
# pydantic
9+
argcomplete==3.6.2
10+
# via datamodel-code-generator
11+
black==24.8.0
12+
# via
13+
# -r requirements-dev.in
14+
# datamodel-code-generator
15+
build==1.2.2.post1
16+
# via pip-tools
17+
cffi==1.17.1
18+
# via pytest-codspeed
19+
click==8.1.8
20+
# via
21+
# black
22+
# pip-tools
23+
coverage==7.6.1
24+
# via pytest-cov
25+
datamodel-code-generator==0.27.3
26+
# via -r requirements-dev.in
27+
exceptiongroup==1.3.0
28+
# via pytest
29+
filelock==3.16.1
30+
# via pytest-codspeed
31+
flake8==5.0.4
32+
# via -r requirements-dev.in
33+
genson==1.3.0
34+
# via datamodel-code-generator
35+
importlib-metadata==8.5.0
36+
# via build
37+
inflect==5.6.2
38+
# via datamodel-code-generator
39+
iniconfig==2.1.0
40+
# via pytest
41+
isort==5.13.2
42+
# via
43+
# -r requirements-dev.in
44+
# datamodel-code-generator
45+
jinja2==3.1.6
46+
# via datamodel-code-generator
47+
markupsafe==2.1.5
48+
# via jinja2
49+
mccabe==0.7.0
50+
# via flake8
51+
mypy==1.14.1
52+
# via -r requirements-dev.in
53+
mypy-extensions==1.1.0
54+
# via
55+
# black
56+
# mypy
57+
packaging==25.0
58+
# via
59+
# black
60+
# build
61+
# datamodel-code-generator
62+
# pytest
63+
pathspec==0.12.1
64+
# via black
65+
pip==25.0.1
66+
# via pip-tools
67+
pip-tools==7.5.0
68+
# via -r requirements-dev.in
69+
platformdirs==4.3.6
70+
# via black
71+
pluggy==1.5.0
72+
# via pytest
73+
pycodestyle==2.9.1
74+
# via flake8
75+
pycparser==2.22
76+
# via cffi
77+
pydantic==2.4.0
78+
# via
79+
# -c requirements.txt
80+
# datamodel-code-generator
81+
pydantic-core==2.10.0
82+
# via
83+
# -c requirements.txt
84+
# pydantic
85+
pyflakes==2.5.0
86+
# via flake8
87+
pyproject-hooks==1.2.0
88+
# via
89+
# build
90+
# pip-tools
91+
pytest==8.3.5
92+
# via
93+
# -r requirements-dev.in
94+
# pytest-codspeed
95+
# pytest-cov
96+
# pytest-lazy-fixtures
97+
# pytest-mock
98+
pytest-codspeed==2.2.1
99+
# via -r requirements-dev.in
100+
pytest-cov==5.0.0
101+
# via -r requirements-dev.in
102+
pytest-lazy-fixtures==1.3.4
103+
# via -r requirements-dev.in
104+
pytest-mock==3.14.1
105+
# via -r requirements-dev.in
106+
pyyaml==6.0.2
107+
# via datamodel-code-generator
108+
setuptools==75.3.2
109+
# via pip-tools
110+
tomli==2.2.1
111+
# via
112+
# black
113+
# build
114+
# coverage
115+
# datamodel-code-generator
116+
# mypy
117+
# pip-tools
118+
# pytest
119+
types-setuptools==75.8.0.20250110
120+
# via -r requirements-dev.in
121+
typing-extensions==4.8.0
122+
# via
123+
# -c requirements.txt
124+
# annotated-types
125+
# black
126+
# exceptiongroup
127+
# mypy
128+
# pydantic
129+
# pydantic-core
130+
wheel==0.45.1
131+
# via pip-tools
132+
zipp==3.20.2
133+
# via importlib-metadata

requirements-dev.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ pytest
22
black
33
flake8
44
isort
5+
pytest-codspeed
56
pytest-mock
6-
pytest-lazy-fixture
7+
pytest-lazy-fixtures
78
pytest-cov
89
pip-tools
9-
types-pytest-lazy-fixture
1010
types-setuptools
1111
mypy
1212
absolufy-imports

0 commit comments

Comments
 (0)