Julia-seminar
Material for the Julia seminar course. The course material is adapted from two sources:
- the course from Michael Herbst (MIT license).
- the book ThinkJulia from Ben Lauwens (Creative Commons Attribution-NonCommercial 3.0 Unported license).
Software and material
What you need for the workshop (quick overview):
- Julia 1.8
- Jupyter and IJulia.jl
- This repository of workshop materials
- All required dependencies (Julia packages) for the workshop
Getting Julia
For following the course you will need at least Julia 1.8. Julia can be easily obtained in binary form from Julia downloads.
Getting all the rest
To get the remaining files and dependencies
start up julia
and in the resulting REPL shell,
copy and paste the following:
import Downloads
script = Downloads.download("https://gitlab.mathematik.uni-stuttgart.de/stammbn/julia-seminar/-/raw/main/install.jl?ref_type=heads")
include(script)
This downloads the install.jl script and runs it from julia. Follow the instructions on the screen and start the Jupyter notebook server with the command that will be printed.
As an alternative you can also also run the following commands manually
(this requires to have git
and julia
available from the commandline):
git clone https://gitlab.mathematik.uni-stuttgart.de/stammbn/Julia-seminar/
cd Julia-seminar
julia install-manual.jl
Troubleshooting
If you are facing issues, check out
the great troubleshooting section
from the WorkshopWizard package by Carsten Bauer (which install.jl
is using).
Check everything works
There is a section in the 00_Installation notebook with a few quick commands to check everything works as expected. Please run these before the course.
pre-commit
For Developers: Setting Up pre-commit
is a framework that helps to manage and maintain pre-commit hooks to ensure that your code adheres to a consistent style, prevents errors, and adheres to other quality assurance checks.
-
Install
pre-commit
: To ensure smooth development, installpre-commit
using pip by running the following command:pip install pre-commit
For more information and installation options, visit the
pre-commit
website. -
Navigate to the Project Directory: Change into the project directory, i.e.,
julia-seminar
by running:cd julia-seminar
-
Install Hooks: Install the git hooks by executing:
pre-commit install
This command installs the pre-commit script alongside existing git hooks.
Once the pre-commit hook is installed, it will automatically check your code for any issues before each commit. If the checks do not pass, you will be prompted to fix them before proceeding.