From 1d977e90e6cd8ee7023265dbc87d4855afbb38d1 Mon Sep 17 00:00:00 2001 From: Aizaz Ali Khan Date: Tue, 19 Dec 2023 11:27:28 +0100 Subject: [PATCH 1/2] adding kernel links, displaying documentation urls, tooltips --- data/hooks.py | 2 +- data/kernels_and_extensions.yml | 30 ++++++++++++++++++++++++++++++ docs/gen_detail_pages.py | 2 +- include/details.md | 23 ++++++++++++++--------- mkdocs.yml | 10 +++++++++- 5 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 data/kernels_and_extensions.yml diff --git a/data/hooks.py b/data/hooks.py index 3fd0d2a..a616802 100644 --- a/data/hooks.py +++ b/data/hooks.py @@ -6,7 +6,7 @@ def generate_cards(*args, **kwargs): # get all data data_dir = "data" - exclude = ["template.yaml","hooks.py","cardinfo.yaml"] + exclude = ["template.yaml","hooks.py","cardinfo.yaml", "kernels_and_extensions.yml"] files = glob.glob(os.path.join(data_dir, "*.yaml")) services_names = [os.path.splitext(os.path.basename(file_name))[0] for file_name in files] diff --git a/data/kernels_and_extensions.yml b/data/kernels_and_extensions.yml new file mode 100644 index 0000000..31b1a01 --- /dev/null +++ b/data/kernels_and_extensions.yml @@ -0,0 +1,30 @@ +Links: + Python: https://github.com/python/python + Matlab: https://github.com/mathworks/jupyter-matlab-proxy + R: https://github.com/IRkernel/IRkernel + Octave: https://github.com/Calysto/octave_kernel + Sage: https://github.com/sagemath/sage + gnuplot: https://github.com/has2k1/gnuplot_kernel + Mathematica: https://github.com/WolframResearch/WolframLanguageForJupyter + Cling: https://github.com/jupyter-xeus/xeus-cling + evcxr: https://github.com/evcxr/evcxr + Gophernotes: https://github.com/gopherdata/gophernotes + Calysto Scheme: https://github.com/Calysto/calysto_scheme + Bash: https://github.com/takluyver/bash_kernel + JavaScript: https://github.com/n-riesco/ijavascript + Ruby: https://github.com/SciRuby/iruby + Ansible: https://github.com/ansible/ansible-jupyter-kernel + Cling: https://github.com/jupyter-xeus/xeus-cling + TensorFlow: https://www.tensorflow.org/tensorboard + Gurobi: https://www.gurobi.com/documentation/ + PyTorch: https://pytorch.org/docs/stable/index.html + SageMath: https://github.com/sagemath/sage + Julia: https://github.com/JuliaLang/IJulia.jl + C++: https://github.com/jupyter-xeus/xeus-cling + Rust: https://depth-first.com/articles/2020/09/21/interactive-rust-in-a-repl-and-jupyter-notebook-with-evcxr/ + Go: https://github.com/gopherdata/gophernotes + Scheme: https://github.com/Calysto/calysto_scheme + Python 3.9: https://docs.jupyter.org/en/latest/install/notebook-classic.html + C++ 11/14/17: https://github.com/AnthonyCalandra/modern-cpp-features + Matlab 2020b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2020b-linux.pdf + Matlab 2022b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2022b-windows.pdf \ No newline at end of file diff --git a/docs/gen_detail_pages.py b/docs/gen_detail_pages.py index 5f1dc2b..e25f7ed 100644 --- a/docs/gen_detail_pages.py +++ b/docs/gen_detail_pages.py @@ -5,7 +5,7 @@ # get all data data_dir = "data" -exclude = ["template.yaml", "hooks.py", "cardinfo.yaml"] +exclude = ["template.yaml", "hooks.py", "cardinfo.yaml", "kernels_and_extensions.yml"] files = glob.glob(os.path.join(data_dir, "*.yaml")) services_names = [os.path.splitext(os.path.basename(file_name))[0] for file_name in files] diff --git a/include/details.md b/include/details.md index 64545ed..d63a8e8 100644 --- a/include/details.md +++ b/include/details.md @@ -12,7 +12,7 @@ __Target group__ __Login process__ -: {{ login_process }} +: {{ login_process }} __Support__ @@ -20,10 +20,11 @@ __Support__ __Documentation__ -: {{ documentation_url }} +: {% if documentation_url %}[{{ documentation_url }}]({{ documentation_url }}){% else %}None{% endif %} -## Features + +## Features {{ title }} offers: === "General" @@ -42,18 +43,22 @@ __Documentation__ - {{ feature }} {% endfor %} -{% if (features.programming_languages or features.environments) %} -=== "Kernels" +{% if (features.programming_languages or features.environments) %} +=== "Kernels :material-information-outline:{ title="Links to Kernels" }" {% if features.programming_languages %} Programming Languages: {% for kernel in features.programming_languages %} + {% if Links[kernel] %} + - [{{ kernel }}]({{ Links[kernel] }}) + {% else %} - {{ kernel }} - {% endfor %} {% endif %} - {% if features.environments %} + {% endfor %} +{% endif %} + {% if features.environments %} Environments: {% for kernel in features.environments %} - - {{ kernel }} + - {{ kernel }} {% if Links[kernel] %} {{ Links[kernel] }} {% endif %} {% endfor %} {% endif %} {% endif %} @@ -86,7 +91,7 @@ __Documentation__ | Persistent disk space | {{ resources.default_persistent_disk }} | {{ resources.max_persistent_disk }} | {% if technicals %} -## Technicals +## Technical Some technical insights about {{ title }}: {% if technicals.platform %} - Platform: {{ technicals.platform }} diff --git a/mkdocs.yml b/mkdocs.yml index c77777e..78f6e39 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,13 +13,15 @@ theme: logo: assets/nfdi_rgb_Wortmarke_Zusatz_hoch.png favicon: assets/nfdi_rgb_Wortmarke.png language: en - #features: + features: + - content.tooltips # - navigation.tabs custom_dir: custom/ extra_css: - css/neoteroi-cards.css - css/extra.css + - css/hint.min.css extra_javascript: - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js @@ -38,14 +40,20 @@ markdown_extensions: - tables - def_list - neoteroi.cards + - abbr + - attr_list + - pymdownx.snippets plugins: - search + - tooltips - gen-files: scripts: - docs/gen_detail_pages.py - macros: include_dir: include + include_yaml: + - data/kernels_and_extensions.yml - mkdocs-simple-hooks: hooks: on_pre_build: "data.hooks:generate_cards" From f04494e09c412a9c62a93efe1a2496a19ef3a2ae Mon Sep 17 00:00:00 2001 From: Aizaz Ali Khan Date: Tue, 20 Feb 2024 11:49:18 +0100 Subject: [PATCH 2/2] kernels in lower case, sorted by name, removed unwanted --- data/hooks.py | 2 +- data/kernels_and_extensions.yaml | 22 ++++++++++++++++++++++ data/kernels_and_extensions.yml | 30 ------------------------------ docs/gen_detail_pages.py | 2 +- include/details.md | 9 ++++++--- 5 files changed, 30 insertions(+), 35 deletions(-) create mode 100644 data/kernels_and_extensions.yaml delete mode 100644 data/kernels_and_extensions.yml diff --git a/data/hooks.py b/data/hooks.py index a616802..cf5c822 100644 --- a/data/hooks.py +++ b/data/hooks.py @@ -6,7 +6,7 @@ def generate_cards(*args, **kwargs): # get all data data_dir = "data" - exclude = ["template.yaml","hooks.py","cardinfo.yaml", "kernels_and_extensions.yml"] + exclude = ["template.yaml","hooks.py","cardinfo.yaml", "kernels_and_extensions.yaml"] files = glob.glob(os.path.join(data_dir, "*.yaml")) services_names = [os.path.splitext(os.path.basename(file_name))[0] for file_name in files] diff --git a/data/kernels_and_extensions.yaml b/data/kernels_and_extensions.yaml new file mode 100644 index 0000000..f03fd7c --- /dev/null +++ b/data/kernels_and_extensions.yaml @@ -0,0 +1,22 @@ +Links: + ansible: https://github.com/ansible/ansible-jupyter-kernel + bash: https://github.com/takluyver/bash_kernel + c++: https://github.com/jupyter-xeus/xeus-cling + cling: https://github.com/jupyter-xeus/xeus-cling + golang: https://github.com/gopherdata/gophernotes + gurobi: https://www.gurobi.com/documentation/ + gnuplot: https://github.com/has2k1/gnuplot_kernel + javaScript: https://github.com/n-riesco/ijavascript + julia: https://github.com/JuliaLang/IJulia.jl + matlab 2020b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2020b-linux.pdf + matlab 2022b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2022b-windows.pdf + mathmatica: https://github.com/mmatera/iwolfram + octave: https://github.com/Calysto/octave_kernel + python: https://ipython.org/ + r: https://github.com/IRkernel/IRkernel + ruby: https://github.com/SciRuby/iruby + sage: https://www.sagemath.org/ + scheme: https://github.com/Calysto/calysto_scheme + rust: https://crates.io/crates/evcxr_jupyter + c++: https://github.com/AnthonyCalandra/modern-cpp-features + matlab: https://github.com/mathworks/jupyter-matlab-proxy \ No newline at end of file diff --git a/data/kernels_and_extensions.yml b/data/kernels_and_extensions.yml deleted file mode 100644 index 31b1a01..0000000 --- a/data/kernels_and_extensions.yml +++ /dev/null @@ -1,30 +0,0 @@ -Links: - Python: https://github.com/python/python - Matlab: https://github.com/mathworks/jupyter-matlab-proxy - R: https://github.com/IRkernel/IRkernel - Octave: https://github.com/Calysto/octave_kernel - Sage: https://github.com/sagemath/sage - gnuplot: https://github.com/has2k1/gnuplot_kernel - Mathematica: https://github.com/WolframResearch/WolframLanguageForJupyter - Cling: https://github.com/jupyter-xeus/xeus-cling - evcxr: https://github.com/evcxr/evcxr - Gophernotes: https://github.com/gopherdata/gophernotes - Calysto Scheme: https://github.com/Calysto/calysto_scheme - Bash: https://github.com/takluyver/bash_kernel - JavaScript: https://github.com/n-riesco/ijavascript - Ruby: https://github.com/SciRuby/iruby - Ansible: https://github.com/ansible/ansible-jupyter-kernel - Cling: https://github.com/jupyter-xeus/xeus-cling - TensorFlow: https://www.tensorflow.org/tensorboard - Gurobi: https://www.gurobi.com/documentation/ - PyTorch: https://pytorch.org/docs/stable/index.html - SageMath: https://github.com/sagemath/sage - Julia: https://github.com/JuliaLang/IJulia.jl - C++: https://github.com/jupyter-xeus/xeus-cling - Rust: https://depth-first.com/articles/2020/09/21/interactive-rust-in-a-repl-and-jupyter-notebook-with-evcxr/ - Go: https://github.com/gopherdata/gophernotes - Scheme: https://github.com/Calysto/calysto_scheme - Python 3.9: https://docs.jupyter.org/en/latest/install/notebook-classic.html - C++ 11/14/17: https://github.com/AnthonyCalandra/modern-cpp-features - Matlab 2020b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2020b-linux.pdf - Matlab 2022b: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2022b-windows.pdf \ No newline at end of file diff --git a/docs/gen_detail_pages.py b/docs/gen_detail_pages.py index e25f7ed..5905eb2 100644 --- a/docs/gen_detail_pages.py +++ b/docs/gen_detail_pages.py @@ -5,7 +5,7 @@ # get all data data_dir = "data" -exclude = ["template.yaml", "hooks.py", "cardinfo.yaml", "kernels_and_extensions.yml"] +exclude = ["template.yaml", "hooks.py", "cardinfo.yaml", "kernels_and_extensions.yaml"] files = glob.glob(os.path.join(data_dir, "*.yaml")) services_names = [os.path.splitext(os.path.basename(file_name))[0] for file_name in files] diff --git a/include/details.md b/include/details.md index d63a8e8..3a2fa89 100644 --- a/include/details.md +++ b/include/details.md @@ -1,3 +1,4 @@ +icon: fontawesome/solid/info # {{ title }} The {{ title }} can be reached [here]({{ service_url }}) and is provided by {{ provider }}. @@ -48,8 +49,8 @@ __Documentation__ {% if features.programming_languages %} Programming Languages: {% for kernel in features.programming_languages %} - {% if Links[kernel] %} - - [{{ kernel }}]({{ Links[kernel] }}) + {% if Links[kernel | lower] %} + - [{{ kernel }}]({{ Links[kernel | lower] }}) {% else %} - {{ kernel }} {% endif %} @@ -58,7 +59,9 @@ __Documentation__ {% if features.environments %} Environments: {% for kernel in features.environments %} - - {{ kernel }} {% if Links[kernel] %} {{ Links[kernel] }} {% endif %} +- {{ kernel }} {% if Links[kernel] %} [{{ Links[kernel] }}]({{ Links[kernel] }}) + {% else %} + {% endif %} {% endfor %} {% endif %} {% endif %}