Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Getting Started page #374

Merged
merged 76 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
ba3d4ae
create getting started page, add initial flowcharts for HPC and Cloud…
b-reyes Oct 11, 2024
6dccf40
add transparent background to digraph, provide class to digraph, set …
b-reyes Oct 16, 2024
51c5f36
push changes to see if transparent background works with RTD rendering
b-reyes Oct 17, 2024
e9e0c61
instead of using graphviz directly in markdown generate svg using dot…
b-reyes Oct 17, 2024
1749102
modify color scheme for flowcharts, modify produced svgs so their hei…
b-reyes Oct 18, 2024
3ed042f
change node color for light mode to black/white for flowcharts
b-reyes Oct 21, 2024
a7aadef
add intro paragraphs to getting started page and modify hpc flowchart
b-reyes Oct 21, 2024
112c82f
move getting started and faq page into accessing RC resources, move t…
b-reyes Oct 21, 2024
5b3d4b0
reformat the logging in page and work on the getting a CURC account s…
b-reyes Oct 21, 2024
15f4aa5
rename first heading in index to Getting Started, rename getting_star…
b-reyes Oct 23, 2024
417b710
put RMACC page content in tab section in logging-in.md, replace all t…
b-reyes Oct 25, 2024
13409fb
remove rmacc folder holding pngs as they are no longer used
b-reyes Oct 25, 2024
7874301
move current-sem-trainings.md under the access folder, create a direc…
b-reyes Oct 25, 2024
4b685bf
remove unused Logging-in directory
b-reyes Oct 25, 2024
94a3a8f
remove unused directory Interactive-Jobs
b-reyes Oct 25, 2024
9efedb2
remove unused Job-Submissions directory
b-reyes Oct 25, 2024
39b2f81
move File-Transfers directory under compute and rename it to globus_i…
b-reyes Oct 25, 2024
5d0ac87
remove unused Loading-Modules directory
b-reyes Oct 25, 2024
f1ab325
remove unused Templates directory
b-reyes Oct 25, 2024
dbebf86
remove unused XSEDE directory
b-reyes Oct 25, 2024
04a6306
move Petalibrary folder to storage/petalibrary and rename it to mount…
b-reyes Oct 25, 2024
9a0feca
change current-sem-trainings.md tabs to new format and make sentence …
b-reyes Oct 25, 2024
cd9c339
move amc-access-images under additional-resources/amc_ssh_images, mov…
b-reyes Oct 25, 2024
453b111
reorganize FAQ page so it is less overwhelming and has sections for C…
b-reyes Oct 25, 2024
c3eb5db
move over a majority of the duo page items into the Duo FAQ section, …
b-reyes Oct 25, 2024
68380cc
put last duo item under FAQ section, remove Duo page, add where to fi…
b-reyes Oct 28, 2024
bf4f59a
move courses using rc resources to its own page under additional reso…
b-reyes Oct 28, 2024
ef20798
rename access directory to getting_started and modify all references …
b-reyes Oct 28, 2024
17bf526
complete Python script for checking tab references and add it to the …
b-reyes Oct 28, 2024
2f52212
do incorrect tab reference to make sure it is caught
b-reyes Oct 28, 2024
ee3fc1e
modify RTD build to take into account building of dot files and check…
b-reyes Oct 28, 2024
93743c7
fix env var reference in .readthedocs.yaml
b-reyes Oct 28, 2024
344ddbc
try different method for pre checks
b-reyes Oct 28, 2024
e47699e
modify items so building of graphs and checks occur before docs build
b-reyes Oct 28, 2024
ead3848
fix intentional incorrect tab reference, the check worked!!
b-reyes Oct 28, 2024
7fc430f
see current directoriy in RTD build
b-reyes Oct 28, 2024
f2dbb4c
see if creating svg and then having RTD overwrite it will work
b-reyes Oct 28, 2024
7f3850e
remove modification to dot file as it worked!
b-reyes Oct 28, 2024
3d647fb
replace old tab usage with new tab usage on the alpine-hardware, slur…
b-reyes Oct 28, 2024
35e53da
add blurb for CFS to navigating_docs.md
b-reyes Oct 29, 2024
8dcd7ce
fix all links associated with the flowcharts, modify items on landing…
b-reyes Oct 29, 2024
d32b092
put all tabs created on blanca.md page in new tab format
b-reyes Oct 29, 2024
2c88104
turn tabs in ood landing page into new tab format
b-reyes Oct 29, 2024
46ff7b2
modify tabs in batch-jobs.md and interactive-jobs.md so they fit new …
b-reyes Oct 30, 2024
50215fc
modify tabs for petalibrary.md so they fit new format
b-reyes Oct 30, 2024
a9be814
modify tabs in spack.md so the fit new format
b-reyes Oct 30, 2024
7e8bfe8
modify tabs in coding-best-practices.md so they are in the new format
b-reyes Oct 30, 2024
9fa1bcf
put tabs in new format for the MPIBestpractices.md page
b-reyes Oct 30, 2024
e65cac9
modify tabs used in MPI-C.md and MPI-Fortran.md so they are in the ne…
b-reyes Oct 30, 2024
cc03e70
modify same named tabs used in MPI-C.md and MPI-Fortran.md so they ar…
b-reyes Oct 30, 2024
c180292
modify tabs on OpenMP-C.md and OpenMP-Fortran.md pages so they are in…
b-reyes Oct 30, 2024
016e0ec
remove all custom.css content associated with old tabs, remove sphinx…
b-reyes Oct 30, 2024
38da0e7
remove commented out code in remove_tooltip.py
b-reyes Oct 30, 2024
d04e331
make institution tabs in logging-in.md page sychronized and correct r…
b-reyes Oct 30, 2024
1de6ba3
create a script that automatically generates svg based on dot files, …
b-reyes Oct 31, 2024
69626e9
replace source with /bin/sh in RTD file
b-reyes Oct 31, 2024
0b7f033
remove unnecessary printing of file name in create_svg.sh
b-reyes Oct 31, 2024
3900a85
move check_tab_ref.py into its own directory that contains all of our…
b-reyes Oct 31, 2024
d525b1f
finish check of dot file references, add dot reference check to makef…
b-reyes Nov 1, 2024
8c77217
change file name Containerization.md to contrainerization.md
b-reyes Nov 1, 2024
7981d62
fix mistake made on purpose in dot file
b-reyes Nov 1, 2024
f37646b
trouble shoot RTD fail
b-reyes Nov 1, 2024
3cc6b56
troubleshoot rtd
b-reyes Nov 1, 2024
bbd8fe6
rename containerization.md to containerization2.md
b-reyes Nov 1, 2024
8a62042
rename containerization2.md to containerization.md
b-reyes Nov 1, 2024
4d89460
put in incorrect reference in cloud flowchart for testing purposes
b-reyes Nov 1, 2024
023eecb
fix purposeful incorrect ref in cloud flowchart, comment on check_dot…
b-reyes Nov 1, 2024
58f94e6
make small improvements to grammar and admonition content on faq and …
b-reyes Nov 1, 2024
c92f74a
rename igraphviz_flowcharts to graphviz_flowcharts, begin creating RE…
b-reyes Nov 1, 2024
2bf9be0
make dot flowchart files have doc-flowchart class instead of gs-flowc…
b-reyes Nov 1, 2024
45b3c2c
make --pst-color-accent cu boulder gold when in dark mode to prevent …
b-reyes Nov 1, 2024
4c1fe3c
Merge branch 'main' into add-flow-chart
b-reyes Nov 1, 2024
bce7741
remove indent for bullets in item 4 of README.md in graphviz directory
b-reyes Nov 1, 2024
2354565
improve grammar, shorten sentences, and add clarity to statements
b-reyes Nov 4, 2024
e6e10e3
update CSU link as the other one caused a 404
b-reyes Nov 4, 2024
639585f
improve sentence in High Performance Computing Flowchart section
b-reyes Nov 5, 2024
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
6 changes: 6 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-latest"
jobs:
pre_build:
- /bin/sh "./graphviz_flowcharts/create_svg.sh"
- python ./graphviz_flowcharts/remove_tooltip.py
- python custom_checks/check_dot_ref.py
- python custom_checks/check_tab_ref.py

# Build from the docs/ directory with Sphinx
sphinx:
Expand Down
1 change: 0 additions & 1 deletion FAQ/README

This file was deleted.

Binary file removed FAQ/duo-management2edit.png
Binary file not shown.
Binary file removed File-Transfers/file-transf-vid.jpg
Binary file not shown.
Binary file removed File-Transfers/globus-image-2.png
Binary file not shown.
Binary file removed Interactive-Jobs/Gui-Applications-Video.jpg
Binary file not shown.
Binary file removed Interactive-Jobs/Interactive-Jobs-Video.jpg
Binary file not shown.
Binary file removed Interactive-Jobs/putty-1-small.png
Binary file not shown.
Binary file removed Interactive-Jobs/putty-2-small.png
Binary file not shown.
1 change: 0 additions & 1 deletion Job-Submissions/README.md

This file was deleted.

Binary file removed Job-Submissions/job-submissions-vid.jpg
Binary file not shown.
Binary file removed Loading-Modules/videopreview.j.jpg
Binary file not shown.
Binary file removed Logging-in/Logging-In-Mac-Vid.jpg
Binary file not shown.
Binary file removed Logging-in/Logging-In-Pic1.png
Binary file not shown.
Binary file removed Logging-in/Logging-In-Windows.jpg
Binary file not shown.
1 change: 0 additions & 1 deletion Logging-in/README.md

This file was deleted.

Binary file removed Logging-in/ssh_client_install.docx
Binary file not shown.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SPHINXBUILD = python -m sphinx -T -E
BUILDDIR = build
SOURCEDIR = docs

GRAPH_PATH = ./graphviz_flowcharts
.PHONY: default clean view html

default: html
Expand All @@ -18,4 +18,8 @@ clean:
-rm -r $(BUILDDIR)

html:
source "${GRAPH_PATH}/create_svg.sh"
python $(GRAPH_PATH)/remove_tooltip.py
python custom_checks/check_dot_ref.py
python custom_checks/check_tab_ref.py
$(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees -D language=en $(SOURCEDIR) $(BUILDDIR)/html
1 change: 0 additions & 1 deletion Petalibrary/Mounting/example.md

This file was deleted.

Binary file removed Petalibrary/Mounting/smb4.PNG
Binary file not shown.
29 changes: 0 additions & 29 deletions Templates/General-Job-Template.sh

This file was deleted.

23 changes: 0 additions & 23 deletions Templates/MPI-Job-Template.sh

This file was deleted.

27 changes: 0 additions & 27 deletions Templates/Matlab-Job-Template.sh

This file was deleted.

22 changes: 0 additions & 22 deletions Templates/OpenMP-Job-Template

This file was deleted.

Binary file removed XSEDE/Screen Shot 2018-01-18 at 9.49.55 AM.png
Binary file not shown.
Binary file removed XSEDE/Screen Shot 2018-01-18 at 9.54.13 AM.png
Binary file not shown.
Binary file removed XSEDE/xsede1.png
Binary file not shown.
Binary file removed XSEDE/xsede2.png
Binary file not shown.
6 changes: 4 additions & 2 deletions conda_dev_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ dependencies:
- python==3.11.9
- sphinx==7.3.7
- myst-parser==3.0.1
- graphviz==12.0.0
- pip
- pip:
- sphinx-book-theme==1.1.3
- sphinx-copybutton==0.5.2
- sphinx-tabs==3.4.5
- sphinx-togglebutton==0.3.2
- sphinx-togglebutton==0.3.2
- lxml==5.3.0
- sphinx-design==0.6.1
102 changes: 102 additions & 0 deletions custom_checks/check_dot_ref.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# When creating our dot files for the flowcharts, we have to use html
# references. This is unfortunate because our normal Markdown checks
# will not catch these references. In this script we create a custom
# check that will make sure all references in a dot file and associated
# svg file exist.

import subprocess
import os
import xml.etree.ElementTree as ET
from pathlib import Path

def grep_in_directory(directory, phrase):
try:
# Use subprocess to call grep
result = subprocess.run(
['grep', '-rl', phrase, directory],
capture_output=True,
text=True,
check=True
)
return result.stdout.splitlines()
except subprocess.CalledProcessError as e:
# If grep finds no matches, it raises an error
if e.returncode == 1:
return [] # No matches found
else:
raise # Some other error occurred

def get_all_dot_files(directory):
file_names_without_extension = []

# List all entries in the specified directory
for entry in os.listdir(directory):
entry_path = os.path.join(directory, entry)
# Check if it's a file (not a directory)
if os.path.isfile(entry_path):
# Get the file name without extension
file_name, _ = os.path.splitext(entry)
file_names_without_extension.append(file_name)

return file_names_without_extension

def get_xlink_hrefs(svg_file):
# Parse the SVG file
tree = ET.parse(svg_file)
root = tree.getroot()

# Namespace dictionary for SVG
namespaces = {
'svg': 'http://www.w3.org/2000/svg',
'xlink': 'http://www.w3.org/1999/xlink'
}

# Find all elements with 'xlink:href' attribute
hrefs = []
for elem in root.findall('.//*[@xlink:href]', namespaces):

# get hrefs and replace html with md
hrefs.append(elem.attrib['{http://www.w3.org/1999/xlink}href'].replace('html', 'md'))

return hrefs

def check_file_exists(file_path):
return Path(file_path).is_file()

def get_false_indices(lst):
return [index for index, value in enumerate(lst) if not value]

if __name__ == "__main__":

# directory to search for dot file reference
main_directory = "./docs"

# directory containing dot files
dot_directory = "./graphviz_flowcharts/dot_files"

# get list of all dot files in the dot_directory
dot_file_names = get_all_dot_files(dot_directory)

for file_name in dot_file_names:

# svg reference to look for in docs
svg_ref = "graphviz_flowcharts/generated_images/" + file_name + ".svg"

xlink_hrefs = get_xlink_hrefs(svg_ref)

# get all files in the docs that reference an svg generated by a dot file
files_w_svg_ref = grep_in_directory(main_directory, svg_ref)

if files_w_svg_ref:

for file_referencing in files_w_svg_ref:

path_exists = [check_file_exists(Path(file_referencing).parent / ref) for ref in xlink_hrefs]

false_ind = get_false_indices(path_exists)

nonexistent_paths = [xlink_hrefs[ind] for ind in false_ind]

if nonexistent_paths:
dot_file = 'graphviz_flowcharts/generated_images/' + file_name + '.dot'
raise RuntimeError(f"The following hrefs in {dot_file} DO NOT EXIST: {nonexistent_paths}")
82 changes: 82 additions & 0 deletions custom_checks/check_tab_ref.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Although sphinx-design allows you to reference tabs, the format it
# requires is not checkable by our normal workflow. For this reason,
# we needed to create this script. This script finds all Markdown
# references that contain "?tabset-". For these references, it then
# ensures that all of these references are referring to existing
# labels provided by tabbed content.

import re
import os
import pathlib


def check_tab_reference(md_path):

# Load the Markdown file
with open(md_path, 'r') as file:
content = file.read()

# Regular expression to grab all items that are Markdown syntax for references
links = re.findall(r'\[([^\]]+)\]\(([^)]+)\)', content)

# For each cross-reference identified, ensure that the tab references actually exist in the specified file
for link_text, link in links:

if "?tabset-" in link:

print(f"Checking the following reference from {md_path}")
print(f'Text: {link_text}, URL: {link} \n')

# remove html in reference name and use md instead
link = link.replace('html', 'md')

# split apart reference to get individual parts
link_parts = re.split(r'[?=#]', link)

# assign appropriate parts so they can be checked
if "tabset" not in link_parts[0]:
path = link_parts[0]
tabset_name = link_parts[1]
tab_name = link_parts[2]
tabsec_name = link_parts[3]
else:
path = None
tabset_name = link_parts[0]
tab_name = link_parts[1]
tabsec_name = link_parts[2]

# list of items to look for in file
look_for_list = [":sync-group: " + tabset_name, ":sync: " + tab_name, "(" + tabsec_name + ")="]

if path:

checked_file = os.path.join(md_file_path.parent, path)

# if there is a path in the reference, open the file
with open(checked_file , 'r') as file:
temp_content = file.read()

# check that tabset_name, tab_name, and tabsec_name all exist in file
include_check = all(s in temp_content for s in look_for_list)
else:

checked_file = md_path

# check that tabset_name, tab_name, and tabsec_name all exist in file
include_check = all(s in content for s in look_for_list)

# throw an error if the tab references do not exist
if not include_check:
raise RuntimeError(f"One of the following tab references DO NOT EXIST in {checked_file}: {look_for_list}")

def find_markdown_files(dir):
return list(pathlib.Path(dir).rglob('*.md'))

if __name__ == "__main__":

# get all markdown files in docs and check them for correct tab references
current_directory = pathlib.Path.cwd()
markdown_files = find_markdown_files(current_directory)

for md_file_path in markdown_files:
check_tab_reference(md_file_path)
Loading