diff --git a/config/templates/hpc.template b/config/templates/hpc.template index 5bb5d4ded296..e77eaf7dd7f0 100644 --- a/config/templates/hpc.template +++ b/config/templates/hpc.template @@ -1,6 +1,6 @@ -{%- if site == 'Gent' %} +{% if site == 'Gent' %} site_url: https://docs.hpc.ugent.be/{{ os }}/ -{%- endif %} +{% endif %} site_name: VSC User Documentation - {{ site }} ({{ os }}) docs_dir: docs/HPC repo_url: https://github.com/hpcugent/vsc_user_docs @@ -14,14 +14,14 @@ nav: - Running batch jobs: running_batch_jobs.md - Running interactive jobs: running_interactive_jobs.md - Running jobs with input/output data: running_jobs_with_input_output_data.md -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - Available software: ./only/gent/available_software/index.md -{%- endif %} +{% endif %} - Multi core jobs/Parallel Computing: multi_core_jobs.md - Using the HPC-UGent web portal: web_portal.md -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - Interactive and debug cluster: interactive_debug.md -{%- endif %} +{% endif %} - XDMoD portal: xdmod.md - Troubleshooting: troubleshooting.md - HPC Policies: sites/hpc_policies.md @@ -35,7 +35,7 @@ nav: - Best Practices: best_practices.md - Graphical applications with VNC: VNC.md - Graphical applications with X2Go: x2go.md -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - GPU clusters: gpu.md - Cron scripts: crontab.md - Teaching and training: teaching_training.md @@ -48,7 +48,7 @@ nav: - Beyond the basics: linux-tutorial/beyond_the_basics.md - Common pitfalls: linux-tutorial/common_pitfalls.md - More on the HPC infrastructure: linux-tutorial/hpc_infrastructure.md -{%- endif %} +{% endif %} - Software-specific Best Practices: - AlphaFold: alphafold.md - Apptainer/Singularity: apptainer.md @@ -78,13 +78,13 @@ plugins: site: {{ site }} os: {{ os }} osneutrallinks: True -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - redirects: redirect_maps: gpu_gent.md: gpu.md interactive_gent.md: interactive_debug.md crontab_gent.md: crontab.md -{%- endif %} +{% endif %} - macros: on_error_fail: true include_yaml: @@ -157,16 +157,16 @@ theme: name: Switch to light mode extra_javascript: -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - https://code.jquery.com/jquery-3.7.0.min.js - https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js - available_software/javascripts/populate_overview.js -{%- endif %} +{% endif %} extra_css: -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css -{%- endif %} +{% endif %} extra: analytics: diff --git a/config/templates/os_pick.template b/config/templates/os_pick.template index 64d966c36117..4067b97a4975 100644 --- a/config/templates/os_pick.template +++ b/config/templates/os_pick.template @@ -1,6 +1,6 @@ -{%- if site == 'Gent' %} +{% if site == 'Gent' %} site_url: https://docs.hpc.ugent.be -{%- endif %} +{% endif %} site_name: VSC User Documentation - {{ site }} docs_dir: os_pick/docs @@ -12,13 +12,13 @@ plugins: - Linux - macOS - Windows -{%- if site == 'Gent' %} +{% if site == 'Gent' %} - redirects: redirect_maps: gpu_gent.md: gpu.md interactive_gent.md: interactive_debug.md crontab_gent.md: crontab.md -{%- endif %} +{% endif %} - macros: include_yaml: - extra/constants.yml diff --git a/custom_plugin/constants.py b/custom_plugin/constants.py index 035447627987..28113e96a8b5 100644 --- a/custom_plugin/constants.py +++ b/custom_plugin/constants.py @@ -10,9 +10,9 @@ """ OS_PICK_BTN = """ -{{%- if {} %}} +{{% if {} %}} [{}]({}){{ .md-button }} -{{%- endif %}} +{{% endif %}} """ # This string enables automatic scrolling to section on some page while using OS picking feature. diff --git a/mkdocs/docs/HPC/linux-tutorial/beyond_the_basics.md b/mkdocs/docs/HPC/linux-tutorial/beyond_the_basics.md index ec86d8c86d70..8a1e35f7ac16 100644 --- a/mkdocs/docs/HPC/linux-tutorial/beyond_the_basics.md +++ b/mkdocs/docs/HPC/linux-tutorial/beyond_the_basics.md @@ -1,4 +1,3 @@ -{% import './macros/nb.md' as nb %} # Beyond the basics Now that you've seen some of the more basic commands, let's take a look @@ -123,8 +122,11 @@ The shell will expand certain things, including: their value; example: `echo "I am $USER"` or `echo "I am ${USER}"` 4. square brackets can be used to list a number of options for a - particular characters; {{nb.nb("example: `ls *.[oe][0-9]`.")}} This will list all - files starting with whatever characters (`*`), then a dot (`.`), + particular characters. + + example: `ls *.[oe][0-9]` + + This will list all files starting with whatever characters (`*`), then a dot (`.`), then either an 'o' or an 'e' (`[oe]`), then a character from '0' to '9' (so any digit) (`[0-9]`). So this filename will match: `anything.o5`, but this one won't: `anything.o52`. @@ -188,7 +190,7 @@ macOS. `top` will update every second and has a few interesting commands. To see only your processes, type `u` and your username after starting -`top`, (you can also do this with {{nb.nb("`top -u $USER`")}}). The default is to +`top`, (you can also do this with `top -u $USER`). The default is to sort the display by `%CPU`. To change the sort order, use `<` and `>` like arrow keys. diff --git a/mkdocs/docs/HPC/linux-tutorial/common_pitfalls.md b/mkdocs/docs/HPC/linux-tutorial/common_pitfalls.md index df784a709896..70f5585c6f70 100644 --- a/mkdocs/docs/HPC/linux-tutorial/common_pitfalls.md +++ b/mkdocs/docs/HPC/linux-tutorial/common_pitfalls.md @@ -76,7 +76,7 @@ press enter to put the command in your history so you can come back to it later (e.g., while you go check the spelling of your environment variables). -{% if OS==windows %} +{% if OS == windows %} ### Copying files with WinSCP diff --git a/mkdocs/docs/HPC/linux-tutorial/getting_started.md b/mkdocs/docs/HPC/linux-tutorial/getting_started.md index 7fd4396cbee5..d1a57ca83a52 100644 --- a/mkdocs/docs/HPC/linux-tutorial/getting_started.md +++ b/mkdocs/docs/HPC/linux-tutorial/getting_started.md @@ -220,7 +220,7 @@ And querying some basic information about the Linux kernel: ``` $ uname -a Linux gligar01.gligar.os 2.6.32-573.8.1.el6.ug.x86_64 #1 SMP Mon Nov 16 15:12:09 - CET 2015 x86_64 x86_64 x86_64 GNU/Linux + CET 2015 x86_64 x86_64 x86_64 GNU/Linux ``` ## Exercises diff --git a/mkdocs/docs/HPC/linux-tutorial/hpc_infrastructure.md b/mkdocs/docs/HPC/linux-tutorial/hpc_infrastructure.md index 9f71c99572b4..13e1324b167b 100644 --- a/mkdocs/docs/HPC/linux-tutorial/hpc_infrastructure.md +++ b/mkdocs/docs/HPC/linux-tutorial/hpc_infrastructure.md @@ -6,7 +6,7 @@ infrastructure, each with their own purpose. See section [Where to store your data on the {{ hpc }}](../running_jobs_with_input_output_data.md#where-to-store-your-data-on-the-hpc) for a list of available locations. -{% if site==gent %} +{% if site == gent %} ### VO storage If you are a member of a (non-default) virtual organisation (VO), see section [Virtual Organisations](../running_jobs_with_input_output_data.md#virtual-organisations), diff --git a/mkdocs/docs/HPC/macros/LinuxManualURL.md b/mkdocs/docs/HPC/macros/LinuxManualURL.md index bf4510f7e2f2..5b89806379d4 100644 --- a/mkdocs/docs/HPC/macros/LinuxManualURL.md +++ b/mkdocs/docs/HPC/macros/LinuxManualURL.md @@ -1,4 +1,6 @@ -{%- macro LinuxManualURL(OS, site) -%} - -[the chapter titled "Uploading/downloading/editing files", section "Symlinks for data/scratch" in the intro to Linux](localhost:8000/{{ site }}/{{ OS }}/intro-Linux/uploading_files/#symlinks-for-datascratch) -{% endmacro %} \ No newline at end of file +{% macro LinuxManualURL(OS, site) %} + +[the chapter titled "Uploading/downloading/editing files", section "Symlinks +for data/scratch" in the intro to Linux](localhost:8000/{{ site }}/{{ OS +}}/intro-Linux/uploading_files/#symlinks-for-datascratch) +{% endmacro %} diff --git a/mkdocs/docs/HPC/macros/nb.md b/mkdocs/docs/HPC/macros/nb.md index 9361e25adcec..af8b517f7645 100644 --- a/mkdocs/docs/HPC/macros/nb.md +++ b/mkdocs/docs/HPC/macros/nb.md @@ -1,3 +1,3 @@ -{%- macro nb(content) %} +{% macro nb(content) %} {{ content }} -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/mkdocs/docs/HPC/only/gent/available_software/data/00_README.TXT b/mkdocs/docs/HPC/only/gent/available_software/data/00_README.txt similarity index 100% rename from mkdocs/docs/HPC/only/gent/available_software/data/00_README.TXT rename to mkdocs/docs/HPC/only/gent/available_software/data/00_README.txt diff --git a/mkdocs/docs/HPC/sites/available_modules.md b/mkdocs/docs/HPC/sites/available_modules.md index ff49fc53f9b8..996fa2f23385 100644 --- a/mkdocs/docs/HPC/sites/available_modules.md +++ b/mkdocs/docs/HPC/sites/available_modules.md @@ -1,9 +1,9 @@ {% if site == leuven %} [//]: # (Add include if needed) {% elif site == antwerpen %} -{% include "antwerpen/available-modules.md" %} +{% include "antwerpen/available-modules.md" %} {% elif site == brussel %} [//]: # (Add include if needed) {% elif site == gent %} -{% include "gent/available-modules.md" %} +{% include "gent/available-modules.md" %} {% endif %} diff --git a/scripts/available_software/available_software.py b/scripts/available_software/available_software.py index 8e5c9a1990bd..ceb71fec0b05 100644 --- a/scripts/available_software/available_software.py +++ b/scripts/available_software/available_software.py @@ -384,7 +384,10 @@ def generate_software_detail_page( md_file.new_paragraph(f"To start using {software_name}, load one of these modules using a `module load` command " f"like:") md_file.insert_code(f"module load {newest_version}", language="shell") - md_file.new_paragraph("(This data was automatically generated on {{modules_last_updated}})", bold_italics_code="i") + md_file.new_paragraph( + "(This data was automatically generated on {{ modules_last_updated }})", + bold_italics_code="i", + ) md_file.new_line() md_file.new_table( diff --git a/scripts/vsc-venv-wrapper/vsc-venv.sh b/scripts/vsc-venv-wrapper/vsc-venv.sh index b7f1217e323b..1d144c0fb2bd 100755 --- a/scripts/vsc-venv-wrapper/vsc-venv.sh +++ b/scripts/vsc-venv-wrapper/vsc-venv.sh @@ -132,6 +132,7 @@ activate() { # === Warn user if they have modules loaded === # loaded_modules=($(echo "$LOADEDMODULES" | tr ':' '\n' | grep -v -E '^(env|cluster|vsc-venv)/')) # Remove env, cluster and vsc-venv modules + # {# j2lint: disable=S0 #} n_loaded_modules="${#loaded_modules[@]}" if [ "$n_loaded_modules" -gt 0 ]; then echo_warning "You have $n_loaded_modules loaded modules in the current shell. These modules will be purged." diff --git a/site_pick/index.md b/site_pick/index.md index 8a7bfed6aac1..83f942d32aa4 100644 --- a/site_pick/index.md +++ b/site_pick/index.md @@ -7,4 +7,4 @@ hide: {% import 'site_pick.md' as sitepick %} -{{ sitepick.sitepick("Antwerpen", "Gent")}} +{{ sitepick.sitepick("Antwerpen", "Gent") }} diff --git a/site_pick/site_pick.md b/site_pick/site_pick.md index d0b266cebfb6..d21635d90667 100644 --- a/site_pick/site_pick.md +++ b/site_pick/site_pick.md @@ -1,16 +1,16 @@ {% macro sitepick(ant_home_url, gent_home_url, brussel_home_url, leuven_home_url) %} # Please select your site: -{%- if ant_home_url %} +{% if ant_home_url %} [Antwerpen]({{ ant_home_url }}){ .md-button } -{%- endif %} -{%- if gent_home_url %} +{% endif %} +{% if gent_home_url %} [Gent]({{ gent_home_url }}){ .md-button } -{%- endif %} -{%- if brussel_home_url %} +{% endif %} +{% if brussel_home_url %} [Brussel]({{ brussel_home_url }}){ .md-button } -{%- endif %} -{%- if leuven_home_url %} +{% endif %} +{% if leuven_home_url %} [Leuven]({{ leuven_home_url }}){ .md-button } -{%- endif %} +{% endif %} {% endmacro %}