Skip to content

Commit

Permalink
Merge pull request mantidproject#35944 from robertapplin/0-fix-doc-qt…
Browse files Browse the repository at this point in the history
…help-warnings

Better output when building `docs-qthelp` and fix warnings
  • Loading branch information
thomashampson committed Aug 22, 2023
2 parents e5d50aa + 2f25c52 commit 057159d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 33 deletions.
34 changes: 4 additions & 30 deletions conda/recipes/mantiddocs/build.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
#!/usr/bin/env bash
set -ex

# QtHelp docs build needs to start a QApplication so we need an X server on Linux
XVFB_SERVER_NUM=101

function run_with_xvfb {
if [[ $OSTYPE == "linux"* ]]; then
# Use -e because a bug on RHEL7 means --error-file produces an error:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337703;msg=2
# Use -noreset because of an X Display bug caused by a race condition in xvfb:
# https://gitlab.freedesktop.org/xorg/xserver/-/issues/1102
xvfb-run -e /dev/stderr --server-args="-core -noreset -screen 0 640x480x24" \
--server-num=${XVFB_SERVER_NUM} $@
else
eval $@
fi
}

function terminate_xvfb_sessions {
if [[ $OSTYPE == "linux"* ]]; then
echo "Terminating any existing Xvfb sessions"

# Kill Xvfb processes
killall Xvfb || true

# Remove Xvfb X server lock files
rm -f /tmp/.X${XVFB_SERVER_NUM}-lock || true
fi
}

parent_dir="$(dirname "$RECIPE_DIR")"
bash "${parent_dir}"/archive_env_logs.sh "$BUILD_PREFIX" "$PREFIX" 'mantiddocs'

Expand Down Expand Up @@ -65,6 +37,8 @@ cmake --build . --target StandardTestData
export STANDARD_TEST_DATA_DIR=$SRC_DIR/build/ExternalData/Testing/Data
echo 'datasearch.directories = '$STANDARD_TEST_DATA_DIR'/UnitTest/;'$STANDARD_TEST_DATA_DIR'/DocTest/' >> $PREFIX/bin/Mantid.properties

run_with_xvfb cmake --build . --target docs-qthelp
terminate_xvfb_sessions
# Set QT_QPA_PLATFORM=offscreen so we do not need to run with xvfb. Xvfb hides a lot of debug output
export QT_QPA_PLATFORM=offscreen
cmake --build . --target docs-qthelp

cmake --build . --target install
2 changes: 1 addition & 1 deletion docs/source/algorithms/CalculateDIFC-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ an instrument.
Or if OffsetMode is `Signed` :math:`DIFC` will be calculated with the following equation
for logarithmically binned data:

.. math:: DIFC = \frac{m_n}{h}&(L1 + L2)&2sin\theta & * & (1+|BinWidth|)^{-offset}
.. math:: DIFC = \frac{m_n}{h} \cdot (L1 + L2) 2 \sin(\theta) \cdot (1+|BinWidth|)^{-offset}

DIFC is used in the equation

Expand Down
4 changes: 2 additions & 2 deletions docs/source/algorithms/ConvertDiffCal-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ the following equations:

Update existing calibration:

.. math:: DIFC = DIFC_{old} & * & (1+|BinWidth|)^{-offset}
.. math:: DIFC = DIFC_{old} \cdot (1+|BinWidth|)^{-offset}

Calculate :math:`DIFC` from geometry of the experiment:

.. math:: DIFC = \frac{m_n}{h}&(L1 + L2)&2sin\theta & * & (1+|BinWidth|)^{-offset}
.. math:: DIFC = \frac{m_n}{h} \cdot (L1 + L2) 2 \sin(\theta) \cdot (1+|BinWidth|)^{-offset}

The calculations for signed mode is appropriate for full-pattern cross-correlation with logarithmically binned data

Expand Down

0 comments on commit 057159d

Please sign in to comment.