Skip to content

Commit 0ed59b7

Browse files
committed
docs: contributing information in README, new file, touch-ups for Makefile
1 parent bde21d9 commit 0ed59b7

File tree

3 files changed

+120
-3
lines changed

3 files changed

+120
-3
lines changed

CONTRIBUTING.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributing
2+
3+
## Development
4+
5+
### System Requirements
6+
7+
Python 3.8 and above are required.
8+
9+
### Target version(s)
10+
11+
Python 3.8 and above are supported by the SDK.
12+
13+
### Installation and Dependencies
14+
15+
A [`Makefile`](./Makefile) has been included in the project which should make it straightforward to start the project locally. We utilize virtual environments (see [`virtualenv`](https://docs.python.org/3/tutorial/venv.html)) in order to provide isolated development environments for the project. This reduces the risk of invalid or corrupt global packages. It also integrates nicely with Make, which will detect changes in the `requirements-dev.txt` file and update the virtual environment if any occur.
16+
17+
Run `make init` to initialize the project's virtual environment and install all dev dependencies.
18+
19+
### Testing
20+
21+
Run tests with `make test`.
22+
23+
We use `pytest` for our unit testing, making use of `parametrized` to inject cases at scale.
24+
25+
### Integration tests
26+
27+
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.
28+
29+
### Packaging
30+
31+
We publish to the PyPI repository, where you can find this package at [openfeature-sdk](https://pypi.org/project/openfeature-sdk/).
32+
33+
## Pull Request
34+
35+
All contributions to the OpenFeature project are welcome via GitHub pull requests.
36+
37+
To create a new PR, you will need to first fork the GitHub repository and clone upstream.
38+
39+
```bash
40+
git clone https://github.com/open-feature/python-sdk.git openfeature-python-sdk
41+
```
42+
43+
Navigate to the repository folder
44+
45+
```bash
46+
cd openfeature-python-sdk
47+
```
48+
49+
Add your fork as an origin
50+
51+
```bash
52+
git remote add fork https://github.com/YOUR_GITHUB_USERNAME/python-sdk.git
53+
```
54+
55+
Makes sure your development environment is all setup by building and testing
56+
57+
```bash
58+
make
59+
```
60+
61+
To start working on a new feature or bugfix, create a new branch and start working on it.
62+
63+
```bash
64+
git checkout -b feat/NAME_OF_FEATURE
65+
# Make your changes
66+
git commit
67+
git push fork feat/NAME_OF_FEATURE
68+
```
69+
70+
Open a pull request against the main js-sdk repository.
71+
72+
### How to Receive Comments
73+
74+
- If the PR is not ready for review, please mark it as
75+
[`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
76+
- Make sure all required CI checks are clear.
77+
- Submit small, focused PRs addressing a single concern/issue.
78+
- Make sure the PR title reflects the contribution.
79+
- Write a summary that helps understand the change.
80+
- Include usage examples in the summary, where applicable.
81+
82+
### How to Get PRs Merged
83+
84+
A PR is considered to be **ready to merge** when:
85+
86+
- Major feedback is resolved.
87+
- Urgent fix can take exception as long as it has been actively communicated.
88+
89+
Any Maintainer can merge the PR once it is **ready to merge**. Note, that some
90+
PRs may not be merged immediately if the repo is in the process of a release and
91+
the maintainers decided to defer the PR to the next release train.
92+
93+
If a PR has been stuck (e.g. there are lots of debates and people couldn't agree
94+
on each other), the owner should try to get people aligned by:
95+
96+
- Consolidating the perspectives and putting a summary in the PR. It is
97+
recommended to add a link into the PR description, which points to a comment
98+
with a summary in the PR conversation.
99+
- Tagging domain experts (by looking at the change history) in the PR asking
100+
for suggestion.
101+
- Reaching out to more people on the [CNCF OpenFeature Slack channel](https://cloud-native.slack.com/archives/C0344AANLA1).
102+
- Stepping back to see if it makes sense to narrow down the scope of the PR or
103+
split it up.
104+
- If none of the above worked and the PR has been stuck for more than 2 weeks,
105+
the owner should bring it to the OpenFeatures [meeting](README.md#contributing).
106+
107+
## Design Choices
108+
109+
As with other OpenFeature SDKs, python-sdk follows the
110+
[openfeature-specification](https://github.com/open-feature/spec).

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
VENV = . .venv/bin/activate
22

3+
.PHONY: all
4+
all: lint test
5+
6+
.PHONY: init
7+
init: .venv
8+
39
.venv: requirements-dev.txt
410
test -d .venv || python -m virtualenv .venv
511
$(VENV); pip install -Ur requirements-dev.txt
@@ -18,6 +24,3 @@ lint: .venv
1824
clean:
1925
@rm -rf .venv
2026
@find -iname "*.pyc" -delete
21-
22-
.PHONY: all
23-
all: lint test

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ Thanks so much to our contributors.
8383
</a>
8484

8585
Made with [contrib.rocks](https://contrib.rocks).
86+
87+
### Development
88+
89+
If you would like to contribute to the project, please see our [contributing](./CONTRIBUTING.md) documentation!

0 commit comments

Comments
 (0)