Skip to content

Commit

Permalink
Remove outdated information from top level README (#573)
Browse files Browse the repository at this point in the history
* Remove outdated information from top level README

* Update description for Catch2 setup
  • Loading branch information
tmadlener authored Apr 10, 2024
1 parent b94cc63 commit 2c87bf3
Showing 1 changed file with 12 additions and 37 deletions.
49 changes: 12 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ Install ROOT 6.08.06 (or later) and set up your ROOT environment:

### Catch2 v3 (optional)

By default Podio requires that a static [Catch2 v3](https://github.com/catchorg/Catch2/tree/devel) library is available and the unittests will be built against that.
Using the `-DUSE_EXTERNAL_CATCH2=OFF` to configure CMake will instead fetch an appropriate version of the library and build it on the fly.
Podio uses [Catch2 v3](https://github.com/catchorg/Catch2/tree/devel) for some
unittests. By default it will look for a suitable external version of this
library already installed (an available on the `CMAKE_PREFIX_PATH`) and use that
if possible. In case no suitable version is found podio will fetch a copmatible
version and build that automatically. This behavior is controlled via the
`USE_EXTERNAL_CATCH2` cmake variable. It defaults to `AUTO` but can also be set
to `ON` or `OFF` to fully control the desired behavior.

### Python > 3.6

Expand Down Expand Up @@ -102,40 +107,14 @@ To see a list of options, do this in the build-directory:

cmake -LH ..

## Running

The examples are for creating a file "example.root",

tests/write

and reading it again in C++,

tests/read

It is also possible to read the file again using the
[`tests/read.py`](tests/read.py) script. Make sure to have run `init.sh`
and `env.sh` first. Additionally you have to make `ROOT` aware of
`libTestDataModel.so` to be able to read in the data types defined there. There
are two ways to do that. First it is possible to add the directory to the
`LD_LIBRARY_PATH`

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/tests

Secondly it is also possible to explicitly load the library via `ROOT` in the
script by adding the following lines *after* the imports from `__future__`

```python
import os
BUILD_PATH = os.getcwd()
## Running tests

import ROOT
ROOT.gSystem.Load(os.path.join(BUILD_PATH, 'tests/libTestDataModel.so'))
```
After compilation you can run unit tests as well as some integration level tests
that check the full I/O circle via

Either of the two versions allows you to now read the `example.root` file again
using
ctest --output-on-failure

python ../tests/read.py
These tests also create some example files and read them back.

## Installing using SPACK

Expand Down Expand Up @@ -164,10 +143,6 @@ The generation script has the following additional options:
- `--dryrun` (`-d`): Only run the generation logic and validate yaml, do not write files to disk
- `--lang` (`-l`): Specify the programming language (default: cpp), choices: cpp, julia

## Running tests
After compilation you can run rudimentary tests with

make test

## Running workflows
To run workflows manually (for example, when working on your own fork) go to
Expand Down

0 comments on commit 2c87bf3

Please sign in to comment.