Skip to content

Commit

Permalink
documentation cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samcmill committed Jan 29, 2020
1 parent 70e03b6 commit 75e5904
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
20 changes: 3 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ auto r = c.check(d); /* implicitly evalutes d */
std::cout << static_cast<json>(r) << std::endl;
```

The three categories of key buildings are shown in this example.
The three categories of building blocks are shown in this example.

1. Data building blocks collect information about the system. wassail
provides multiple data sources in the `wassail::data` namespace.
Expand Down Expand Up @@ -85,21 +85,7 @@ Several C++ and Python [samples](src/samples) are included.

## Installation

A C++14 compiler is required (C++17 preferred).

Documentation:

```
$ ./configure
$ make doxygen-run
```

Code coverage:

```
$ ./configure --enable-code-coverage
$ make check-code-coverage
```
A C++14 compiler is required (C++17 preferred). See [INSTALL](INSTALL).

## License

Expand All @@ -118,7 +104,7 @@ wassail incorporates the following third party software.
Copyright (c) 2012 - present, Victor Zverovich

- [json](https://github.com/nlohmann/json)
Copyright (c) 2013-2019 Niels Lohmann &lt;http://nlohmann.me&gt;.
Copyright (c) 2013-2019 Niels Lohmann &lt;http://nlohmann.me&gt;

- [pybind11](https://github.com/pybind/pybind11)
Copyright (c) 2016 Wenzel Jakob &lt;wenzel.jakob@epfl.ch&gt;
Expand Down
12 changes: 5 additions & 7 deletions docs/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
<div class="title">wassail </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a href="https://github.com/samcmill/wassail/actions?query=workflow%3A%22Linux+build%22"></a> <a href="https://github.com/samcmill/wassail/actions?query=workflow%3A%22macOS+build%22"></a> <a href="https://coveralls.io/github/samcmill/wassail?branch=master"></a> <a href="https://samcmill.github.io/wassail"></a> <a href="https://github.com/samcmill/wassail/blob/master/LICENSE"></a></p>
<div class="textblock"><p><a href="https://github.com/samcmill/wassail/actions?query=workflow%3A%22Linux+build%22"></a> <a href="https://github.com/samcmill/wassail/actions?query=workflow%3A%22macOS+build%22"></a> <a href="https://coveralls.io/github/samcmill/wassail?branch=master"></a> <a href="https://scan.coverity.com/projects/samcmill-wassail"></a> <a href="https://lgtm.com/projects/g/samcmill/wassail/context:cpp"></a> <a href="https://samcmill.github.io/wassail"></a> <a href="https://github.com/samcmill/wassail/blob/master/LICENSE"></a></p>
<p>wassail is a set of C++ building blocks to check the health of UNIX-based systems. Python bindings are also included.</p>
<p>The library is based on the observation that high performance computing sites tend to create their own custom local health tools. The user interfaces vary widely but the health checks themselves are universal. wassail provides highly customizable "low level" building blocks for creating bespoke user level system health tools.</p>
<h2>Examples</h2>
<p>Check whether the value of the environment variable <code>FOO</code> is equal to <code>bar</code>:</p>
<div class="fragment"><div class="line">#include &lt;wassail.hpp&gt;</div><div class="line"></div><div class="line">auto d = wassail::data::environment();</div><div class="line">auto c = wassail::check::misc::environment(&quot;FOO&quot;, &quot;bar&quot;);</div><div class="line">auto r = c.check(d); /* implicitly evalutes d */</div><div class="line"></div><div class="line">// {&quot;action&quot;:&quot;&quot;,&quot;brief&quot;:&quot;Checking environment variable &#39;FOO&#39;&quot;,&quot;children&quot;:[],&quot;detail&quot;:&quot;Value &#39;bar&#39; matches &#39;bar&#39;&quot;,&quot;issue&quot;:0,&quot;priority&quot;:3,&quot;system_id&quot;:[&quot;MacBook-Pro.local&quot;],&quot;timestamp&quot;:1578031355}</div><div class="line">std::cout &lt;&lt; static_cast&lt;json&gt;(r) &lt;&lt; std::endl;</div></div><!-- fragment --><p>The three categories of key buildings are shown in this example.</p>
<div class="fragment"><div class="line">#include &lt;wassail.hpp&gt;</div><div class="line"></div><div class="line">auto d = wassail::data::environment();</div><div class="line">auto c = wassail::check::misc::environment(&quot;FOO&quot;, &quot;bar&quot;);</div><div class="line">auto r = c.check(d); /* implicitly evalutes d */</div><div class="line"></div><div class="line">// {&quot;action&quot;:&quot;&quot;,&quot;brief&quot;:&quot;Checking environment variable &#39;FOO&#39;&quot;,&quot;children&quot;:[],&quot;detail&quot;:&quot;Value &#39;bar&#39; matches &#39;bar&#39;&quot;,&quot;issue&quot;:0,&quot;priority&quot;:3,&quot;system_id&quot;:[&quot;MacBook-Pro.local&quot;],&quot;timestamp&quot;:1578031355}</div><div class="line">std::cout &lt;&lt; static_cast&lt;json&gt;(r) &lt;&lt; std::endl;</div></div><!-- fragment --><p>The three categories of building blocks are shown in this example.</p>
<ol type="1">
<li>Data building blocks collect information about the system. wassail provides multiple data sources in the <code>wassail::data</code> namespace. Data sources are not queried when the object is initialized but rather when the <code>evaluate()</code> method is invoked (the data is cached).</li>
<li>Check building blocks validate the collected data against a specified reference value. wassail provides multiple checks in the <code>wassail::check</code> namespace as well as flexible generic checks. The reference value could be hard-coded or user configurable via the user interface of the user level system health tool.</li>
Expand All @@ -80,18 +80,16 @@ <h2>Examples</h2>
<div class="fragment"><div class="line">// customize the result message templates (libfmt syntax)</div><div class="line">auto c = wassail::check::misc::environment(&quot;FOO&quot;, &quot;bar&quot;, false,</div><div class="line"> &quot;Validating environment variable {0}&quot;,</div><div class="line"> &quot;Observed value &#39;{0}&#39; does not equal the reference value &#39;{1}&#39;&quot;,</div><div class="line"> &quot;Unable to validate&quot;,</div><div class="line"> &quot;Observed value and reference value are the same: &#39;{0}&#39;&quot;);</div><div class="line">auto r = c.check(d); /* implicitly evalutes d */</div><div class="line"></div><div class="line">// {&quot;action&quot;:&quot;&quot;,&quot;brief&quot;:&quot;Validating environment variable FOO&quot;,&quot;children&quot;:[],&quot;detail&quot;:&quot;Observed value and reference value are the same: &#39;bar&#39;&quot;,&quot;issue&quot;:0,&quot;priority&quot;:3,&quot;system_id&quot;:[&quot;MacBook-Pro.local&quot;],&quot;timestamp&quot;:1578033076}</div><div class="line">std::cout &lt;&lt; static_cast&lt;json&gt;(r) &lt;&lt; std::endl;</div></div><!-- fragment --><p>The equivalent example to check the value of the environment variable <code>FOO</code> using the Python binding:</p>
<div class="fragment"><div class="line">import wassail</div><div class="line"></div><div class="line">d = wassail.data.environment()</div><div class="line">c = wassail.check.misc.environment(&#39;FOO&#39;, &#39;bar&#39;)</div><div class="line">r = c.check(d) # implicitly evaluates d</div><div class="line"></div><div class="line"># {&quot;action&quot;:&quot;&quot;,&quot;brief&quot;:&quot;Checking environment variable &#39;FOO&#39;&quot;,&quot;children&quot;:[],&quot;detail&quot;:&quot;Value &#39;bar&#39; matches &#39;bar&#39;&quot;,&quot;issue&quot;:0,&quot;priority&quot;:3,&quot;system_id&quot;:[&quot;MacBook-Pro.local&quot;],&quot;timestamp&quot;:1578031355}</div><div class="line">print(r)</div></div><!-- fragment --><p>Several C++ and Python <a href="src/samples">samples</a> are included.</p>
<h2>Installation</h2>
<p>A C++14 compiler is required (C++17 preferred).</p>
<p>Documentation:</p>
<div class="fragment"><div class="line">$ ./configure</div><div class="line">$ make doxygen-run</div></div><!-- fragment --><p>Code coverage:</p>
<div class="fragment"><div class="line">$ ./configure --enable-code-coverage</div><div class="line">$ make check-code-coverage</div></div><!-- fragment --><h2>License</h2>
<p>A C++14 compiler is required (C++17 preferred). See [INSTALL](INSTALL).</p>
<h2>License</h2>
<p>wassail is distributed under the [Mozilla Public License 2.0](LICENSE).</p>
<p>Copyright © 2018-2020 Scott McMillan</p>
<h2>Third Party Software</h2>
<p>wassail incorporates the following third party software.</p>
<ul>
<li><a href="https://github.com/catchorg/Catch2">catch</a> Copyright (c) 2019 Two Blue Cubes Ltd.</li>
<li><a href="https://github.com/fmtlib/fmt">fmtlib</a> Copyright (c) 2012 - present, Victor Zverovich</li>
<li><a href="https://github.com/nlohmann/json">json</a> Copyright (c) 2013-2019 Niels Lohmann &lt;<a href="http://nlohmann.me&gt;">http://nlohmann.me&amp;gt;</a>.</li>
<li><a href="https://github.com/nlohmann/json">json</a> Copyright (c) 2013-2019 Niels Lohmann &lt;<a href="http://nlohmann.me&gt;">http://nlohmann.me&amp;gt;</a></li>
<li><a href="https://github.com/pybind/pybind11">pybind11</a> Copyright (c) 2016 Wenzel Jakob &lt;<a href="#" onclick="location.href='mai'+'lto:'+'wen'+'ze'+'l.j'+'ak'+'ob@'+'ep'+'fl.'+'ch'; return false;">wenze<span style="display: none;">.nosp@m.</span>l.ja<span style="display: none;">.nosp@m.</span>kob@e<span style="display: none;">.nosp@m.</span>pfl.<span style="display: none;">.nosp@m.</span>ch</a>&gt;</li>
<li><a href="https://github.com/gabime/spdlog">spdlog</a> Copyright (c) 2015-present, Gabi Melman &amp; spdlog contributors.</li>
<li><a href="http://www.cs.virginia.edu/stream/ref.html">STREAM</a> Copyright 1991-2013: John D. McCalpin</li>
Expand Down

0 comments on commit 75e5904

Please sign in to comment.