Skip to content

Commit d8f8176

Browse files
fix: remove dataclasses from requirements.txt as we only support python 3.8+, update setup.py (#82)
* fix: remove dataclasses from requirements.txt as we only support python 3.8+, update setup.py * fix: formatting with black Signed-off-by: Jonathan Norris <[email protected]> * chore: cleanup example logs --------- Signed-off-by: Jonathan Norris <[email protected]>
1 parent 006900c commit d8f8176

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The DevCycle Python SDK used for feature management.
44

55
This SDK allows your application to interface with the [DevCycle Bucketing API](https://docs.devcycle.com/bucketing-api/#tag/devcycle).
66

7-
## Requirements.
7+
## Requirements
88

99
* Python 3.8+
1010

@@ -13,6 +13,7 @@ This SDK allows your application to interface with the [DevCycle Bucketing API](
1313
```sh
1414
pip install devcycle-python-server-sdk
1515
```
16+
1617
(you may need to run `pip` with root permission: `sudo pip install devcycle-python-server-sdk`)
1718

1819
## Getting Started
@@ -65,45 +66,55 @@ When developing the SDK it is recommended that you have both a 3.8 and 3.12 pyth
6566
### Dependencies
6667

6768
To set up dependencies for local development, run:
68-
```
69+
70+
```bash
6971
pip install -r requirements.test.txt
7072
```
7173

7274
To run the example app against the local version of the API for testing and development, run:
73-
```sh
75+
76+
```bash
7477
pip install --editable .
7578
```
76-
from the top level of the repo (same level as setup.py). Then run the example app as normal.
7779

80+
from the top level of the repo (same level as setup.py). Then run the example app as normal:
81+
82+
```bash
83+
python example/local_bucketing_client_example.py
84+
```
7885

7986
### Linting & Formatting
8087

8188
Linting checks on PRs are run using [ruff](https://github.com/charliermarsh/ruff), and are configured using `.ruff.toml`. To run the linter locally, run this command from the top level of the repo:
82-
```
89+
90+
```bash
8391
ruff check .
8492
```
8593

8694
Ruff can automatically fix simple linting errors (the ones marked with `[*]`). To do so, run:
87-
```
95+
96+
```bash
8897
ruff check . --fix
8998
```
9099

91100
Formatting checks on PRs are done using [black](https://github.com/psf/black). To run the formatter locally, run this command from the top level of the repo:
92101

93-
```
102+
```bash
94103
black .
95104
```
96105

97106
### Unit Tests
98107

99108
To run the unit tests, run:
109+
100110
```bash
101111
pytest
102112
```
103113

104114
### Benchmarks
105115

106116
To run the benchmarks, run:
117+
107118
```bash
108119
pytest --benchmark-only
109120
```
@@ -116,4 +127,4 @@ To generate the protobuf source files run the following from the root of the pro
116127
protoc --proto_path=./protobuf/ --python_out=devcycle_python_sdk/protobuf --pyi_out=devcycle_python_sdk/protobuf variableForUserParams.proto
117128
```
118129

119-
This will rebuild the `variableForUserParams_pb2.py` file. DO NOT edit this file directly.
130+
This will rebuild the `variableForUserParams_pb2.py` file. DO NOT edit this file directly.

pyproject.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ addopts = "--benchmark-skip --showlocals"
55

66
# black options
77
[tool.black]
8-
target-version = ['py37']
8+
target-version = ['py38']
99
extend-exclude = '_pb2\.pyi?$'
1010

1111
# mypy options
@@ -43,20 +43,17 @@ ignore_missing_imports = true
4343
[tool.ruff]
4444
# https://beta.ruff.rs/docs/rules/
4545
select = [
46-
"F", # PyFlakes
47-
"E", # pycodestyle error
48-
"W", # pycodestyle warning
49-
"N", # pep8-naming
50-
"T20", # flake8-print
46+
"F", # PyFlakes
47+
"E", # pycodestyle error
48+
"W", # pycodestyle warning
49+
"N", # pep8-naming
50+
"T20", # flake8-print
5151
"RUF100", # ensure noqa comments actually match an error
5252
]
5353
ignore = [
5454
"E501", # line too long
5555
]
56-
exclude = [
57-
"variableForUserParams_pb2.pyi"
58-
]
56+
exclude = ["variableForUserParams_pb2.pyi"]
5957
[tool.ruff.per-file-ignores]
6058
"__init__.py" = ["F401"]
6159
"variableForUserParams_pb2.py" = ["F821", "N999", "E712"]
62-

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ wasmtime == 23.0.0
55
protobuf >= 4.23.3
66
openfeature-sdk >= 0.7.0
77
launchdarkly-eventsource >= 1.2.0
8-
responses~=0.23.1
9-
dataclasses~=0.6
8+
responses~=0.23.1

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
url="https://github.com/devcycleHQ/python-server-sdk",
2525
keywords=["DevCycle"],
2626
install_requires=REQUIRES,
27+
python_requires=">=3.8",
2728
packages=find_packages(),
2829
package_data={
2930
"": ["VERSION.txt"],

0 commit comments

Comments
 (0)