# Structure of a script 1. Initially you should specify which packages you use in the scripts ~~~python import pathlib # Packages that are provided from python import numpy as np # Packages that are downloaded, specified in the requierements.txt import myscript # Scripts from your Project/Pipeline ~~~ 2. Next your code for the specific problem that you are trying to solve, all written code should be containded in a function/classes It should contain a main function with is calling all individual function to solve the problem. ~~~python def load_data(path): with open(path, "r") as f: f.read() return f def main(path): load_data(path) ~~~ 3. If the script is a standalone script, it can be run by calling python myscript.py it should contain... ~~~python if __name__ == "__main__": path = "../data/README.md" main(path) ~~~ # Tips and tricks - Plotting scripts should be named the same as the output figure for easier backtracking - Plotting scripts should start with plot, so that one can create a bash script for that executes all plot* scripts - If you use a directory for managing specific task, in python it is called a module, you neeed a __init__.py file in the directory more in [packagehowto](https://whale.am28.uni-tuebingen.de/git/pweygoldt/packagehowto)