Copied OpenSearch repository template files.
Signed-off-by: Shephali Mittal <shephalm@amazon.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: 🐛 Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: '[BUG]'
|
||||||
|
labels: 'bug, untriaged'
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**What is the bug?**
|
||||||
|
A clear and concise description of the bug.
|
||||||
|
|
||||||
|
**How can one reproduce the bug?**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**What is the expected behavior?**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**What is your host/environment?**
|
||||||
|
- OS: [e.g. iOS]
|
||||||
|
- Version [e.g. 22]
|
||||||
|
- Plugins
|
||||||
|
|
||||||
|
**Do you have any screenshots?**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Do you have any additional context?**
|
||||||
|
Add any other context about the problem.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
name: 🎆 Feature request
|
||||||
|
about: Request a feature in this project
|
||||||
|
title: '[FEATURE]'
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
**Is your feature request related to a problem?**
|
||||||
|
A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_
|
||||||
|
|
||||||
|
**What solution would you like?**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**What alternatives have you considered?**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Do you have any additional context?**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
name: 💭 Proposal
|
||||||
|
about: Suggest an idea for a specific feature you wish to propose to the community for comment
|
||||||
|
title: '[PROPOSAL]'
|
||||||
|
labels: proposal
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
## What kind of business use case are you trying to solve? What are your requirements?
|
||||||
|
A clear and concise description of the business problem, e.g. _My customers are asking for [...]_
|
||||||
|
|
||||||
|
**What is the problem? What is preventing you from meeting the requirements?**
|
||||||
|
Describe what impact this problem has for lack of a solution.
|
||||||
|
|
||||||
|
**What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?**
|
||||||
|
Describe your proposed solution. It's OK if you don't have one.
|
||||||
|
|
||||||
|
**What are your assumptions or prerequisites?**
|
||||||
|
Describe any assumptions you may be making that would limit the scope of this proposal.
|
||||||
|
|
||||||
|
**What are remaining open questions?**
|
||||||
|
List questions that may need to be answered before proceeding with an implementation.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
contact_links:
|
||||||
|
- name: OpenSearch Community Support
|
||||||
|
url: https://discuss.opendistrocommunity.dev/
|
||||||
|
about: Please ask and answer questions here.
|
||||||
|
- name: AWS/Amazon Security
|
||||||
|
url: https://aws.amazon.com/security/vulnerability-reporting/
|
||||||
|
about: Please report security vulnerabilities here.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
## Overview
|
||||||
|
|
||||||
|
This document explains who the admins are (see below), what they do in this repo, and how they should be doing it. If you're interested in becoming a maintainer, see [MAINTAINERS](MAINTAINERS.md). If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Current Admins
|
||||||
|
|
||||||
|
| Admin | GitHub ID | Affiliation |
|
||||||
|
| -------------------------| --------------------------------------- | ----------- |
|
||||||
|
| Charlotte | [CEHENKLE](https://github.com/CEHENKLE) | Amazon |
|
||||||
|
| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon |
|
||||||
|
|
||||||
|
|
||||||
|
## Admin Responsibilities
|
||||||
|
|
||||||
|
As an admin you own stewartship of the repository and its settings. Admins have [admin-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and protect the repository as follows.
|
||||||
|
|
||||||
|
### Prioritize Security
|
||||||
|
|
||||||
|
Security is your number one priority. Manage security keys and safeguard access to the repository.
|
||||||
|
|
||||||
|
Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details.
|
||||||
|
|
||||||
|
### Enforce Code of Conduct
|
||||||
|
|
||||||
|
Act on [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) violations by revoking access, and blocking malicious actors.
|
||||||
|
|
||||||
|
### Adopt Organizational Best Practices
|
||||||
|
|
||||||
|
Adopt organizational best practices, work in the open, and collaborate with other admins by opening issues before making process changes. Prefer consistency, and avoid diverging from practices in the opensearch-project organization.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project.
|
||||||
|
|
||||||
|
|
||||||
|
**Our open source communities endeavor to:**
|
||||||
|
|
||||||
|
* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
|
||||||
|
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
|
||||||
|
* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated.
|
||||||
|
* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work.
|
||||||
|
|
||||||
|
|
||||||
|
**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:**
|
||||||
|
|
||||||
|
* The use of violent threats, abusive, discriminatory, or derogatory language;
|
||||||
|
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
|
||||||
|
* Posting of sexually explicit or violent content;
|
||||||
|
* The use of sexualized language and unwelcome sexual attention or advances;
|
||||||
|
* Public or private harassment of any kind;
|
||||||
|
* Publishing private information, such as physical or electronic address, without permission;
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a professional setting;
|
||||||
|
* Advocating for or encouraging any of the above behaviors.
|
||||||
|
* Enforcement and Reporting Code of Conduct Issues:
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
||||||
+70
-70
@@ -1,91 +1,91 @@
|
|||||||
# Contributing to the Python Elasticsearch Client
|
- [Contributing to OpenSearch](#contributing-to-opensearch)
|
||||||
|
- [First Things First](#first-things-first)
|
||||||
|
- [Ways to Contribute](#ways-to-contribute)
|
||||||
|
- [Bug Reports](#bug-reports)
|
||||||
|
- [Feature Requests](#feature-requests)
|
||||||
|
- [Contributing Code](#contributing-code)
|
||||||
|
- [Developer Certificate of Origin](#developer-certificate-of-origin)
|
||||||
|
- [Review Process](#review-process)
|
||||||
|
|
||||||
If you have a bugfix or new feature that you would like to contribute to
|
## Contributing to OpenSearch
|
||||||
elasticsearch-py, please find or open an issue about it first. Talk about what
|
|
||||||
you would like to do. It may be that somebody is already working on it, or that
|
|
||||||
there are particular issues that you should know about before implementing the
|
|
||||||
change.
|
|
||||||
|
|
||||||
We enjoy working with contributors to get their code accepted. There are many
|
OpenSearch is a community project that is built and maintained by people just like **you**. We're glad you're interested in helping out. There are several different ways you can do it, but before we talk about that, let's talk about how to get started.
|
||||||
approaches to fixing a problem and it is important to find the best approach
|
|
||||||
before writing too much code.
|
|
||||||
|
|
||||||
## Running Elasticsearch locally
|
## First Things First
|
||||||
|
|
||||||
We've provided a script to start an Elasticsearch cluster of a certain version
|
1. **When in doubt, open an issue** - For almost any type of contribution, the first step is opening an issue. Even if you think you already know what the solution is, writing down a description of the problem you're trying to solve will help everyone get context when they review your pull request. If it's truly a trivial change (e.g. spelling error), you can skip this step -- but as the subject says, when it doubt, [open an issue](issues).
|
||||||
found at `.ci/run-elasticsearch.sh`.
|
|
||||||
|
|
||||||
There are several environment variables that control integration tests:
|
2. **Only submit your own work** (or work you have sufficient rights to submit) - Please make sure that any code or documentation you submit is your work or you have the rights to submit. We respect the intellectual property rights of others, and as part of contributing, we'll ask you to sign your contribution with a "Developer Certificate of Origin" (DCO) that states you have the rights to submit this work and you understand we'll use your contribution. There's more information about this topic in the [DCO section](#developer-certificate-of-origin).
|
||||||
|
|
||||||
- `PYTHON_VERSION`: Version of Python to use, defaults to `3.9`
|
## Ways to Contribute
|
||||||
- `PYTHON_CONNECTION_CLASS`: Connection class to use, defaults to `Urllib3HttpConnection`
|
|
||||||
- `STACK_VERSION`: Version of Elasticsearch to use. These should be
|
|
||||||
the same as tags of `docker.elastic.co/elasticsearch/elasticsearch`
|
|
||||||
such as `8.0.0-SNAPSHOT`, `7.x-SNAPSHOT`, etc. Defaults to the
|
|
||||||
same `*-SNAPSHOT` version as the branch.
|
|
||||||
|
|
||||||
**NOTE: You don't need to run the live integration tests for all changes. If
|
### Bug Reports
|
||||||
you don't have Elasticsearch running locally the integration tests will be skipped.**
|
|
||||||
|
|
||||||
## API Code Generation
|
Ugh! Bugs!
|
||||||
|
|
||||||
All the API methods (any method in `elasticsearch.client` classes decorated
|
A bug is when software behaves in a way that you didn't expect and the developer didn't intend. To help us understand what's going on, we first want to make sure you're working from the latest version.
|
||||||
with `@query_params`) are actually auto-generated from the
|
|
||||||
[rest-api-spec](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api)
|
|
||||||
found in the `Elasticsearch` repository. Any changes to those methods should be
|
|
||||||
done either by submitting a PR to Elasticsearch itself (in case of adding or
|
|
||||||
modifying any of the API methods) or to the [Generate
|
|
||||||
Script](https://github.com/elastic/elasticsearch-py/blob/master/utils/generate_api.py).
|
|
||||||
|
|
||||||
To run the code generation make sure you have pre-requisites installed:
|
Once you've confirmed that the bug still exists in the latest version, you'll want to check to make sure it's not something we already know about on the [open issues GitHub page](issues).
|
||||||
|
|
||||||
* by running `python -m pip install -e '.[develop]'`
|
If you've upgraded to the latest version and you can't find it in our open issues list, then you'll need to tell us how to reproduce it Provide as much information as you can. You may think that the problem lies with your query, when actually it depends on how your data is indexed. The easier it is for us to recreate your problem, the faster it is likely to be fixed.
|
||||||
* having the [elasticsearch](https://github.com/elastic/elasticsearch) repo
|
|
||||||
cloned on the same level as `elasticsearch-py` and switched to appropriate
|
|
||||||
version
|
|
||||||
|
|
||||||
Then you should be able to run the code generation by invoking:
|
### Feature Requests
|
||||||
|
|
||||||
|
If you've thought of a way that OpenSearch could be better, we want to hear about it. We track feature requests using GitHub, so please feel free to open an issue which describes the feature you would like to see, why you need it, and how it should work.
|
||||||
|
|
||||||
|
|
||||||
|
### Contributing Code
|
||||||
|
|
||||||
|
As with other types of contributions, the first step is to [open an issue on GitHub](issues/new/choose). Opening an issue before you make changes makes sure that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. So again, when in doubt, open an issue.
|
||||||
|
|
||||||
|
## Developer Certificate of Origin
|
||||||
|
|
||||||
|
OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE.txt file](LICENSE.txt)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
|
||||||
|
|
||||||
|
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
|
||||||
|
|
||||||
|
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
|
||||||
|
|
||||||
```
|
```
|
||||||
$ python utils/generate-api.py 8.0.0-SNAPSHOT
|
Developer's Certificate of Origin 1.1
|
||||||
|
By making a contribution to this project, I certify that:
|
||||||
|
(a) The contribution was created in whole or in part by me and I
|
||||||
|
have the right to submit it under the open source license
|
||||||
|
indicated in the file; or
|
||||||
|
(b) The contribution is based upon previous work that, to the
|
||||||
|
best of my knowledge, is covered under an appropriate open
|
||||||
|
source license and I have the right under that license to
|
||||||
|
submit that work with modifications, whether created in whole
|
||||||
|
or in part by me, under the same open source license (unless
|
||||||
|
I am permitted to submit under a different license), as
|
||||||
|
Indicated in the file; or
|
||||||
|
(c) The contribution was provided directly to me by some other
|
||||||
|
person who certified (a), (b) or (c) and I have not modified
|
||||||
|
it.
|
||||||
|
(d) I understand and agree that this project and the contribution
|
||||||
|
are public and that a record of the contribution (including
|
||||||
|
all personal information I submit with it, including my
|
||||||
|
sign-off) is maintained indefinitely and may be redistributed
|
||||||
|
consistent with this project or the open source license(s)
|
||||||
|
involved.
|
||||||
|
```
|
||||||
|
|
||||||
|
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
|
||||||
|
|
||||||
|
Each commit must include a DCO which looks like this
|
||||||
|
|
||||||
|
```
|
||||||
|
Signed-off-by: Jane Smith <jane.smith@email.com>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing Code Changes
|
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.
|
||||||
|
|
||||||
The process for contributing to any of the Elasticsearch repositories is similar.
|
## Review Process
|
||||||
|
|
||||||
1. Please make sure you have signed the [Contributor License
|
We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](issues/new/choose) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction.
|
||||||
Agreement](http://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.
|
|
||||||
|
|
||||||
2. Run the linter and test suite to ensure your changes do not break existing code:
|
During the PR process, expect that there will be some back-and-forth. Please try to respond to comments in a timely fashion, and if you don't wish to continue with the PR, let us know. If a PR takes too many iterations for its complexity or size, we may reject it. Additionally, if you stop responding we may close the PR as abandoned. In either case, if you feel this was done in error, please add a comment on the PR.
|
||||||
|
|
||||||
```
|
If we accept the PR, a [maintainer](MAINTAINERS.md) will merge your change and usually take care of backporting it to appropriate branches ourselves.
|
||||||
# Install Nox for task management
|
|
||||||
$ python -m pip install nox
|
|
||||||
|
|
||||||
# Auto-format and lint your changes
|
|
||||||
$ nox -rs format
|
|
||||||
|
|
||||||
# Run the test suite
|
|
||||||
$ nox -rs test
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Rebase your changes.
|
If we reject the PR, we will close the pull request with a comment explaining why. This decision isn't always final: if you feel we have misunderstood your intended change or otherwise think that we should reconsider then please continue the conversation with a comment on the PR and we'll do our best to address any further points you raise.
|
||||||
Update your local repository with the most recent code from the main
|
|
||||||
elasticsearch-py repository, and rebase your branch on top of the latest master
|
|
||||||
branch. We prefer your changes to be squashed into a single commit for easier
|
|
||||||
backporting.
|
|
||||||
|
|
||||||
4. Submit a pull request. Push your local changes to your forked copy of the
|
|
||||||
repository and submit a pull request. In the pull request, describe what your
|
|
||||||
changes do and mention the number of the issue where discussion has taken
|
|
||||||
place, eg “Closes #123″. Please consider adding or modifying tests related to
|
|
||||||
your changes.
|
|
||||||
|
|
||||||
Then sit back and wait. There will probably be a discussion about the pull
|
|
||||||
request and, if any changes are needed, we would love to work with you to get
|
|
||||||
your pull request merged into elasticsearch-py.
|
|
||||||
+26
-1
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
@@ -174,3 +173,29 @@
|
|||||||
incurred by, or claims asserted against, such Contributor by reason
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
of your accepting any such warranty or additional liability.
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
- [Overview](#overview)
|
||||||
|
- [Current Maintainers](#current-maintainers)
|
||||||
|
- [Maintainer Responsibilities](#maintainer-responsibilities)
|
||||||
|
- [Uphold Code of Conduct](#uphold-code-of-conduct)
|
||||||
|
- [Prioritize Security](#prioritize-security)
|
||||||
|
- [Review Pull Requests](#review-pull-requests)
|
||||||
|
- [Triage Open Issues](#triage-open-issues)
|
||||||
|
- [Be Responsive](#be-responsive)
|
||||||
|
- [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo)
|
||||||
|
- [Use Semver](#use-semver)
|
||||||
|
- [Release Frequently](#release-frequently)
|
||||||
|
- [Promote Other Maintainers](#promote-other-maintainers)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Current Maintainers
|
||||||
|
|
||||||
|
| Maintainer | GitHub ID | Affiliation |
|
||||||
|
| ------------------------ | ---------------------------------------------| ----------- |
|
||||||
|
| Rushi Agarwal | [rushiagr](https://github.com/rushiagr) | Amazon |
|
||||||
|
| Shephali Mittal | [Shephalimittal](https://github.com/Shephalimittal) | Amazon |
|
||||||
|
|
||||||
|
## Maintainer Responsibilities
|
||||||
|
|
||||||
|
Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and evolve code as follows.
|
||||||
|
|
||||||
|
### Uphold Code of Conduct
|
||||||
|
|
||||||
|
Model the behavior set forward by the [Code of Conduct](CODE_OF_CONDUCT.md) and raise any violations to other maintainers and admins.
|
||||||
|
|
||||||
|
### Prioritize Security
|
||||||
|
|
||||||
|
Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs.
|
||||||
|
|
||||||
|
Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details.
|
||||||
|
|
||||||
|
### Review Pull Requests
|
||||||
|
|
||||||
|
Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incomming pull requests. Don't let PRs be stale and do your best to be helpful to contributors.
|
||||||
|
|
||||||
|
### Triage Open Issues
|
||||||
|
|
||||||
|
Manage labels, review issues regularly, and triage by labelling them.
|
||||||
|
|
||||||
|
All repositories in this organization have a standard set of labels, including `bug`, `documentation`, `duplicate`, `enhancement`, `good first issue`, `help wanted`, `blocker`, `invalid`, `question`, `wontfix`, and `untriaged`, along with release labels, such as `v1.0.0`, `v1.1.0` and `v2.0.0`, and `backport`.
|
||||||
|
|
||||||
|
Use labels to target an issue or a PR for a given release, add `help wanted` to good issues for new community members, and `blocker` for issues that scare you or need immediate attention. Request for more information from a submitter if an issue is not clear. Create new labels as needed by the project.
|
||||||
|
|
||||||
|
### Be Responsive
|
||||||
|
|
||||||
|
Respond to enhancement requests, and forum posts. Allocate time to reviewing and commenting on issues and conversations as they come in.
|
||||||
|
|
||||||
|
### Maintain Overall Health of the Repo
|
||||||
|
|
||||||
|
Keep the `main` branch at production quality at all times. Backport features as needed. Cut release branches and tags to enable future patches.
|
||||||
|
|
||||||
|
### Use Semver
|
||||||
|
|
||||||
|
Use and enforce [semantic versioning](https://semver.org/) and do not let breaking changes be made outside of major releases.
|
||||||
|
|
||||||
|
### Release Frequently
|
||||||
|
|
||||||
|
Make frequent project releases to the community.
|
||||||
|
|
||||||
|
### Promote Other Maintainers
|
||||||
|
|
||||||
|
Assist, add, and remove [MAINTAINERS](MAINTAINERS.md). Exercise good judgement, and propose high quality contributors to become co-maintainers.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg viewBox="0 0 372 72" height="64" fill="none" xmlns="http://www.w3.org/2000/svg"><style>.a{fill:#005EB8}.b{fill:#003B5C}@media(prefers-color-scheme:dark){.a{fill:#00A3E0}.b{fill:#B9D9EB}}</style><g class="a"><path d="M61.74 26.5a2.26 2.26 0 00-2.27 2.26 33.71 33.71 0 01-33.7 33.71 2.26 2.26 0 100 4.53A38.24 38.24 0 0064 28.76a2.26 2.26 0 00-2.26-2.26zM3.92 17A24.43 24.43 0 00.05 31.9c.86 13.73 13.3 24.14 25.03 23.02 4.6-.45 9.31-4.2 8.9-10.9-.19-2.92-1.62-4.64-3.93-5.96C27.84 36.8 25 36 21.79 35.1c-3.89-1.1-8.4-2.32-11.85-4.87-4.15-3.06-6.99-6.6-6.02-13.23z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M107.78 48.26c3.15-4.49 4.72-10.92 4.72-19.28 0-8.36-1.56-14.77-4.69-19.24C104.7 5.24 100.2 3 94.34 3 88.4 3 83.87 5.23 80.72 9.7 77.57 14.15 76 20.55 76 28.91c0 8.43 1.57 14.9 4.72 19.39 3.15 4.47 7.67 6.7 13.55 6.7 5.86 0 10.36-2.25 13.5-6.74zm-19.94-6.11c-1.46-3.02-2.19-7.4-2.19-13.17 0-5.78.73-10.17 2.2-13.16 1.45-3.02 3.62-4.53 6.49-4.53 5.65 0 8.47 5.9 8.47 17.7 0 11.79-2.85 17.68-8.54 17.68-2.83 0-4.97-1.5-6.43-4.52zM128.2 54c1.28.74 2.66 1 4.31 1 3.53 0 6.4-1.67 8.44-5.24C142.98 46.2 144 41.28 144 35c0-6.36-.99-11.28-2.96-14.76-1.97-3.5-4.7-5.24-8.18-5.24-3.62 0-6.46 2.16-8.36 6h-.5l-1.5-5h-7v55.5h9V55c0-.65-.13-2.85-.5-6h.5a10.06 10.06 0 003.69 5zm-2.3-28.62c.8-1.69 2.09-2.53 3.88-2.53 1.67 0 2.9 1 3.68 2.98.8 2 1.2 5 1.2 9.03 0 8.2-1.6 12.3-4.81 12.3-1.86 0-3.19-.98-4-2.92-.8-1.95-1.2-5.05-1.2-9.3v-1.22c.05-3.9.46-6.67 1.24-8.34zM161.64 55c-4.84 0-8.67-1.7-11.48-5.13-2.78-3.44-4.17-8.3-4.17-14.58 0-6.37 1.26-11.34 3.8-14.92 2.52-3.58 6.04-5.37 10.56-5.37 4.23 0 7.55 1.54 9.99 4.6 2.43 3.05 3.65 7.34 3.65 12.85v5.05h-18.5c.07 3.44.67 5.88 2.01 7.56a6.77 6.77 0 005.57 2.5c3.01 0 6.1-.94 9.25-2.81v7.58c-2.97 1.78-6.53 2.67-10.68 2.67zm-1.35-32.9c-1.33 0-2.42.7-3.27 2.11-.86 1.39-1.4 3.86-1.53 6.79h9.5c-.05-2.82-.55-5.26-1.37-6.72-.8-1.45-1.92-2.18-3.33-2.18zm36.2 8.9v23h9V29.2c0-4.64-.88-8.17-2.63-10.58C201.14 16.2 198.52 15 195 15c-2.08 0-3.9.51-5.44 1.53-1.55 1-2.74 2.68-3.57 4.47h-.5l-1.25-5H177v38h9.5V35.75c0-4.71.17-7.92 1.1-9.9.92-1.99 2.37-2.98 4.36-2.98 1.5 0 2.59.71 3.25 2.15A13.12 13.12 0 01196.5 31z"/></g><g class="b"><path d="M48.08 41a24.43 24.43 0 003.87-14.9c-.86-13.73-13.3-24.14-25.03-23.02-4.6.45-9.31 4.2-8.9 10.9.19 2.92 1.62 4.64 3.93 5.96C24.16 21.2 27 22 30.21 22.9c3.89 1.1 8.4 2.32 11.85 4.87 4.15 3.06 6.99 6.6 6.02 13.23z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M362.5 31v23h9V29c0-4.6-.9-8.09-2.7-10.45-1.8-2.38-4.52-3.55-8.05-3.55-3.83 0-6.9 2.24-8.75 6h-.5c.14-1.94.26-3.05.35-3.86.1-.84.15-1.36.15-2.14V.5h-9V54h9.5V35.5c0-4.15.14-7.22 1-9.42.85-2.22 2.34-3.33 4.46-3.33 2.84 0 4.54 2.63 4.54 8.25zM231.85 51.23c2.43-2.52 3.65-6.14 3.65-10.86 0-2.96-.67-5.59-2-7.9-1.3-2.3-3.63-4.56-6.98-6.77-2.48-1.62-4.22-3.06-5.23-4.33a7.08 7.08 0 01-1.47-4.46c0-1.73.41-3.1 1.23-4.08a4.39 4.39 0 013.58-1.53c1.4 0 2.7.26 3.93.76 1.23.51 2.41 1.09 3.54 1.73l3.15-7.54A21.76 21.76 0 00223.93 3c-4.12 0-7.4 1.27-9.86 3.8-2.43 2.54-3.65 5.98-3.65 10.32 0 2.26.3 4.24.91 5.95.63 1.7 1.51 3.25 2.63 4.63a24.91 24.91 0 005.02 4.3c2.53 1.7 4.34 3.26 5.44 4.66a7.22 7.22 0 011.65 4.6c0 1.71-.47 3.06-1.4 4.05-.92 1-2.29 1.49-4.11 1.49-3.2 0-6.72-1.23-10.56-3.7v9.3c3.13 1.74 6.93 2.6 11.4 2.6 4.56 0 8.04-1.26 10.45-3.77zm9.82-1.36c2.81 3.42 6.64 5.13 11.48 5.13 4.15 0 7.71-.89 10.68-2.67v-7.58c-3.15 1.87-6.24 2.8-9.25 2.8a6.77 6.77 0 01-5.57-2.49c-1.34-1.68-1.94-4.12-2.01-7.56h18.5v-5.05c0-5.51-1.22-9.8-3.65-12.84-2.44-3.07-5.76-4.61-9.99-4.61-4.52 0-8.04 1.79-10.57 5.37-2.53 3.58-3.79 8.55-3.79 14.92 0 6.28 1.4 11.14 4.17 14.58zm6.86-25.66c.85-1.4 1.94-2.11 3.27-2.11 1.41 0 2.52.73 3.33 2.18.82 1.46 1.32 3.9 1.37 6.72H247c.14-2.93.67-5.4 1.53-6.79zM288 54l-1.5-5h-.5c-1.38 2.26-2.7 3.87-4.18 4.72a10.99 10.99 0 01-5.57 1.28 8.17 8.17 0 01-6.8-3.18c-1.63-2.12-2.45-5.07-2.45-8.85 0-4.06 1.12-7.07 3.36-9.02 2.27-1.99 5.65-3.08 10.13-3.29l5.19-.2v-2.77c0-3.6-1.58-5.4-4.73-5.4-2.34 0-5.03.9-8.06 2.7l-3.23-6.36A23.23 23.23 0 01282.25 15c4.13 0 7.34 1.18 9.5 3.53 2.16 2.32 3.25 5.63 3.25 9.92V54h-7zm-7.93-6.2c1.7 0 3.06-.74 4.07-2.24 1.02-1.52 1.54-3.54 1.54-6.05v-3.25l-2.88.14c-2.12.12-3.69.71-4.7 1.8-.97 1.08-1.46 2.7-1.46 4.84 0 3.18 1.14 4.77 3.43 4.77zM318 15.76a14.31 14.31 0 00-3.78-.75 6.1 6.1 0 00-4.13 1.55A10.4 10.4 0 00307 21h-.5l-1.5-5h-7v38h9.46V34c0-3.36.22-5.52 1.4-7.27a5.76 5.76 0 015.09-2.66c1.02 0 1.91.2 2.55.43l1.5-8.75zM332 55c-4.56 0-8.05-1.52-10.43-4.87-2.38-3.35-3.57-8.27-3.57-14.75 0-6.8 1.12-11.86 3.37-15.2 2.26-3.35 5.65-5.18 10.37-5.18 1.41 0 3.01.36 4.57.78 1.56.41 3.45.94 4.69 1.72l-3.11 7.24c-1.9-1.13-3.58-1.7-5.05-1.7-1.95 0-3.35 1.04-4.23 3.09-.84 2.03-1.27 5.1-1.27 9.18 0 4 .43 6.98 1.27 8.97.85 1.96 2.24 2.94 4.16 2.94 2.3 0 4.68-.8 7.18-2.42v8.1c-2.4 1.5-5.04 2.1-7.95 2.1z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 4.7 KiB |
+26
-152
@@ -1,164 +1,38 @@
|
|||||||
Python Elasticsearch Client
|

|
||||||
===========================
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/v/elasticsearch
|
OpenSearch Python Client
|
||||||
:target: https://pypi.org/project/elasticsearch
|
|
||||||
|
|
||||||
.. image:: https://pepy.tech/badge/elasticsearch
|
- [Welcome!](#welcome)
|
||||||
:target: https://pepy.tech/project/elasticsearch?versions=*
|
- [Project Resources](#project-resources)
|
||||||
|
- [Code of Conduct](#code-of-conduct)
|
||||||
|
- [License](#license)
|
||||||
|
- [Copyright](#copyright)
|
||||||
|
|
||||||
.. image:: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/badge/icon
|
## Welcome!
|
||||||
:target: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master
|
|
||||||
|
|
||||||
.. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat
|
**opensearch-py** is [a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/) of elasticsearch-py licensed under the [Apache v2.0 License](LICENSE.txt). For more information, see [opensearch.org](https://opensearch.org/).
|
||||||
:target: https://elasticsearch-py.readthedocs.io
|
|
||||||
|
|
||||||
Official low-level client for Elasticsearch. Its goal is to provide common
|
## Project Resources
|
||||||
ground for all Elasticsearch-related code in Python; because of this it tries
|
|
||||||
to be opinion-free and very extendable.
|
|
||||||
|
|
||||||
Installation
|
* [Project Website](https://opensearch.org/)
|
||||||
------------
|
* [Downloads](https://opensearch.org/downloads.html).
|
||||||
|
* [Documentation](https://opensearch.org/docs/)
|
||||||
|
* Need help? Try [Forums](https://discuss.opendistrocommunity.dev/)
|
||||||
|
* [Project Principles](https://opensearch.org/#principles)
|
||||||
|
* [Contributing to OpenSearch](CONTRIBUTING.md)
|
||||||
|
* [Maintainer Responsibilities](MAINTAINERS.md)
|
||||||
|
* [Release Management](RELEASING.md)
|
||||||
|
* [Admin Responsibilities](ADMINS.md)
|
||||||
|
* [Security](SECURITY.md)
|
||||||
|
|
||||||
Install the ``elasticsearch`` package with `pip
|
## Code of Conduct
|
||||||
<https://pypi.org/project/elasticsearch>`_::
|
|
||||||
|
|
||||||
$ python -m pip install elasticsearch
|
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [opensource-codeofconduct@amazon.com](mailto:opensource-codeofconduct@amazon.com) with any additional questions or comments.
|
||||||
|
|
||||||
If your application uses async/await in Python you can install with
|
## License
|
||||||
the ``async`` extra::
|
|
||||||
|
|
||||||
$ python -m pip install elasticsearch[async]
|
This project is licensed under the [Apache v2.0 License](LICENSE.txt).
|
||||||
|
|
||||||
Read more about `how to use asyncio with this project <https://elasticsearch-py.readthedocs.io/en/master/async.html>`_.
|
## Copyright
|
||||||
|
|
||||||
|
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
Compatibility
|
|
||||||
-------------
|
|
||||||
|
|
||||||
The library is compatible with all Elasticsearch versions since ``0.90.x`` but you
|
|
||||||
**have to use a matching major version**:
|
|
||||||
|
|
||||||
For **Elasticsearch 7.0** and later, use the major version 7 (``7.x.y``) of the
|
|
||||||
library.
|
|
||||||
|
|
||||||
For **Elasticsearch 6.0** and later, use the major version 6 (``6.x.y``) of the
|
|
||||||
library.
|
|
||||||
|
|
||||||
For **Elasticsearch 5.0** and later, use the major version 5 (``5.x.y``) of the
|
|
||||||
library.
|
|
||||||
|
|
||||||
For **Elasticsearch 2.0** and later, use the major version 2 (``2.x.y``) of the
|
|
||||||
library, and so on.
|
|
||||||
|
|
||||||
The recommended way to set your requirements in your `setup.py` or
|
|
||||||
`requirements.txt` is::
|
|
||||||
|
|
||||||
# Elasticsearch 7.x
|
|
||||||
elasticsearch>=7.0.0,<8.0.0
|
|
||||||
|
|
||||||
# Elasticsearch 6.x
|
|
||||||
elasticsearch>=6.0.0,<7.0.0
|
|
||||||
|
|
||||||
# Elasticsearch 5.x
|
|
||||||
elasticsearch>=5.0.0,<6.0.0
|
|
||||||
|
|
||||||
# Elasticsearch 2.x
|
|
||||||
elasticsearch>=2.0.0,<3.0.0
|
|
||||||
|
|
||||||
If you have a need to have multiple versions installed at the same time older
|
|
||||||
versions are also released as ``elasticsearch2`` and ``elasticsearch5``.
|
|
||||||
|
|
||||||
|
|
||||||
Example use
|
|
||||||
-----------
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> from datetime import datetime
|
|
||||||
>>> from elasticsearch import Elasticsearch
|
|
||||||
|
|
||||||
# by default we connect to localhost:9200
|
|
||||||
>>> es = Elasticsearch()
|
|
||||||
|
|
||||||
# create an index in elasticsearch, ignore status code 400 (index already exists)
|
|
||||||
>>> es.indices.create(index='my-index', ignore=400)
|
|
||||||
{'acknowledged': True, 'shards_acknowledged': True, 'index': 'my-index'}
|
|
||||||
|
|
||||||
# datetimes will be serialized
|
|
||||||
>>> es.index(index="my-index", id=42, body={"any": "data", "timestamp": datetime.now()})
|
|
||||||
{'_index': 'my-index',
|
|
||||||
'_type': '_doc',
|
|
||||||
'_id': '42',
|
|
||||||
'_version': 1,
|
|
||||||
'result': 'created',
|
|
||||||
'_shards': {'total': 2, 'successful': 1, 'failed': 0},
|
|
||||||
'_seq_no': 0,
|
|
||||||
'_primary_term': 1}
|
|
||||||
|
|
||||||
# but not deserialized
|
|
||||||
>>> es.get(index="my-index", id=42)['_source']
|
|
||||||
{'any': 'data', 'timestamp': '2019-05-17T17:28:10.329598'}
|
|
||||||
|
|
||||||
Elastic Cloud (and SSL) use-case:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> from elasticsearch import Elasticsearch
|
|
||||||
>>> es = Elasticsearch(cloud_id="<some_long_cloud_id>", http_auth=('elastic','yourpassword'))
|
|
||||||
>>> es.info()
|
|
||||||
|
|
||||||
Using SSL Context with a self-signed cert use-case:
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
>>> from elasticsearch import Elasticsearch
|
|
||||||
>>> from ssl import create_default_context
|
|
||||||
|
|
||||||
>>> context = create_default_context(cafile="path/to/cafile.pem")
|
|
||||||
>>> es = Elasticsearch("https://elasticsearch.url:port", ssl_context=context, http_auth=('elastic','yourpassword'))
|
|
||||||
>>> es.info()
|
|
||||||
|
|
||||||
|
|
||||||
Features
|
|
||||||
--------
|
|
||||||
|
|
||||||
The client's features include:
|
|
||||||
|
|
||||||
* translating basic Python data types to and from json (datetimes are not
|
|
||||||
decoded for performance reasons)
|
|
||||||
* configurable automatic discovery of cluster nodes
|
|
||||||
* persistent connections
|
|
||||||
* load balancing (with pluggable selection strategy) across all available nodes
|
|
||||||
* failed connection penalization (time based - failed connections won't be
|
|
||||||
retried until a timeout is reached)
|
|
||||||
* support for ssl and http authentication
|
|
||||||
* thread safety
|
|
||||||
* pluggable architecture
|
|
||||||
|
|
||||||
|
|
||||||
Elasticsearch-DSL
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
For a more high level client library with more limited scope, have a look at
|
|
||||||
`elasticsearch-dsl`_ - a more pythonic library sitting on top of
|
|
||||||
``elasticsearch-py``.
|
|
||||||
|
|
||||||
`elasticsearch-dsl`_ provides a more convenient and idiomatic way to write and manipulate
|
|
||||||
`queries`_ by mirroring the terminology and structure of Elasticsearch JSON DSL
|
|
||||||
while exposing the whole range of the DSL from Python
|
|
||||||
either directly using defined classes or a queryset-like expressions.
|
|
||||||
|
|
||||||
It also provides an optional `persistence layer`_ for working with documents as
|
|
||||||
Python objects in an ORM-like fashion: defining mappings, retrieving and saving
|
|
||||||
documents, wrapping the document data in user-defined classes.
|
|
||||||
|
|
||||||
.. _elasticsearch-dsl: https://elasticsearch-dsl.readthedocs.io/
|
|
||||||
.. _queries: https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html
|
|
||||||
.. _persistence layer: https://elasticsearch-dsl.readthedocs.io/en/latest/persistence.html#doctype
|
|
||||||
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
|
|
||||||
Copyright 2021 Elasticsearch B.V. Licensed under the Apache License, Version 2.0.
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
- [Overview](#overview)
|
||||||
|
- [Branching](#branching)
|
||||||
|
- [Release Branching](#release-branching)
|
||||||
|
- [Feature Branches](#feature-branches)
|
||||||
|
- [Release Labels](#release-labels)
|
||||||
|
- [Releasing](#releasing)
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This document explains the release strategy for artifacts in this organization.
|
||||||
|
|
||||||
|
## Branching
|
||||||
|
|
||||||
|
### Release Branching
|
||||||
|
|
||||||
|
Given the current major release of 1.0, projects in this organization maintain the following active branches.
|
||||||
|
|
||||||
|
* **main**: The next _major_ release. This is the branch where all merges take place and code moves fast.
|
||||||
|
* **1.x**: The next _minor_ release. Once a change is merged into `main`, decide whether to backport it to `1.x`.
|
||||||
|
* **1.0**: The _current_ release. In between minor releases, only hotfixes (e.g. security) are backported to `1.0`.
|
||||||
|
|
||||||
|
Label PRs with the next major version label (e.g. `2.0.0`) and merge changes into `main`. Label PRs that you believe need to be backported as `1.x` and `1.0`. Backport PRs by checking out the versioned branch, cherry-pick changes and open a PR against each target backport branch.
|
||||||
|
|
||||||
|
### Feature Branches
|
||||||
|
|
||||||
|
Do not creating branches in the upstream repo, use your fork, for the exception of long lasting feature branches that require active collaboration from multiple developers. Name feature branches `feature/<thing>`. Once the work is merged to `main`, please make sure to delete the feature branch.
|
||||||
|
|
||||||
|
## Release Labels
|
||||||
|
|
||||||
|
Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v2.0.0`, as well as `patch` and `backport`. Use release labels to target an issue or a PR for a given release. See [MAINTAINERS](MAINTAINERS.md#triage-open-issues) for more information on triaging issues.
|
||||||
|
|
||||||
|
## Releasing
|
||||||
|
|
||||||
|
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md).
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.
|
||||||
Reference in New Issue
Block a user