Thus far, we have been running Python code from Jupyter notebooks (though the same principle applies to other environments such as Spyder or IDSs). This doesn't easily allow you to scale up or scale out: if you need to run the same, or slightly different, code many times, it is hard. There are ways to do this within Jupyter, but in the end you will want to escape and make command line interfaces. This is the universal interface for automation, scale-out, and parameterization of work. We give the quickest intro to this.
https://aaltoscicomp.github.io/python...
00:24 Why make scripts?
03:04 Script example type-along (exercise 1)
13:39 Splitting part of the script into a module and importing it
20:37 Command line argument parsing
37:26 Discussion of command-line argument usage
38:16 Configuration files
41:01 Q&A (argparse vs click)
-----
Python for Scientific Computing is a bridge between basic Python courses and scientific work with Python. This is a basic to intermediate course in Python tools such as NumPy, SciPy, Matplotlib, and Pandas. It also covers some more advanced tools, such as Binder, releasing software, data formats, etc. It is suitable for people who have a basic understanding of Python and want to know some internals and important libraries for science. We don't cover anything in too much depth, but we do introduce you to all of the main tools you will need.
This course was put on as a collaboration between partners in Finland, Norway, and Sweden, coordinated by Aalto Scientific Computing.
Links:
Playlist: • Python for Scientific Computing 2021
Course material: https://aaltoscicomp.github.io/python...
Workshop webpage: https://scicomp.aalto.fi/training/sci...
Aalto Scientific Computing: https://scicomp.aalto.fi/
CodeRefinery: https://coderefinery.org