-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update README; client descriptions; add Issue Template, License * chore: add CONTRIBUTING * chore: fix typo * chore: update desc
- Loading branch information
1 parent
03e8d30
commit af30d72
Showing
5 changed files
with
146 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
contact_links: | ||
- name: Join our Discord community 💬 | ||
url: https://flipt.io/discord | ||
about: "Come chat with us! Ask for help, join our software development efforts, or just give us feedback!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: New Language Request | ||
description: Suggest a new language for Flipt Server SDKs | ||
labels: ["new-language"] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this language request! | ||
- type: input | ||
id: language | ||
attributes: | ||
label: Language | ||
description: What language would you like to see a Flipt Server SDK in? | ||
validations: | ||
required: true | ||
|
||
- type: checkboxes | ||
id: willing-to-contribute | ||
attributes: | ||
label: Willing to Implement | ||
options: | ||
- label: I'm willing to help implement the Flipt Server SDK in this language if it's accepted. 🙌 | ||
|
||
- type: checkboxes | ||
id: willing-to-review | ||
attributes: | ||
label: Willing to Review | ||
options: | ||
- label: I'm willing to review contributions to the Flipt Server SDK in this language if it's accepted. | ||
|
||
- type: textarea | ||
id: additional-notes | ||
attributes: | ||
label: Additional Notes | ||
description: Add any other notes about your specific use case or the language request here. | ||
placeholder: | | ||
Examples: | ||
- How you plan to use Flipt in this language | ||
- Documentation on testing frameworks for the language | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## Join the Flipt Community | ||
- [Join our Discord](https://flipt.io/discord) `#sdk-dev` channel to discuss your language request with the Flipt community. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Contributing | ||
|
||
## Issues | ||
|
||
Let us know how we can help! | ||
|
||
* Use a **clear and descriptive title** for the issue to identify the problem. | ||
* Describe the **exact steps** which reproduce the problem in as many details as possible. | ||
* Include the language client you are using and the version. | ||
* Include any **stack traces** with your error | ||
* List versions you are using: Flipt, OS, etc. | ||
|
||
## Code | ||
|
||
It's always best to open a dialogue before investing a lot of time into a fix or new functionality. | ||
|
||
Functionality must meet the design goals and vision for the project to be accepted; we would be happy to discuss how your idea can best fit into the future of Flipt. | ||
|
||
Join our [Discord](https://www.flipt.io/discord) to chat with the team about any feature ideas or open a [Discussion](https://github.com/flipt-io/flipt/discussions) here on GitHub. | ||
|
||
## Adding a New Language Client | ||
|
||
If you would like to add a new language client, please open an issue first to discuss the design and implementation. | ||
|
||
You can open a new issue using the provided issue template: [New Language](https://github.com/flipt-io/flipt-server-sdks/issues/new?labels=new-language&template=new_language.yml) | ||
|
||
You can also look for existing issues with the `new-language` label: <https://github.com/flipt-io/flipt-server-sdks/issues?q=is%3Aissue+is%3Aopen+label%3Anew-language>. | ||
|
||
After the design and implementation have been discussed and agreed upon, please follow the steps below to add the new language client. | ||
|
||
### 1. Create a New Directory | ||
|
||
Create a new directory in the root of the repository with the name `flipt-{language}` (e.g. `flipt-java`). | ||
|
||
### 2. Add the Client | ||
|
||
Add the client code to the new directory. See the existing clients for examples. | ||
|
||
The structure of the client folder should be as follows: | ||
|
||
1. A `README.md` with installation and usage instructions. | ||
2. A `src` directory with the source code for the client (or follow appropriate for the language). | ||
3. A `test` directory with the tests for the client (or follow structure appropriate for the language). | ||
|
||
The client shape should be as follows: | ||
|
||
1. **Variant** method: Should take in a flag key, entity ID, and context. Should return a variant result. Follow language conventions for naming. | ||
2. **Boolean** method: Should take in a flag key, entity ID, and context. Should return a boolean result. Follow language conventions for naming. | ||
3. **Batch** method: Should take in a list of flag keys, entity ID, and context. Should return a list of results. Follow language conventions for naming. | ||
|
||
### 3. Setup Tests | ||
|
||
Feel free to ask the team for help with this step. | ||
|
||
1. Update the `test/main.go` file to include the new client in the list of clients to test. | ||
2. Update `test/main.go` to run the tests for the new client using Dagger. See the existing clients for examples. | ||
3. Ensure the tests pass locally by running `dagger run go run ./test/... --languages={language}` from the root of the repository. Note: You will need to have Docker, Go, and Dagger installed locally to run the tests. | ||
|
||
### 4. Update README | ||
|
||
Update the [README.md](./README.md) to include the new client in the list of clients. Follow the existing clients for examples. | ||
|
||
### 5. Create a PR | ||
|
||
Create a PR with the changes and we will review it as soon as possible. Please add any language specific idioms when it comes to packaging the client. This will allow us to automate and publish the client to the appropriate package manager. | ||
|
||
### Conventional Commits | ||
|
||
We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. Please adhere to this specification when contributing. | ||
|
||
## Legal | ||
|
||
By submitting a Pull Request, you disavow any rights or claims to any changes submitted to this project and assign the copyright of those changes to Flipt Software Inc. | ||
|
||
If you cannot or do not want to reassign those rights (your employment contract for your employer may not allow this), you should not submit a PR. Open an issue and someone else can do the work. | ||
|
||
This is a legal way of saying "If you submit a PR to us, that code becomes ours". 99.9% of the time that's what you intend anyways; we hope it doesn't scare you away from contributing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
# Flipt Server SDKs | ||
|
||
This repository is a monorepo which contains the source code for SDKs in various languages. Each client interacts directly with an upstream server and can perform one of three of the following operations via HTTP: | ||
This repository centralizes the server-side SDKs for [Flipt](https://github.com/flipt-io/flipt). | ||
|
||
These server-side SDKs are responsible for evaluating context and returning the results of the evaluation. Each client interacts directly with an upstream Flipt server and can perform any of the three of the following evaluation operations via HTTP: | ||
|
||
1. [Variant](https://www.flipt.io/docs/reference/evaluation/variant-evaluation) | ||
2. [Boolean](https://www.flipt.io/docs/reference/evaluation/boolean-evaluation) | ||
3. [Batch](https://www.flipt.io/docs/reference/evaluation/batch-evaluation) | ||
|
||
## Language Support | ||
|
||
This list is highly subject to change as our list of clients will grow over time. Currently, we support the following languages: | ||
We are constantly growing our list of clients. Currently, we support the following languages: | ||
|
||
1. [Python](./flipt-python) | ||
2. [NodeJS](./flipt-node) | ||
3. [Java](./flipt-java) | ||
4. [Rust](./flipt-rust) | ||
|
||
Want to see a client in a language we don't support? [Open an issue](https://github.com/flipt-io/flipt-server-sdks/issues/new?assignees=&labels=new-language&projects=&template=new_language.yml) and let us know! | ||
|
||
## Installation | ||
|
||
Please refer to each individual language client's README to see how you can install and use it. | ||
See each client's README for installation and usage instructions. | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING.md](./CONTRIBUTING.md) | ||
|
||
## License | ||
|
||
All code in this repository is licensed under the [MIT License](./LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters