Skip to content

Commit

Permalink
Add simplified installation instructions to README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
f3rmion committed Mar 2, 2021
1 parent 7d02fdf commit d8420d8
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 118 deletions.
124 changes: 91 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,41 @@
##

[![Documentation](https://img.shields.io/badge/GitBook-Docu-lightgrey)](https://app.gitbook.com/@ehjc/s/kallisto/)
[![License](https://img.shields.io/badge/license-Apache%202-blue)](https://img.shields.io/badge/license-Apache%202-blue)
[![Maturity Level](https://img.shields.io/badge/Maturity%20Level-ML--1-orange)](https://img.shields.io/badge/Maturity%20Level-ML--1-orange)
[![Tests](https://github.com/AstraZeneca/kallisto/workflows/Tests/badge.svg)](https://github.com/AstraZeneca/kallisto/actions?workflow=Tests)
[![codecov](https://codecov.io/gh/AstraZeneca/kallisto/branch/master/graph/badge.svg?token=HI0U0R96X8)](https://codecov.io/gh/AstraZeneca/kallisto)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/AstraZeneca/kallisto.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/AstraZeneca/kallisto/context:python)
[![status](https://joss.theoj.org/papers/16126cbcfb826bf4810d243a009a6b02/status.svg)](https://joss.theoj.org/papers/16126cbcfb826bf4810d243a009a6b02)

Table of Contents
-----------------
# Table of Contents

- Full Author List
- Introduction
- Installation
- Testing suite
- Reference

Full Author List
----------------
# Full Author List

Eike Caldeweyher and Philipp Pracht

Introduction
------------
# Introduction

We developed the `kallisto` program for the efficient and robust calculation of atomic features using molecular geometries either in a ``xmol`` or a ``Turbomole`` format.
Furthermore, several modelling tools are implemented, e.g., to calculate root-mean squared deviations via quaternions (including rotation matrices), sorting of molecular geometries and many more. All features of ``kallisto`` are described in detail within our [documentation](https://app.gitbook.com/@ehjc/s/kallisto/) ([GitBook repository](https://github.com/f3rmion/gitbook-kallisto)).

Main dependencies
-----------------

```bash
click 7.1.2 Composable command line interface toolkit
numpy 1.20.1 NumPy is the fundamental package for array computing with Python.
scipy 1.6.0 SciPy: Scientific Library for Python
└── numpy >=1.16.5
```

For a list of all dependencies have a look at the pyproject.toml file.

Installation from PyPI
----------------------

Expand All @@ -42,54 +51,103 @@ pip install kallisto
Installation from Source
------------------------

`kallisto` runs on `python3`
Requirements to install ``kallisto``from sources:
- [poetry](https://python-poetry.org/docs/#installation)
- [pyenv](https://github.com/pyenv/pyenv#installation) or [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html)
- python >=3.7

First check that ``poetry`` is running correctly (v1.0.10 at the time of writing)

Python development setup. Install the `pyenv` python version manager:
```bash
curl https://pyenv.run | bash
> poetry --version
Poetry version 1.0.10
```
and add this to the `~/.bashrc` and source it:

Create a virtual environment (via ``pyenv`` or ``conda``) and activate it. Afterwards, clone the ``kallisto`` project from GitHub and install it using ``poetry``

```bash
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
> git clone [email protected]:AstraZeneca/kallisto.git
> cd kallisto
> poetry install
```
Install the latest python versions:

Testing suite
-------------

The ``kallisto`` project uses [nox](https://nox.thea.codes/en/stable/tutorial.html#installation) as an automated unit test suite, which is therefore an additional dependency.

### Default nox session

The default session includes: linting (lint), type checks (mypy, pytype), and unit tests (tests).

```bash
pyenv install 3.8.2
pyenv install 3.7.7
pyenv local 3.8.2 3.7.7
> nox
```

Now we are ready to set up `kallisto`.
Clone the repository:
When everything runs smoothly through, you are ready to go! After one successful nox run, we can reuse the created virtual environment via the ``-r`` flag.

```bash
git clone [email protected]:AstraZeneca/kallisto.git
> nox -r
```

Install a python dependency manager. We choose to go with `poetry`:
Different unit test sessions are implemented (check the noxfile.py). They can be called separately via the run session ``-rs`` flag.

### Tests

Run all unit tests that are defined in the /tests directory.

```bash
> nox -rs tests
```

### Lint

``kallisto`` uses the [flake8](https://flake8.pycqa.org/en/latest/) linter (check the .flake8 config file).

```bash
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
source ~/.poetry/env
> nox -rs lint
```

### Black

``kallisto`` uses the [black](https://github.com/psf/black) code formatter.

```bash
> nox -rs black
```
or alternatively via `pip`:

### Safety

``kallisto`` checks the security of dependencies via [safety](https://pyup.io/safety/).

```bash
pip install --user poetry
> nox -rs safety
```

Now, if you haven't already done so, change into the cloned `kallisto` directory and
download the dependencies via `poetry`:
### Mypy

``kallisto`` checks for static types via [mypy](https://github.com/python/mypy) (check the mypy.ini config file).

```bash
cd kallisto
poetry install
> nox -rs mypy
```

Finally install the test automation environment `nox` via ``pip``:
### Pytype

``kallisto`` furthermore uses [pytype](https://github.com/google/pytype) for type checks.

```bash
pip install --user --upgrade nox
> nox -rs pytype
```

Run `nox` to test the setup.
### Coverage

Unit test [coverage](https://coverage.readthedocs.io/en/coverage-5.4/) can be checked as well.


```bash
> nox -rs coverage
```

Reference
---------
Expand Down
Loading

0 comments on commit d8420d8

Please sign in to comment.