2. Python interfaces to STEPS

Since version 3.6, STEPS is shipped with a new, more pythonic interface. In this documentation, we will refer to the original interface as API_1 and to the new one as API_2. Unless mentioned explicitely, we will use API_2 by default.

2.1. Compatibility between APIs

Models that were written using API_1 are still usable without any changes. Users are however encouraged to start using API_2 for new models. It is not advised to try to mix both APIs in a single python script. Until API_1 becomes deprecated, users that want to use API_2 have to explicitely specify it at the beginning of their python scripts (see API References).

2.2. Guides

Chapters 3 to 9 introduce STEPS concepts in details through examples:

Equivalent chapters using API_1 are still available for reference (see Original STEPS API guides).

Finally, API References provides detailed documentation of STEPS API, documentation relative to API_1 is still available (API_1 References).

2.2.1. Conventions

All chapters from the guide are runnable with jupyter lab. The corresponding *.ipynb files are available in the STEPS_Example github repository.

In the following chapters, jupyter code cells are represented with e.g.:

[1]:
print('This is a jupyter code cell')
This is a jupyter code cell

The code in jupyter code cells is part of a main example in each chapter. The number on the left of the code indicates the order in which the cells were executed. If its execution printed something, it is shown below the cell.

However, it is sometimes useful to provide additional code examples when explaining a STEPS concept. These code examples are not part of the main example and are not executed in the jupyter notebook. They are represented with a different background color and do not have an execution number to their left:

print('This is a code example, it is not executed')

Finally, commands to be run in a terminal are represented with e.g.:

echo "This should be run in a terminal"