Fix Eland logo and update contributing documentation

This commit is contained in:
P. Sai Vinay 2020-11-06 21:03:30 +05:30 committed by GitHub
parent 31760fe02c
commit 4e92e3cf62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 217 additions and 96 deletions

View File

@ -1,5 +1,4 @@
Contributing to eland # Contributing to eland
=====================
Eland is an open source project and we love to receive contributions Eland is an open source project and we love to receive contributions
from our community --- you! There are many ways to contribute, from from our community --- you! There are many ways to contribute, from
@ -7,8 +6,7 @@ writing tutorials or blog posts, improving the documentation, submitting
bug reports and feature requests or writing code which can be bug reports and feature requests or writing code which can be
incorporated into eland itself. incorporated into eland itself.
Bug reports ## Bug reports
-----------
If you think you have found a bug in eland, first make sure that you are If you think you have found a bug in eland, first make sure that you are
testing against the [latest version of testing against the [latest version of
@ -29,8 +27,7 @@ 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 indexed. The easier it is for us to recreate your problem, the faster it
is likely to be fixed. is likely to be fixed.
Feature requests ## Feature requests
----------------
If you find yourself wishing for a feature that doesn\'t exist in eland, If you find yourself wishing for a feature that doesn\'t exist in eland,
you are probably not alone. There are bound to be others out there with you are probably not alone. There are bound to be others out there with
@ -40,8 +37,7 @@ list](https://github.com/elastic/eland/issues) on GitHub which describes
the feature you would like to see, why you need it, and how it should the feature you would like to see, why you need it, and how it should
work. work.
Contributing code and documentation changes ## Contributing code and documentation changes
-------------------------------------------
If you have a bugfix or new feature that you would like to contribute to If you have a bugfix or new feature that you would like to contribute to
eland, please find or open an issue about it first. Talk about what you eland, please find or open an issue about it first. Talk about what you
@ -66,7 +62,7 @@ individual projects can be found below.
You will need to fork the main eland code or documentation repository You will need to fork the main eland code or documentation repository
and clone it to your local machine. See [github help and clone it to your local machine. See [github help
page](https://help.github.com/articles/fork-a-repo) for help. page](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) for help.
Further instructions for specific projects are given below. Further instructions for specific projects are given below.
@ -74,22 +70,28 @@ Further instructions for specific projects are given below.
Once your changes and tests are ready to submit for review: Once your changes and tests are ready to submit for review:
1. Test your changes 1. Run the linter and test suite to ensure your changes do not break the existing code:
Run the test suite to make sure that nothing is broken (TODO add (TODO Add link to the testing document)
link to testing doc).
2. Sign the Contributor License Agreement ``` bash
# Run Auto-format, lint, mypy type checker for your changes
$ nox -s format
Please make sure you have signed our [Contributor License # Run the test suite
Agreement](https://www.elastic.co/contributor-agreement/). We are $ pytest --doctest-modules eland/tests/
not asking you to assign copyright to us, but to give us the right $ pytest --nbval eland/tests/tests_notebook/
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.
3. Rebase your changes ```
2. Sign the Contributor License Agreement
Please make sure you have signed our [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.
3. Rebase your changes
Update your local repository with the most recent code from the main Update your local repository with the most recent code from the main
eland repository, and rebase your branch on top of the latest master eland repository, and rebase your branch on top of the latest master
@ -99,19 +101,19 @@ Once your changes and tests are ready to submit for review:
merging we will either ask you to squash all commits yourself or merging we will either ask you to squash all commits yourself or
we\'ll do it for you. we\'ll do it for you.
4. Submit a pull request 4. Submit a pull request
Push your local changes to your forked copy of the repository and Push your local changes to your forked copy of the repository and
[submit a pull [submit a pull
request](https://help.github.com/articles/using-pull-requests). In request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) .
the pull request, choose a title which sums up the changes that you In the pull request, choose a title which sums up the changes that you
have made, and in the body provide more details about what your have made, and in the body provide more details about what your
changes do. Also mention the number of the issue where discussion changes do. Also mention the number of the issue where discussion
has taken place, eg "Closes \#123". has taken place, eg "Closes \#123".
Then sit back and wait. There will probably be discussion about the pull Then sit back and wait. There will probably be discussion about the pull
request and, if any changes are needed, we would love to work with you request and, if any changes are needed, we would love to work with you
to get your pull request merged into eland. to get your pull request merged into `eland` .
Please adhere to the general guideline that you should never force push Please adhere to the general guideline that you should never force push
to a publicly shared branch. Once you have opened your pull request, you to a publicly shared branch. Once you have opened your pull request, you
@ -124,8 +126,7 @@ request. Note that squashing at the end of the review process should
also not be done, that can be done when the pull request is [integrated also not be done, that can be done when the pull request is [integrated
via GitHub](https://github.com/blog/2141-squash-your-commits). via GitHub](https://github.com/blog/2141-squash-your-commits).
Contributing to the eland codebase ## Contributing to the eland codebase
----------------------------------
**Repository:** <https://github.com/elastic/eland> **Repository:** <https://github.com/elastic/eland>
@ -136,35 +137,91 @@ currently using a minimum version of PyCharm 2019.2.4.
(All commands should be run from module root) (All commands should be run from module root)
- Create a new project via \'Check out from Version * Create a new project via \'Check out from Version
Control\'-\>\'Git\' on the \"Welcome to PyCharm\" page (or other) Control\'-\>\'Git\' on the \"Welcome to PyCharm\" page (or other)
- Enter the URL to your fork of eland
(e.g. `git@github.com:stevedodson/eland.git`) * Enter the URL to your fork of eland
- Click \'Yes\' for \'Checkout from Version Control\'
- Configure PyCharm environment: (e.g.  `git@github.com:stevedodson/eland.git` )
- In \'Preferences\' configure a \'Project: eland\'-\>\'Project
* Click \'Yes\' for \'Checkout from Version Control\'
* Configure PyCharm environment:
* In \'Preferences\' configure a \'Project: eland\'-\>\'Project
Interpreter\'. Generally, we recommend creating a virtual Interpreter\'. Generally, we recommend creating a virtual
environment (TODO link to installing for python version support). environment (TODO link to installing for python version support).
- In \'Preferences\' set \'Tools\'-\>\'Python Integrated
Tools\'-\>\'Default test runner\' to `pytest`
- In \'Preferences\' set \'Tools\'-\>\'Python Integrated
Tools\'-\>\'Docstring format\' to `numpy`
- Install development requirements. Open terminal in virtual
environment and run `pip install -r requirements-dev.txt`
- Setup Elasticsearch instance with docker `ELASTICSEARCH_VERSION=elasticsearch:7.x-SNAPSHOT .ci/run-elasticsearch.sh` and check `http://localhost:9200`
- Run
`python -m eland.tests.setup_tests` to setup test environment -*note
this modifies Elasticsearch indices*
- Install local `eland` module (required to execute notebook tests)
`python setup.py install`
- Run `pytest --nbval` to validate install
- To test specific versions of Python use `nox -s test-3.8`
- To run the automatic formatter and check for lint issues
run `nox -s format`
* In \'Preferences\' set \'Tools\'-\>\'Python Integrated
Tools\'-\>\'Default test runner\' to `pytest`
* In \'Preferences\' set \'Tools\'-\>\'Python Integrated
Tools\'-\>\'Docstring format\' to `numpy`
* To install development requirements. Open terminal in virtual environment and run
``` bash
> pip install -r requirements-dev.txt
```
* Setup Elasticsearch instance with docker
``` bash
> ELASTICSEARCH_VERSION=elasticsearch:7.x-SNAPSHOT .ci/run-elasticsearch.sh
```
* Now check `http://localhost:9200`
* Install local `eland` module (required to execute notebook tests)
``` bash
> python setup.py install
```
* To setup test environment:
``` bash
> python -m eland.tests.setup_tests
```
(Note this modifies Elasticsearch indices)
* To validate installation, open python console and run
``` bash
> import eland as ed
> ed_df = ed.DataFrame('localhost', 'flights')
```
* To run the automatic formatter and check for lint issues run
``` bash
> nox -s format`
```
* To test specific versions of Python run
``` bash
> nox -s test-3.8`
```
### Documentation ### Documentation
- [Install pandoc on your system](https://pandoc.org/installing.html)
For Ubuntu or Debian you can do `sudo apt-get install -y pandoc` * [Install pandoc on your system](https://pandoc.org/installing.html) . For Ubuntu or Debian you can do
- Install documentation requirements. Open terminal in virtual
environment and run `pip install -r docs/requirements-docs.txt` ``` bash
> sudo apt-get install -y pandoc
```
* Install documentation requirements. Open terminal in virtual environment and run
``` bash
> pip install -r docs/requirements-docs.txt
```
* To verify/generate documentation run
``` bash
> nox -s docs
```

View File

@ -1,16 +1,26 @@
<p align="center"> <div align="center">
<a href="https://github.com/elastic/eland"> <a href="https://github.com/elastic/eland">
<img src="https://raw.githubusercontent.com/elastic/eland/master/docs/source/logo/eland.png" width="30%" alt="Eland" /> <img src="https://raw.githubusercontent.com/elastic/eland/master/docs/sphinx/logo/eland.png" width="30%"
alt="Eland" />
</a> </a>
</p> </div>
<p align="center"> <br />
<a href="https://pypi.org/project/eland"><img src="https://img.shields.io/pypi/v/eland.svg" alt="PyPI Version"></a> <div align="center">
<a href="https://anaconda.org/conda-forge/eland"><img src="https://img.shields.io/conda/vn/conda-forge/eland" alt="Conda Version"></a> <a href="https://pypi.org/project/eland"><img src="https://img.shields.io/pypi/v/eland.svg" alt="PyPI Version"></a>
<a href="https://pepy.tech/project/eland"><img src="https://pepy.tech/badge/eland" alt="Downloads"></a> <a href="https://anaconda.org/conda-forge/eland"><img src="https://img.shields.io/conda/vn/conda-forge/eland"
<a href="https://pypi.org/project/eland"><img src="https://img.shields.io/pypi/status/eland.svg" alt="Package Status"></a> alt="Conda Version"></a>
<a href="https://clients-ci.elastic.co/job/elastic+eland+master"><img src="https://clients-ci.elastic.co/buildStatus/icon?job=elastic%2Beland%2Bmaster" alt="Build Status"></a> <a href="https://pepy.tech/project/eland"><img src="https://pepy.tech/badge/eland" alt="Downloads"></a>
<a href="https://github.com/elastic/eland/blob/master/LICENSE.txt"><img src="https://img.shields.io/pypi/l/eland.svg" alt="License"></a> <a href="https://pypi.org/project/eland"><img src="https://img.shields.io/pypi/status/eland.svg"
</p> alt="Package Status"></a>
<a href="https://clients-ci.elastic.co/job/elastic+eland+master"><img
src="https://clients-ci.elastic.co/buildStatus/icon?job=elastic%2Beland%2Bmaster" alt="Build Status"></a>
<a href="https://github.com/elastic/eland/blob/master/LICENSE.txt"><img src="https://img.shields.io/pypi/l/eland.svg"
alt="License"></a>
<a href="https://eland.readthedocs.io/en/7.10.0b1/?badge=7.10.0b1"><img
src="https://readthedocs.org/projects/eland/badge/?version=7.10.0b1" alt="Documentation Status"></a>
</div>
## About
Eland is a Python Elasticsearch client for exploring and Eland is a Python Elasticsearch client for exploring and
analyzing data in Elasticsearch with a familiar Pandas-compatible API. analyzing data in Elasticsearch with a familiar Pandas-compatible API.

View File

@ -67,8 +67,8 @@ Fork and clone the repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You will need to fork the main eland code or documentation repository You will need to fork the main eland code or documentation repository
and clone it to your local machine. See `github help and clone it to your local machine. See `Github fork a repo
page <https://help.github.com/articles/fork-a-repo>`__ for help. page <https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo>`__ - for help.
Further instructions for specific projects are given below. Further instructions for specific projects are given below.
@ -77,10 +77,17 @@ Submitting your changes
Once your changes and tests are ready to submit for review: Once your changes and tests are ready to submit for review:
1. Test your changes 1. Run the linter and test suite to ensure your changes do not break the existing code:
(TODO Add link to the testing document)
Run the test suite to make sure that nothing is broken (TODO add link .. code-block:: bash
to testing doc).
# Run Auto-format, lint, mypy type checker for your changes
$ nox -s format
# Run the test suite
$ pytest --doctest-modules eland/tests/
$ pytest --nbval eland/tests/tests_notebook/
2. Sign the Contributor License Agreement 2. Sign the Contributor License Agreement
@ -105,7 +112,7 @@ Once your changes and tests are ready to submit for review:
Push your local changes to your forked copy of the repository and Push your local changes to your forked copy of the repository and
`submit a pull `submit a pull
request <https://help.github.com/articles/using-pull-requests>`__. In request <https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests>`__. In
the pull request, choose a title which sums up the changes that you the pull request, choose a title which sums up the changes that you
have made, and in the body provide more details about what your have made, and in the body provide more details about what your
changes do. Also mention the number of the issue where discussion has changes do. Also mention the number of the issue where discussion has
@ -113,7 +120,7 @@ Once your changes and tests are ready to submit for review:
Then sit back and wait. There will probably be discussion about the pull Then sit back and wait. There will probably be discussion about the pull
request and, if any changes are needed, we would love to work with you request and, if any changes are needed, we would love to work with you
to get your pull request merged into eland. to get your pull request merged into `eland`.
Please adhere to the general guideline that you should never force push Please adhere to the general guideline that you should never force push
to a publicly shared branch. Once you have opened your pull request, you to a publicly shared branch. Once you have opened your pull request, you
@ -139,31 +146,78 @@ Configuring PyCharm And Running Tests
(All commands should be run from module root) (All commands should be run from module root)
- Create a new project via 'Check out from Version Control'->'Git' - Create a new project via \'Check out from Version
on the "Welcome to PyCharm" page (or other) Control\'-\>\'Git\' on the \"Welcome to PyCharm\" page <or other>
- Enter the URL to your fork of eland
(e.g. ``git@github.com:stevedodson/eland.git``) - Enter the URL to your fork of eland
- Click 'Yes' for 'Checkout from Version Control' <e.g. `git@github.com:stevedodson/eland.git`>
- Configure PyCharm environment:
- In 'Preferences' configure a 'Project: eland'->'Project Interpreter'. - Click \'Yes\' for \'Checkout from Version Control\'
Generally, we recommend creating a virtual environment (TODO link to
installing for python version support). - Configure PyCharm environment:
- In 'Preferences' set 'Tools'->'Python Integrated Tools'->'Default In \'Preferences\' configure a \'Project: eland\'-\>\'Project Interpreter\'. Generally, we recommend creating a virtual environment.
test runner' to ``pytest`` (TODO link to installing for python version support)
- In 'Preferences' set 'Tools'->'Python Integrated Tools'->'Docstring
format' to ``numpy`` - In \'Preferences\' set \'Tools\'-\>\'Python Integrated
- Install development requirements. Open terminal in virtual Tools\'-\>\'Default test runner\' to `pytest`
environment and run ``pip install -r requirements-dev.txt``
- Setup Elasticsearch instance (assumes ``localhost:9200``), and run - In \'Preferences\' set \'Tools\'-\>\'Python Integrated
``python -m eland.tests.setup_tests`` to setup test environment - Tools\'-\>\'Docstring format\' to `numpy`
*note this modifies Elasticsearch indices*
- Run ``pytest --doctest-modules`` to validate install - Install development requirements. Open terminal in virtual environment and run
- To test specific versions of Python use ``nox -s test-3.8`` .. code-block:: bash
- To run the automatic formatter and check for lint issues
run ``nox -s blacken`` `pip install -r requirements-dev.txt`
- Setup Elasticsearch instance with docker
.. code-block:: bash
ELASTICSEARCH_VERSION=elasticsearch:7.x-SNAPSHOT .ci/run-elasticsearch.sh`
- Check `http://localhost:9200` to verify if ElasticSearch Instance is running.
- Install local `eland` module <required to execute notebook tests>
.. code-block:: bash
python setup.py install
- To setup test environment -*note this modifies Elasticsearch indices* run
.. code-block:: bash
python -m eland.tests.setup_tests
- To validate installation, open python console and run
.. code-block:: bash
import eland as ed
ed_df = ed.DataFrame('localhost', 'flights')
- To run the automatic formatter and check for lint issues
.. code-block:: bash
run `nox -s format`
- To test specific versions of Python run
.. code-block:: bash
nox -s test-3.8
Documentation Documentation
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
- Install documentation requirements. Open terminal in virtual - `Install pandoc on your system <https://pandoc.org/installing.html>`__ -
environment and run ``pip install -r requirements-dev.txt`` .. code-block:: bash
# For Ubuntu or Debian
sudo apt-get install -y pandoc
- Install documentation requirements. Open terminal in virtual environment and run
.. code-block:: bash
pip install -r docs/requirements-docs.txt
- To verify/generate documentation run
.. code-block:: bash
nox -s docs