-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Contribution guidelines (#1525)
This updates a number of docs pages to infrastructure and workflow topics.
- Loading branch information
1 parent
3da30d6
commit d9816f2
Showing
14 changed files
with
225 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
# What is clang-tidy? | ||
|
||
[`clang-tidy`](https://clang.llvm.org/extra/clang-tidy/) is a static analysis | ||
tool using the LLVM / clang tooling. It can detect a number of issues with C++ | ||
code, like common readability problems, performance or memory safety issues. | ||
|
||
The ACTS CI automatically runs `clang-tidy` on all compilation units to detect | ||
as many problems as possible, and requires developers to resolve them. It is | ||
configured with a file `.clang-tidy` located in the repository root. Many | ||
editors / IDEs support `clang-tidy` and will automatically pick up this | ||
configuration file. | ||
|
||
By default, only a limited number of checks are configured in this file, but | ||
this list might change in the future. If you experience CI failures that are | ||
associated with `clang-tidy`, you can drill down into the CI job outputs to get | ||
a report on the issues it detected. The report should give you an error / | ||
warning code, e.g. `readability-braces-around-statements`. The LLVM | ||
documentation has details on all possible error codes, in this particular | ||
example you would find it [here][readability]. This page will tell you that | ||
`clang-tidy` wants you to replace | ||
|
||
```cpp | ||
if (condition) | ||
statement; | ||
``` | ||
|
||
with | ||
|
||
```cpp | ||
if (condition) { | ||
statement; | ||
} | ||
``` | ||
|
||
Some error codes are less obvious, or not this trivial to fix. When in doubt, | ||
@mention the ACTS maintainers on your pull request. | ||
|
||
[readability]: https://clang.llvm.org/extra/clang-tidy/checks/readability/braces-around-statements.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# How do I build the documentation? | ||
|
||
See [](build_docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,95 @@ | ||
# What is physmon? | ||
|
||
The ACTS CI runs a suite of physics performance monitoring jobs dubbed | ||
*physmon*. The purpose is to monitor and detect changes in the physics | ||
performance, both intentional and accidental. | ||
|
||
The associated job will run a number of workflow combinations. Currently this | ||
includes the truth tracking and OpenDataDetector *full chain* workflows. The | ||
latter is further split into configurations with full seeding, truth smeared or | ||
truth estimated seeds. These jobs produce performance output files. | ||
|
||
These performance output files are then evaluated using the programs dubbed | ||
[](analysis_apps). After this step, the job will then run comparisons of the | ||
diagnostics histograms created by these programs. If the comparisons indicate | ||
that the histogram contents changed meaningfully, the job will fail and report | ||
this on a pull request. | ||
|
||
## How do I investigate a physmon failure? | ||
|
||
The physmon CI job attaches its results as an artifact to the CI run (also for successful runs) | ||
From your pull request, you need to click on the *Checks* tab at the top: | ||
|
||
:::{figure} ../figures/physmon/physmon_checks.png | ||
:width: 150px | ||
:align: center | ||
::: | ||
|
||
From there, click on the *Builds* workflow on the left: | ||
|
||
:::{figure} ../figures/physmon/physmon_run.png | ||
:width: 300px | ||
:align: center | ||
::: | ||
|
||
On the workflow overview, scroll down to find the attached artifacts, and locate the *physmon* artifact. You can click to download it: | ||
|
||
:::{figure} ../figures/physmon/physmon_artifact.png | ||
:width: 100% | ||
:align: center | ||
::: | ||
|
||
:::{note} | ||
GitHub Actions artifacts are deleted after a fixed amount of time. If the CI | ||
completed a while ago, it is possible this report is no longer available. | ||
::: | ||
|
||
After the download, you need to unzip the archive, whose contents will look similar to this: | ||
|
||
``` | ||
acts_analysis_residuals_and_pulls.root | ||
ckf_seeded.html | ||
ckf_seeded_plots | ||
ckf_truth_estimated.html | ||
ckf_truth_estimated_plots | ||
ckf_truth_smeared.html | ||
ckf_truth_smeared_plots | ||
ivf_seeded.html | ||
ivf_seeded_plots | ||
ivf_truth_estimated.html | ||
ivf_truth_estimated_plots | ||
ivf_truth_smeared.html | ||
ivf_truth_smeared_plots | ||
performance_ckf_seeded.root | ||
performance_ckf_truth_estimated.root | ||
performance_ckf_truth_smeared.root | ||
performance_truth_tracking.root | ||
performance_vertexing_seeded.root | ||
performance_vertexing_seeded_hist.root | ||
performance_vertexing_truth_estimated.root | ||
performance_vertexing_truth_estimated_hist.root | ||
performance_vertexing_truth_smeared.root | ||
performance_vertexing_truth_smeared_hist.root | ||
run.log | ||
truth_tracking.html | ||
truth_tracking_plots | ||
``` | ||
|
||
The `.root` files are the performance output files and corresponding histogram | ||
files. The physmon job log file is also available. Finally, the `_plots` folder | ||
contain plots of all the histogram comparisons, and the `.html` files contain | ||
single-file reports showing the detailed results. An example of an HTML report | ||
looks like this: | ||
|
||
:::{figure} ../figures/physmon/physmon_report.png | ||
:width: 100% | ||
:align: center | ||
::: | ||
|
||
If you get a physmon job failure on your pull request, please investigate the | ||
failing report(s), and try to understand if the change causing the | ||
discrepancies is expected. | ||
|
||
In case the conclusion is that the changes are indeed expected, the reference | ||
files used to generate the comparisons are located in `CI/physmon/reference/`, | ||
and can be updated to the output files found in the artifact zip archive. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# What is root hash checks? | ||
# What are ROOT hash checks? | ||
|
||
See {ref}`root_hash_checks` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
(howto_format)= | ||
|
||
# How do I run the formatting? | ||
|
||
Code formatting is handled by | ||
[`clang-format`](https://clang.llvm.org/docs/ClangFormat.html). A configuration | ||
file is available in the repository root at `.clang-format` and should be used | ||
to automatically format the code. Many editors / IDEs support `clang-format` | ||
and also format-on-save actions. | ||
|
||
The ACTS CI system will automatically check code formatting using the provided | ||
`clang-format` configuration and will notify incompatible formatting. | ||
|
||
To simplify this, a script located in `CI/check_format` can be used like: | ||
|
||
```console | ||
$ CI/check_format $SOURCE_DIR | ||
``` | ||
|
||
In some cases, different `clang-format` versions will result in slightly | ||
different outputs. In many cases, this is accepted by the CI. However, it is | ||
recommended to use the same major version of `clang-format` to perform local | ||
formatting. If you are comfortable with Docker, you can use the [docker image | ||
used by the | ||
CI](https://github.com/acts-project/machines/blob/master/format10/Dockerfile). | ||
You can use the script located in `CI/check_format_local` similar to the | ||
description above. Other options to obtain a compatible `clang-format` version | ||
are to use your package manager (e.g. Ubuntu distributions usually offer a set of | ||
versions to install), or to use statically linked binaries from | ||
[here](https://github.com/muttleyxd/clang-tools-static-binaries)[^1]. | ||
|
||
|
||
[^1]: This repository is external to the ACTS project, so proceed with caution! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters