Skip to content

Commit 4da22f7

Browse files
authoredMar 31, 2023
docs: add contributing.md (#159)
1 parent bdf478e commit 4da22f7

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
 

‎CONTRIBUTING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributing
2+
3+
## System Requirements
4+
5+
go 1.18+ is recommended.
6+
7+
## Setup workspace
8+
9+
Run the following command to setup the go workspace.
10+
```
11+
make workspace-init
12+
```
13+
14+
sync go.work with current modules
15+
16+
```
17+
make workspace-update
18+
```
19+
20+
## Adding a module
21+
22+
The project provides `makefile` targets for creating [hooks](https://docs.openfeature.dev/docs/reference/concepts/hooks) and [providers](https://docs.openfeature.dev/docs/reference/concepts/provider).
23+
24+
25+
To contibute a new hook, or provider fork this repository and create a new go module, it will then be discoverable by `make workspace-init` and `make workspace-update`.
26+
27+
create and setup new provider directory (requires jq)
28+
```
29+
make MODULE_NAME=NAME new-provider
30+
```
31+
32+
create and setup new hook directory (requires jq)
33+
```
34+
make MODULE_NAME=NAME new-hook
35+
```
36+
37+
[jq documentation](https://stedolan.github.io/jq/download/)
38+
39+
## Documentation
40+
41+
Any published modules must have documentation in their root directory, explaining the basic purpose of the module as well as installation and usage instructions.
42+
Instructions for how to develop a module should also be included (required system dependencies, instructions for testing locally, etc).
43+
44+
## Testing
45+
46+
Any published modules must have reasonable test coverage.
47+
48+
Testing packages provide shared testing functionality across OpenFeature components, avoiding duplication.
49+
50+
To test all go modules
51+
```
52+
make test
53+
```
54+
55+
## Releases
56+
57+
This repo uses _Release Please_ to release packages. Release Please sets up a running PR that tracks all changes for the library components, and maintains the versions according to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), generated when [PRs are merged](https://github.com/amannn/action-semantic-pull-request).
58+
Merging the Release Please PR will create a GitHub release with updated library versions.
59+
60+
## Dependencies
61+
62+
The [GO-SDK](https://github.com/open-feature/go-sdk) should be a _peer dependency_ of your module.
63+

0 commit comments

Comments
 (0)
Please sign in to comment.