class: center, middle
... works on your ubuntu laptop too
??? to view python3 -m http.server then open a browser at http://0.0.0.0:8000/presentation.html
class: left, middle, inverse
- building on linux (analysis cluster or laptop)
- clone of main mantid git repository
- individual tool setups (e.g. IDEs)
- mantid concepts (e.g. workspaces and algorithms)
- contributing to mantid
class: left, middle
The training will run in "two" sessions:
- Pre-requisites: clone of mantid, conda environment
- Morning: high-level, run cmake, ninja KernelTest
- Homework between sessions: ninja all AllTests
- Afternoon: everything else
Look at the getting started guide and linux with conda
Use alternate port ~/.ssh/config
Host github.com
Hostname ssh.github.com
Port 443
-- Clone repository and activate conda
cd
mkdir code
cd code
git clone git@github.com:mantidproject/mantid.git
source /opt/anaconda/bin/activate
conda activate mantid-developer
List of cmake generators in case the default (ninja) isn't what you want
The environment was created from mantid-developer-linux.yml
class: left, middle
- high-level information
- run cmake
- ninja KernelTest
- run a unit test
cd
mkdir code
mkdir -p build/mantid
-- clone the repository
cd code
git clone git@github.com:mantidproject/mantid.git
cd mantid
cd ~/build/mantid
source /opt/anaconda/bin/activate
conda activate mantid-developer
cmake ~/code/mantid --preset=linux -B ${PWD} -DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja KernelTest
direnv - unclutter your .profile
in sourcetree ~/code/.envrc
layout anaconda mantid-developer /opt/anaconda/bin/conda
in buildtree ~/build/mantid/.envrc
layout anaconda mantid-developer /opt/anaconda/bin/conda
export PYTHONPATH=./bin/:${PYTHONPATH}
-- Alternate
source /opt/anaconda/bin/activate
conda activate mantid-developer
Using ctest
ctest -R KernelTest_TimeSeriesPropertyTest
-- By hand
./bin/KernelTest TimeSeriesPropertyTest
-- With gdb
gdb --args ./bin/KernelTest TimeSeriesPropertyTest
-- All together
ninja KernelTest && ctest -R KernelTest_TimeSeriesPropertyTest
- build mantidworkbench and start it
--
- Hint: it is part of the
all
target
--
- Hint:
bin/launch_mantidworkbench.sh
- Some background
- High level view of mantid's cmake external data
- Building/running a single unit test in C++ and python (link to gdb instructions )
- Building documentation
- Running single doctests
- Running single system test
-
ISIS start Mantid in 2008
-
ORNL joined the project in mid-2010
-
Mantid started using cmake in late 2010 --
-
RHEL7 released in 2014
-
ninja as preferred build tool
-
ccache configuration --
-
v6.3.0 (Feb 2022) conda packages for all platforms
.github
- issue templatesFramework
- objects, algorithms, etcTesting
- data, system tests, cxxtest frameworkbuildconfig
- cmake modules, CI scripts, etcconda/recipes
- condadev-docs
- source for developer.mantidproject.orgdocs
- source for docs.mantidproject.orgexternal
- cmake downloads external projects hereimages
installers/conda
instrument
- IDF and sample environmentsqt
- mantidqt and mantidworkbenchscripts
- random python codetools
- random developer code
./systemtest -R CodeConventions
-- What effecitvely happens
cmake --build . -- StandardTestData
cmake --build . -- SystemTestData
# mess with the PYTHONPATH
python ..../runSystemTests.py -R CodeConventions
https://testdata.mantidproject
(and other places)~/MantidExternalDataMD5/affe68aca428fbaade81fc6ac3a5fb28
Testing/Data/SystemTest/EVS15036.raw.md5
- contents
affe68aca428fbaade81fc6ac3a5fb28
- contents
ExternalData/Testing/Data/SystemTest/EVS15036.raw
--
.bottom.center.bold[To get new files need to run cmake .
in the build tree]
./bin/launch_mantidworkbench.sh --version
./bin/launch_mantidworkbench.sh --help
./bin/launch_mantidworkbench.sh --debug -x myawesomescript.py
ninja help | grep docs
--
ninja dev-docs-html
ls dev-docs/
--
cd ~/build/mantid
python -m sphinx --no-color -b doctest -d docs/doctrees \
~/code/mantid/docs/source docs/doctest \
~/code/mantid/docs/source/path-to-file.rst