*General tips : use pyenv to build sakia, as described in the [wiki](https://github.com/duniter/sakia/wiki/Cutecoin-install-for-developpers)
General tips : use [pyenv](https://github.com/pyenv/pyenv) to build sakia, as described in the [documentation](https://git.duniter.org/clients/python/sakia/-/blob/master/doc/install_for_developers.md)
Building python 3 with pyenv requires libraries of `openssl` and `sqlite3`. On Ubuntu, install it using the following commands :
Building Python with pyenv requires libraries of `openssl` and `sqlite3`. On Ubuntu, install it using the following commands :
```
apt-get update
apt-get install libssl-dev
apt-get install libsqlite3-dev
```
### Wheel Build scripts
* Install __wheel__ with `pip install wheel`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the wheel : Run `python3 setup.py bdist_wheel` in sakia folder
### Pyinstaller Build scripts
* Install __pyinstaller__ with `pip install pyinstaller`
* Run `python3 gen_resources.py` in sakia folder
* Run `python3 gen_translations.py` in sakia folder
* To build the binaries : Run `pyinstall sakia.spec`
apt-get update
apt-get install libssl-dev
apt-get install libsqlite3-dev
### Install with pip
* Run `pip install sakia`
* start "sakia" :)
### Download latest release
* Go to [current release](https://github.com/duniter/sakia/releases)
* Download corresponding package to your operating system
* Unzip and start "sakia" :)
* Join our beta community by contacting us on [duniter forum](http://forum.duniter.org/)
* Go to [current release](https://git.duniter.org/clients/python/sakia/-/releases)
* Download AppImage for linux x86_64. Run it !
* Join our developer community by contacting us on [duniter forum](http://forum.duniter.org/)
`--currency g1-test` to connect to the g1-test currency network.
## Development
* When writing docstrings, use the reStructuredText format recommended by https://www.python.org/dev/peps/pep-0287/#docstring-significant-features
* When writing docstrings, use the reStructuredText format recommended by [PEP 0287](https://www.python.org/dev/peps/pep-0287/#docstring-significant-features)
* Use make commands to check the code and the format it correct.
The development tools require Python 3.6.x or higher.
* Create a python virtual environment with [pyenv](https://github.com/pyenv/pyenv)
* Before submiting a merge requests, please check the static typing and tests.
* Install dev dependencies
```bash
pip install-r requirements_dev.txt
```
pip install -r requirements_dev.txt
* Check static typing with [mypy](http://mypy-lang.org/)
```bash
make check
```
make check
* Run all unit tests (pytest module) with:
```bash
make tests
```
make tests
> **Warning:** *do not run tests with sakia installed in your dev environment, because pytest will use the installed Sakia.*
* Run only some unit tests by passing a special ENV variable:
```bash
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
```
make tests TESTS_FILTER=tests/functional/test_transfer_dialog.py::test_transfer
## Packaging and deploy
### PyPi
In the development pyenv environment, install the tools to build and deploy
```bash
pip install--upgrade-r requirements_deploy.txt
```
pip install --upgrade -r requirements_deploy.txt
Change and commit and tag the new version number (semantic version number)
```bash
./release.sh 0.x.y
```
./release.sh 0.x.y
Build the PyPi package in the `dist` folder
```bash
make build
```
make build
Deploy the package to PyPi test repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)
Deploy the package on the PyPi repository (prefix the command with a space in order for the shell not to save in its history system the command containing the password)