Skip to content

Commit

Permalink
IGNITE-14056: Fixed README and documentation
Browse files Browse the repository at this point in the history
This closes #3
  • Loading branch information
isapego committed Jan 26, 2021
1 parent 99ed735 commit 644de99
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 127 deletions.
78 changes: 49 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Apache Ignite thin (binary protocol) client, written in Python 3.

## Installation

#### *for end user*
### *for end user*
If you only want to use the `pyignite` module in your project, do:
```
```bash
$ pip install pyignite
```

#### *for developer*
### *for developer*
If you want to run tests, examples or build documentation, clone
the whole repository:
```
```bash
$ git clone git@github.com:apache/ignite-python-thin-client.git
$ pip install -e .
```
Expand All @@ -30,63 +30,83 @@ in the `pip` manual.

Then run through the contents of `requirements` folder to install
the additional requirements into your working Python environment using
```
```bash
$ pip install -r requirements/<your task>.txt
```

You may also want to consult the `setuptools` manual about using `setup.py`.

### Updating from older version

To upgrade an existing package, use the following command:
```bash
pip install --upgrade pyignite
```

To install the latest version of a package:
```bash
pip install pyignite
```

To install a specific version:
```bash
pip install pyignite==0.4.0
```

## Documentation
[The package documentation](https://apache-ignite-binary-protocol-client.readthedocs.io)
is available at *RTD* for your convenience.

If you want to build the documentation from source, do the developer
installation as described above, then run the following commands:
```
$ cd ignite/modules/platforms/python
installation as described above, then run the following commands from the
client's root directory:
```bash
$ pip install -r requirements/docs.txt
$ cd docs
$ make html
```

Then open `ignite/modules/platforms/python/docs/generated/html/index.html`
in your browser.
Then open `docs/generated/html/index.html` in your browser.

## Examples
Some examples of using pyignite are provided in
`ignite/modules/platforms/python/examples` folder. They are extensively
commented in the
Some examples of using pyignite are provided in `examples` folder. They are
extensively commented in the
[Examples of usage](https://apache-ignite-binary-protocol-client.readthedocs.io/en/latest/examples.html)
section of the documentation.

This code implies that it is run in the environment with `pyignite` package
installed, and Apache Ignite node is running on localhost:10800.

## Testing
*NB!* All tests require Apache Ignite node running on localhost:10800. For the convenience, `docker-compose.yml` is present.
So installing `docker` and `docker-compose` is recommended. Also, it is recommended installing `pyignite` in development
mode. You can do that using following command:
```
$ pip install -e .
```
### Run without ssl
*NB!* It is recommended installing `pyignite` in development mode.
Refer to [this section](#for-developer) for instructions.

Do not forget to install test requirements:
```bash
$ pip install -r requirements/install.txt -r requirements/tests.txt
```
$ docker-compose down && docker-compose up -d ignite

Also, you'll need to have a binary release of Ignite with lib4j2 enabled and
`IGNITE_HOME` properly set:
```bash
$ cd <ignite_binary_release>
$ export IGNITE_HOME=$(pwd)
$ cp -r $IGNITE_HOME/libs/optional/ignite-log4j2 $IGNITE_HOME/libs/
```
### Run basic tests
```bash
$ pytest
```
### Run with examples
```
$ docker-compose down && docker-compose up -d ignite
$ pytest --examples
```bash
$ pytest --examples
```
### Run with ssl and not encrypted key
```
$ docker-compose down && docker-compose up -d ignite
$ pytest --use-ssl=True --ssl-certfile=./tests/config/ssl/client_full.pem
```bash
$ pytest --use-ssl=True --ssl-certfile=./tests/ssl/client_full.pem
```
### Run with ssl and password-protected key
```
$ docker-compose down && docker-compose up -d ignite
```bash
$ pytest --use-ssl=True --ssl-certfile=./tests/config/ssl/client_with_pass_full.pem --ssl-keyfile-password=654321
```

Expand Down
Loading

0 comments on commit 644de99

Please sign in to comment.