Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions config/templates/hpc.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- if site == 'Gent' %}
{% if site == 'Gent' %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oa8choo2 Are you sure the {% is perfectly equivalent?

The {%- does whitespace trimming I think, see also https://jinja.palletsprojects.com/en/stable/templates/#whitespace-control

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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions config/templates/os_pick.template
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions custom_plugin/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 6 additions & 4 deletions mkdocs/docs/HPC/linux-tutorial/beyond_the_basics.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/HPC/linux-tutorial/common_pitfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/HPC/linux-tutorial/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/docs/HPC/linux-tutorial/hpc_infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
10 changes: 6 additions & 4 deletions mkdocs/docs/HPC/macros/LinuxManualURL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{%- macro LinuxManualURL(OS, site) -%}
<!--- change url once deployed! --->
[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 %}
{% macro LinuxManualURL(OS, site) %}
<!-- change url once deployed! -->
[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 %}
4 changes: 2 additions & 2 deletions mkdocs/docs/HPC/macros/nb.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{%- macro nb(content) %}
{% macro nb(content) %}
<span style="white-space: nowrap;">{{ content }}</span>
{% endmacro %}
{% endmacro %}
4 changes: 2 additions & 2 deletions mkdocs/docs/HPC/sites/available_modules.md
Original file line number Diff line number Diff line change
@@ -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 %}
5 changes: 4 additions & 1 deletion scripts/available_software/available_software.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions scripts/vsc-venv-wrapper/vsc-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion site_pick/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ hide:

{% import 'site_pick.md' as sitepick %}

{{ sitepick.sitepick("Antwerpen", "Gent")}}
{{ sitepick.sitepick("Antwerpen", "Gent") }}
16 changes: 8 additions & 8 deletions site_pick/site_pick.md
Original file line number Diff line number Diff line change
@@ -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 %}
Loading