Quick start

This section is for developers and contributors of AeoLiS. It describes how to get started as a developer with the intention of improving or extending the source code. If you are a user, please see the user documentation instead.

Development workflow

AeoLiS is developed in a collaborative way. Therefore, it is important to follow the workflow described below as closely as possibble to ensure that the code is always in a working state and that the changes are properly documented. Details on how to propose and push changes to the source code are documented in our contributing guidelines. This section provides a quick reference.

../_images/aeolis-workflow.png

Fig. 12 AeoLiS collaborative development workflow.

Set up

AeoLiS is developed in Python 3.10.x and tested for versions 3.9, and 3.11. It is recommended to use a virtual environment to install the dependencies.

# Using virtualenv
python3 -m venv venv
source venv/bin/activate

# Using conda
conda create -n aeolis python=3.10
conda activate aeolis

To install AeoLiS in editable mode, run the following command from the root directory of the repository:

pip install -e .[dev]

To run the tests, run the following command from the root directory of the repository:

pytest

Code Style

AeoLiS strive to comply with the PEP8 code style guide. We recommend flake8 to check the code style. To run flake8, use the following command from the src/ directory of the source code:

flake8 <your-module>

Docstrings

AeoLiS uses napoleon to parse the docstrings in the source code and automatically generate documentation. We recommend to follow the Numpy style for docstrings. The use of type hints is encouraged. For example:

def my_function(arg1:int, arg2:str) -> bool:
    """Summary line.

    Extended summary about the fuctionality of the function, u
    sing the Numpy style.

    Parameters:
    -----------
    arg1: int
        Description of arg1
    arg2: str
        Description of arg2

    Returns:
    ---------
    bool
        Description of return value

    """

    return True

To check the docstrings in a module, intall flake8-docstrings and run the following command from the src/ directory:

flake8 --docstring-convention numpy <your-module>