@@ -12,20 +12,66 @@ Python 3.9 and above are supported by the SDK.
1212
1313### Installation and Dependencies
1414
15- We use [ Hatch ] ( https://hatch.pypa.io/ ) to manage the project .
15+ We use [ uv ] ( https://github.com/astral-sh/uv ) for fast Python package management and dependency resolution .
1616
17- To install Hatch, just run ` pip install hatch ` .
17+ To install uv, follow the [ installation guide ] ( https://docs.astral.sh/uv/getting-started/installation/ ) .
1818
1919You will also need to set up the ` pre-commit ` hooks.
2020Run ` pre-commit install ` in the root directory of the repository.
21- If you don't have ` pre-commit ` installed, you can install it with ` pip install pre-commit ` .
21+ If you don't have ` pre-commit ` installed, you can install it with ` uv run pip install pre-commit ` .
22+
23+ ### Setup Development Environment
24+
25+ 1 . ** Clone the repository:**
26+ ``` bash
27+ git clone https://github.com/open-feature/python-sdk.git
28+ cd python-sdk
29+ ```
30+
31+ 2 . ** Install dependencies:**
32+ ``` bash
33+ uv sync --extra dev
34+ ```
2235
2336### Testing
2437
25- Run tests with ` hatch run test ` .
38+ Run tests with ` uv run pytest tests ` .
2639
2740We use ` pytest ` for our unit testing, making use of ` parametrized ` to inject cases at scale.
2841
42+ ### Coverage
43+
44+ Run coverage tests with:
45+ ``` bash
46+ uv run coverage run -m pytest tests/
47+ # Generate coverage report
48+ ```
49+
50+ ### End-to-End Tests
51+
52+ Run e2e tests with behave:
53+ ``` bash
54+ # Update git submodules and run behave tests
55+ git submodule update --init --recursive
56+ cp spec/specification/assets/gherkin/* tests/features/
57+ uv run behave tests/features/
58+ rm tests/features/* .feature
59+ ```
60+
61+ ### Code Quality
62+
63+ ** Linting and Formatting:**
64+ ``` bash
65+ uv run ruff check . # Lint code
66+ uv run ruff format . # Format code
67+ ```
68+
69+ ** Type Checking:**
70+ ``` bash
71+ uv run mypy openfeature/
72+ ```
73+
74+
2975### Integration tests
3076
3177These 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.
@@ -59,7 +105,7 @@ git remote add fork https://github.com/YOUR_GITHUB_USERNAME/python-sdk.git
59105Ensure your development environment is all set up by building and testing
60106
61107``` bash
62- hatch run test
108+ uv run pytest tests/
63109```
64110
65111To start working on a new feature or bugfix, create a new branch and start working on it.
0 commit comments