Skip to content

Commit

Permalink
Merge pull request #217 from legend-exp/python
Browse files Browse the repository at this point in the history
fix problem with prettier destroying `:::{}:::` in markdown
  • Loading branch information
gipert authored Dec 31, 2024
2 parents bcba362 + bec8f06 commit db6fcdb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ repos:
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.4"
Expand Down
8 changes: 5 additions & 3 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,18 @@ $ ctest -R basics-mt/print-volumes.mac # run only this test

:::

:::{tip} If you want to open a fancy UI to check the output of `vis` tests, you
may achieve it by:
:::{tip}
If you want to open a fancy UI to check the output of `vis` tests, you may
achieve it by:

1. `cd` to `test/confinement`
1. edit `macros/_vis.mac` to make sure you load an interactive UI (e.g.
`/vis/open OI`)
1. edit the macro you are interested in and swap `_init.mac` with `_vis.mac` at
the very beginning (after `/control/execute`)
1. run the visualization with
`remage -i -g gdml/geometry.gdml -- macros/themacro.mac` :::
`remage -i -g gdml/geometry.gdml -- macros/themacro.mac`
:::

### Configuring CMake

Expand Down
25 changes: 16 additions & 9 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ radioactive source:
/run/beamOn 50
```

:::{admonition} Complete macro file (`vis-gammas.mac`) :class: dropdown
:::{admonition} Complete macro file (`vis-gammas.mac`)
:class: dropdown

```text
/RMG/Manager/Logging/LogLevel detail
Expand Down Expand Up @@ -245,15 +246,18 @@ $ remage --interactive --gdml-files geometry.gdml -- vis-gammas.mac
...
```

:::{note} Interactive visualization requires passing `--interactive` to the
`remage` executable. :::
:::{note}
Interactive visualization requires passing `--interactive` to the
`remage` executable.
:::

Interactions in HPGes and in LAr are marked in red and blue, respectively.

![Simulation visualization](img/tutorial-g4-view.jpg)

:::{tip} With Apptainer, additional tweaks are required in order to allow for
graphics to be displayed, e.g.
:::{tip}
With Apptainer, additional tweaks are required in order to allow for graphics
to be displayed, e.g.

```console
$ apptainer run \
Expand All @@ -264,11 +268,14 @@ $ apptainer run \
path/to/remage_latest.sif --interactive [...]
```

and similarly with Docker. :::
and similarly with Docker.
:::

:::{tip} If `remage` from the Apptainer image refuses to run simulations, this
might be due to some of your environment variables from outside the container.
Give `--cleanenv` a try. :::
:::{tip}
If `remage` from the Apptainer image refuses to run simulations, this might be
due to some of your environment variables from outside the container. Give
`--cleanenv` a try.
:::

## Storing simulated data on disk

Expand Down

0 comments on commit db6fcdb

Please sign in to comment.