-
Notifications
You must be signed in to change notification settings - Fork 252
Add contributing guidelines #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
68 changes: 68 additions & 0 deletions
docs/CONTRIBUTING.md
This file contains hidden or 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,68 @@ | ||
| # Contributing | ||
|
|
||
| If you would like to contribute new example apps to the `elasticsearch-labs` repo, we would love to hear from you! | ||
|
|
||
| ## Before you start | ||
|
|
||
| Prior to opening a pull request, please: | ||
| - Create an issue to [discuss the scope of your proposal](https://github.com/elastic/elasticsearch-labs/issues). We are happy to provide guidance to make for a pleasant contribution experience. | ||
| - Sign the [Contributor License Agreement](https://www.elastic.co/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. | ||
|
|
||
| ## Contributing to Python notebooks 📒 | ||
|
|
||
| ### Why | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went with the 5W1H method to break down the list of bulletpoints into more concise chunks. |
||
|
|
||
| * The main goal of this repo is to help people learn about solving various problems with the Elastic Stack using step-by-step interactive guides and specific applications. | ||
| * Remember your target audience: developers who want to try out some technology with Elastic. They may not be familiar with all the technologies. | ||
|
|
||
| ### Where | ||
|
|
||
| * Select a folder under [notebooks](../notebooks/README.md) that matches the category of your notebook. If none of them match, create a new folder. | ||
| * Create a folder under the category for your notebook. | ||
demjened marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### What | ||
|
|
||
| * Add your `.ipynb` file to the folder. | ||
| * The notebook should be self-contained. Avoid cross-linking code, data files, configuration etc. from other folders. | ||
| * We prefer the `kebab-case` file naming convention. | ||
| * Please write simple code and concise documentation, where appropriate. | ||
| * Start with a text cell that summarizes what the notebook will demonstrate. Feel free to use images - sometimes a picture is worth a thousand words. | ||
| * Add a header and description section before each code cell. Explain in simple terms what the code will be doing and what the expected outcome is. | ||
| * When the output of a cell is relevant, preserve it in the notebook. | ||
|
|
||
| ### How | ||
|
|
||
| * We recommend building the notebook in an interactive environment, such as [Google Colab](https://colab.google/). This way you can test all the steps and capture the output. | ||
| * **Never leave any secrets in the code** (API keys, passwords etc). Also avoid hardcoding URLs and IDs that may change from user to user. Instead use environment variables that need to be set by the user while they are running the notebook. | ||
| * Test your notebook end to end before submitting a pull request. | ||
| * Example of a well-formed notebook: [question-answering.ipynb](../notebooks/generative-ai/question-answering.ipynb). | ||
|
|
||
| ## Contributing to example applications 💻 | ||
|
|
||
| ### Why | ||
|
|
||
| * The main goal of this repo is to help people learn about solving various problems with the Elastic Stack using step-by-step interactive guides and specific applications. | ||
| * Remember your target audience: developers who want to try out some technology with Elastic. They may not be familiar with all the technologies. | ||
|
|
||
| ### Where | ||
|
|
||
| * Select a folder under [example-apps](../example-apps/README.md) that matches the category of your applications. If none of them match, create a new folder. | ||
| * Create a folder under the category for your applications. | ||
|
|
||
| ### What | ||
|
|
||
| * Add your app's files to the folder. | ||
| * The app should be self-contained. Avoid cross-linking code, data files, configuration etc. from other folders. | ||
| * Please write simple code and concise documentation, where appropriate. | ||
| * Add a `README.md` file in the root folder of the app: | ||
| * Summarize what the app will demonstrate. Feel free to use images - sometimes a picture is worth a thousand words. | ||
| * List language requirements in the readme file, e.g. "Python 3.6+". | ||
| * List clear instructions for installing and runing the example app in the readme file. This includes | ||
| * Upload sample data files as necessary, or instructions for downloading them from an external source. Consider the license for any datasets. | ||
| * Mention the version of the Elastic Stack that the example was tested with. | ||
|
|
||
| ### How | ||
|
|
||
| * **Never leave any secrets in the code** (API keys, passwords etc). Also avoid hardcoding URLs and IDs that may change from user to user. Instead use environment variables that need to be set by the user while they are running the app. | ||
| * Test your app end to end before submitting a pull request. | ||
| * Example of a well-formed app: [OpenAI-Py](../example-apps/OpenAI-embeddings/OpenAI-Py/README.md). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.