diff --git a/0_Installation.ipynb b/0_Installation.ipynb index 15edf52b4e1428867ec036369da81edd7527b8b4..143edc6936b3bd256625816c13adf17c8c7f6de3 100644 --- a/0_Installation.ipynb +++ b/0_Installation.ipynb @@ -48,12 +48,43 @@ "```\n", "\n", "### 3) Starting the notebook\n", + "\n", + "#### From Julia REPL\n", + "\n", "To start the notebook make sure to be in the folder `Julia-seminar` and then run `julia`: an interactive Julia command line will open. In there run this command\n", "\n", + "```julia\n", + "using Pkg\n", + "Pkg.activate(pwd())\n", + "using IJulia\n", + "notebook(dir=pwd())\n", "```\n", - "using IJulia; notebook(dir=pwd())\n", - "```\n", + "\n", "and the notebook will automatically open in a browser.\n", + "Navigate the files and open notebook number 0.\n", + "\n", + "#### From command line\n", + "\n", + "Alternatively, one can open the notebook from the command line:\n", + "\n", + "```bash\n", + "julia -L start-notebook.jl\n", + "```\n", + "\n", + "### \\* For users with multiple Julia versions\n", + "\n", + "For users with multiple Julia versions, if the corresponding kernel cannot be found in Jupyter Notebook, please run `installkernel(\"julia\", \"--project=@.\")` (only once) before executing `notebook(dir=pwd())` to first install the kernel:\n", + "\n", + "```julia\n", + "using Pkg\n", + "Pkg.activate(pwd())\n", + "using IJulia\n", + "installkernel(\"julia\", \"--project=@.\")\n", + "notebook(dir=pwd())\n", + "```\n", + "\n", + "Now, one should find a new kernel related to the current Julia version, named `julia \"Julia-version\"`, in Jupyter Notebook.\n", + "\n", "\n", "### Troubleshooting\n", "If you are facing issues, check out\n", @@ -92,13 +123,44 @@ "julia install-manual.jl\n", "```\n", "\n", - "### 3) Starten des Notebooks\n", - "Um das Notebook zu starten, stelle sicher, dass Du Dich im Ordner `Julia-seminar` befindest, und führe dann `julia` aus: Eine interaktive Julia-Befehlszeile wird geöffnet. Führe darin folgenden Befehl aus:\n", + "### 3) Das Notebook starten\n", + "\n", + "#### Aus der Julia REPL\n", "\n", + "Um das Notebook zu starten, stellen Sie sicher, dass Sie sich im Ordner `Julia-Seminar` befinden, und führen Sie dann `julia` aus: Eine interaktive Julia-Befehlszeile wird geöffnet. Führen Sie darin den folgenden Befehl aus:\n", + "\n", + "```julia\n", + "using Pkg\n", + "Pkg.activate(pwd())\n", + "using IJulia\n", + "notebook(dir=pwd())\n", "```\n", - "using IJulia; notebook(dir=pwd())\n", + "\n", + "und das Notebook wird automatisch in einem Browser geöffnet.\n", + "Navigieren Sie zu den Dateien und öffnen Sie das Notebook Nummer 0.\n", + "\n", + "#### Über die Befehlszeile\n", + "\n", + "Alternativ kann man das Notebook auch über die Befehlszeile öffnen:\n", + "\n", + "\n", + "```bash\n", + "julia -L start-notebook.jl\n", "```\n", - "und das Notebook wird automatisch im Browser geöffnet.\n", + "\n", + "### \\* Für Benutzer mit mehreren Julia-Versionen\n", + "\n", + "Für Benutzer mit mehreren Julia-Versionen, falls der entsprechende Kernel in Jupyter Notebook nicht gefunden werden kann, führen Sie bitte `installkernel(\"julia\", \"--project=@.\")` (nur einmal) aus, bevor Sie `notebook(dir=pwd())` ausführen, um zuerst den Kernel zu installieren:\n", + "\n", + "```julia\n", + "using Pkg\n", + "Pkg.activate(pwd())\n", + "using IJulia\n", + "installkernel(\"julia\", \"--project=@.\")\n", + "notebook(dir=pwd())\n", + "```\n", + "\n", + "Nun sollte man in Jupyter Notebook einen neuen Kernel finden, der mit der aktuellen Julia-Version verknüpft ist und den Namen `julia \"Julia-Version\"` trägt.\n", "\n", "### Fehlerbehebung\n", "Wenn Du auf Probleme stößt, werfe einen Blick auf den [ausgezeichneten Problembehandlungsabschnitt](https://carstenbauer.github.io/WorkshopWizard.jl/dev/troubleshooting/) aus dem WorkshopWizard-Paket von Carsten Bauer (das von `install.jl` verwendet wird)." @@ -273,7 +335,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.9.2", + "display_name": "Julia 1.9.3", "language": "julia", "name": "julia-1.9" }, diff --git a/README.md b/README.md index 0bb394f680c7dc29a7e8cd6e205a6e9f45b7a5fa..3112dbda96cfae099f574998058f4d41e830ff30 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,44 @@ cd Julia-seminar julia install-manual.jl ``` -### 3) Starten des Notebooks -Um das Notebook zu starten, stelle sicher, dass Du Dich im Ordner `Julia-seminar` befindest, und führe dann `julia` aus: Eine interaktive Julia-Befehlszeile wird geöffnet. Führe darin folgenden Befehl aus: +### 3) Das Notebook starten +#### Aus der Julia REPL + +Um das Notebook zu starten, stellen Sie sicher, dass Sie sich im Ordner `Julia-Seminar` befinden, und führen Sie dann `julia` aus: Eine interaktive Julia-Befehlszeile wird geöffnet. Führen Sie darin den folgenden Befehl aus: + +```julia +using Pkg +Pkg.activate(pwd()) +using IJulia +notebook(dir=pwd()) ``` -using IJulia; notebook(dir=pwd()) + +und das Notebook wird automatisch in einem Browser geöffnet. +Navigieren Sie zu den Dateien und öffnen Sie das Notebook Nummer 0. + +#### Über die Befehlszeile + +Alternativ kann man das Notebook auch über die Befehlszeile öffnen: + + +```bash +julia -L start-notebook.jl ``` -und das Notebook wird automatisch im Browser geöffnet. + +### \* Für Benutzer mit mehreren Julia-Versionen + +Für Benutzer mit mehreren Julia-Versionen, falls der entsprechende Kernel in Jupyter Notebook nicht gefunden werden kann, führen Sie bitte `installkernel("julia", "--project=@.")` (nur einmal) aus, bevor Sie `notebook(dir=pwd())` ausführen, um zuerst den Kernel zu installieren: + +```julia +using Pkg +Pkg.activate(pwd()) +using IJulia +installkernel("julia", "--project=@.") +notebook(dir=pwd()) +``` + +Nun sollte man in Jupyter Notebook einen neuen Kernel finden, der mit der aktuellen Julia-Version verknüpft ist und den Namen `julia "Julia-Version"` trägt. ### Fehlerbehebung Wenn Du auf Probleme stößt, werfe einen Blick auf den [ausgezeichneten Problembehandlungsabschnitt](https://carstenbauer.github.io/WorkshopWizard.jl/dev/troubleshooting/) aus dem WorkshopWizard-Paket von Carsten Bauer (das von `install.jl` verwendet wird). @@ -80,21 +111,49 @@ julia install-manual.jl ``` ### 3) Starting the notebook + +#### From Julia REPL + To start the notebook make sure to be in the folder `Julia-seminar` and then run `julia`: an interactive Julia command line will open. In there run this command +```julia +using Pkg +Pkg.activate(pwd()) +using IJulia +notebook(dir=pwd()) ``` -using IJulia; notebook(dir=pwd()) -``` -and the notebook will automatically open in a browser. +and the notebook will automatically open in a browser. Navigate the files and open notebook number 0. +#### From command line + +Alternatively, one can open the notebook from the command line: + +```bash +julia -L start-notebook.jl +``` + +### \* For users with multiple Julia versions + +For users with multiple Julia versions, if the corresponding kernel cannot be found in Jupyter Notebook, please run `installkernel("julia", "--project=@.")` (only once) before executing `notebook(dir=pwd())` to first install the kernel: + +```julia +using Pkg +Pkg.activate(pwd()) +using IJulia +installkernel("julia", "--project=@.") +notebook(dir=pwd()) +``` + +Now, one should find a new kernel related to the current Julia version, named `julia "Julia-version"`, in Jupyter Notebook. + ### Troubleshooting If you are facing issues, check out the [great troubleshooting section](https://carstenbauer.github.io/WorkshopWizard.jl/dev/troubleshooting/) from the WorkshopWizard package by Carsten Bauer (which is being used by `install.jl`). -## For Developers: Setting Up `pre-commit` +## For developers: setting up `pre-commit` [`pre-commit`](https://pre-commit.com/) 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. @@ -107,14 +166,14 @@ from the WorkshopWizard package by Carsten Bauer (which is being used by `instal For more information and installation options, visit the [`pre-commit`](https://pre-commit.com/) website. -2. **Navigate to the Project Directory:** +2. **Navigate to the project directory:** Change into the project directory, i.e., `julia-seminar` by running: ```bash cd julia-seminar ``` -3. **Install Hooks:** +3. **Install hooks:** Install the git hooks by executing: ```bash