mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 21:55:16 -04:00
Docs: Add Sphinx-based manual
This commit is contained in:
parent
03f49e929a
commit
934a489bed
16 changed files with 508 additions and 8 deletions
|
|
@ -25,8 +25,9 @@ pip3 install --quiet \
|
|||
numpy \
|
||||
matplotlib \
|
||||
requests \
|
||||
types-lxml \
|
||||
types-requests \
|
||||
mypy==0.991
|
||||
mypy==1.3.0
|
||||
|
||||
# download inputs for minimax_to_fortran_source.py
|
||||
wget -q https://www.cp2k.org/static/downloads/1_xData.zip
|
||||
|
|
|
|||
|
|
@ -29,9 +29,13 @@ echo -e "\n========== Installing Dependencies =========="
|
|||
apt-get update -qq
|
||||
apt-get install -qq --no-install-recommends \
|
||||
default-jre-headless \
|
||||
libsaxonhe-java
|
||||
libsaxonhe-java \
|
||||
python3 \
|
||||
python3-pip
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
pip3 install --quiet sphinx myst-parser sphinx_rtd_theme lxml
|
||||
|
||||
echo -e "\n========== Generating Manual =========="
|
||||
|
||||
mkdir -p /workspace/artifacts/manual
|
||||
|
|
@ -53,13 +57,27 @@ set +e # disable error trapping for remainder of script
|
|||
$SAXON -o:cp2k.vim ./cp2k_input.xml ${TOOLS}/input_editing/vim/vim.xsl
|
||||
)
|
||||
EXIT_CODE=$?
|
||||
|
||||
if ((EXIT_CODE)); then
|
||||
echo -e "\nSummary: Something is wrong."
|
||||
echo -e "\nSummary: Saxon run failed."
|
||||
echo -e "Status: FAILED\n"
|
||||
else
|
||||
echo -e "\nSummary: Manual generation works fine."
|
||||
echo -e "Status: OK\n"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo -e "\n========== Generating New Manual =========="
|
||||
(
|
||||
set -e # abort if error is encountered
|
||||
/opt/cp2k/docs/generate_input_reference.py ./cp2k_input.xml ./references.html
|
||||
echo ""
|
||||
sphinx-build /opt/cp2k/docs/ /workspace/artifacts/manual/new --jobs 16
|
||||
)
|
||||
EXIT_CODE=$?
|
||||
if ((EXIT_CODE)); then
|
||||
echo -e "\nSummary: Sphinx build failed"
|
||||
echo -e "Status: FAILED\n"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo -e "\nSummary: Manual generation works fine."
|
||||
echo -e "Status: OK\n"
|
||||
|
||||
#EOF
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ run_test mypy --strict ./tools/precommit/format_makefile.py
|
|||
run_test mypy --strict ./tools/docker/generate_dockerfiles.py
|
||||
run_test mypy --strict ./tools/apptainer/generate_apptainer_def_files.py
|
||||
run_test mypy --strict ./tools/conventions/analyze_gfortran_ast.py
|
||||
run_test mypy --strict ./docs/generate_input_reference.py
|
||||
|
||||
# TODO: Find a way to test generate_dashboard.py without git repository.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue