2024-02-16 07:35:25 -08:00
|
|
|
#!/bin/bash
|
2024-02-07 17:25:43 -08:00
|
|
|
#
|
|
|
|
# This script generates documentation using pydoc-markdown and renders the website using Quarto.
|
|
|
|
#
|
2024-02-16 07:35:25 -08:00
|
|
|
|
|
|
|
missing_deps=false
|
|
|
|
|
2024-02-07 17:25:43 -08:00
|
|
|
#
|
2024-02-16 07:35:25 -08:00
|
|
|
# Check for missing dependencies, report them, and exit when building the
|
|
|
|
# website is likely to fail.
|
|
|
|
#
|
|
|
|
for dependency in node pydoc-markdown quarto python yarn npm
|
|
|
|
do
|
|
|
|
if ! command -v "$dependency" &> /dev/null
|
|
|
|
then
|
|
|
|
echo "Command '$dependency' not found."
|
|
|
|
missing_deps=true
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$missing_deps" = true ]
|
|
|
|
then
|
|
|
|
echo -e "\nSome of the dependencies are missing."
|
|
|
|
echo "Please install them to build the website."
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-02-07 17:25:43 -08:00
|
|
|
|
|
|
|
# Generate documentation using pydoc-markdown
|
|
|
|
pydoc-markdown
|
|
|
|
|
|
|
|
# Process notebooks using a Python script
|
2024-02-29 15:47:30 -05:00
|
|
|
python ./process_notebooks.py render
|
2024-02-07 17:25:43 -08:00
|
|
|
|
|
|
|
# Start the website using yarn
|
|
|
|
yarn start
|