Skip to content

Commit

Permalink
Release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
annsilje committed Feb 21, 2020
1 parent 3f04c33 commit 310bec5
Show file tree
Hide file tree
Showing 79 changed files with 4,592 additions and 1,369 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.1.1
commit = False
tag = False

Expand Down
4 changes: 2 additions & 2 deletions docs/404.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="/img/favicon.ico">
<title>Midgard v1.0.0</title>
<title>Midgard v1.1.1</title>
<link href="/css/bootstrap-custom.min.css" rel="stylesheet">
<link href="/css/font-awesome.min.css" rel="stylesheet">
<link href="/css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/.">Midgard v1.0.0</a>
<a class="navbar-brand" href="/.">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down
4 changes: 2 additions & 2 deletions docs/api/midgard-collections/index.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="../../img/favicon.ico">
<title>midgard.collections - Midgard v1.0.0</title>
<title>midgard.collections - Midgard v1.1.1</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">Midgard v1.0.0</a>
<a class="navbar-brand" href="../..">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down
6 changes: 3 additions & 3 deletions docs/api/midgard-config/index.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="../../img/favicon.ico">
<title>midgard.config - Midgard v1.0.0</title>
<title>midgard.config - Midgard v1.1.1</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">Midgard v1.0.0</a>
<a class="navbar-brand" href="../..">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down Expand Up @@ -193,7 +193,7 @@ <h2 id="midgardconfigconfig">midgard.config.config</h2>
<p><strong>Help text and Type hints:</strong></p>
<h3 id="casedconfigparser"><strong>CasedConfigParser</strong></h3>
<p>Full name: <code>midgard.config.config.CasedConfigParser</code></p>
<p>Signature: <code>(defaults=None, dict_type=&lt;class 'collections.OrderedDict'&gt;, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=&lt;object object at 0x7f8010b4b230&gt;, converters=&lt;object object at 0x7f8010b4b230&gt;)</code></p>
<p>Signature: <code>(defaults=None, dict_type=&lt;class 'collections.OrderedDict'&gt;, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=&lt;object object at 0x7fade2ef2230&gt;, converters=&lt;object object at 0x7fade2ef2230&gt;)</code></p>
<p>ConfigParser with case-sensitive keys</p>
<h3 id="configuration"><strong>Configuration</strong></h3>
<p>Full name: <code>midgard.config.config.Configuration</code></p>
Expand Down
20 changes: 14 additions & 6 deletions docs/api/midgard-data/index.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="../../img/favicon.ico">
<title>midgard.data - Midgard v1.0.0</title>
<title>midgard.data - Midgard v1.1.1</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">Midgard v1.0.0</a>
<a class="navbar-brand" href="../..">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down Expand Up @@ -145,6 +145,7 @@
<li><a href="#midgarddata_h5utils">midgard.data._h5utils</a></li>
<li><a href="#midgarddata_position">midgard.data._position</a></li>
<li><a href="#midgarddata_time">midgard.data._time</a></li>
<li><a href="#midgarddatacollection">midgard.data.collection</a></li>
<li><a href="#midgarddatadataset">midgard.data.dataset</a></li>
<li><a href="#midgarddatafieldtypes">midgard.data.fieldtypes</a></li>
<li><a href="#midgarddatafieldtypes_fieldtype">midgard.data.fieldtypes._fieldtype</a></li>
Expand Down Expand Up @@ -434,6 +435,12 @@ <h3 id="register_scale"><strong>register_scale</strong>()</h3>
</ul>
<p><strong>Returns:</strong></p>
<p>Decorator registering scale.</p>
<h2 id="midgarddatacollection">midgard.data.collection</h2>
<p>A collection of fields </p>
<p>Also serves as base class for dataset</p>
<h3 id="collection"><strong>Collection</strong></h3>
<p>Full name: <code>midgard.data.collection.Collection</code></p>
<p>Signature: <code>()</code></p>
<h2 id="midgarddatadataset">midgard.data.dataset</h2>
<p>A dataset for handling time series data</p>
<p><strong>Description:</strong></p>
Expand All @@ -448,6 +455,10 @@ <h3 id="field_type-str">field_type (str)</h3>
<p><code>field_type = 'time_delta'</code></p>
<h2 id="midgarddatafieldtypes">midgard.data.fieldtypes</h2>
<p>Field types that can be used by Dataset</p>
<h3 id="fieldtype"><strong>fieldtype</strong>()</h3>
<p>Full name: <code>midgard.data.fieldtypes.fieldtype</code></p>
<p>Signature: <code>(data:Any) -&gt; Callable</code></p>
<p>Find correct field type for given data</p>
<h3 id="function"><strong>function</strong>()</h3>
<p>Full name: <code>midgard.data.fieldtypes.function</code></p>
<p>Signature: <code>(plugin_name:str) -&gt; Callable</code></p>
Expand All @@ -458,7 +469,7 @@ <h3 id="names"><strong>names</strong>()</h3>
<p>Names of fieldtype plugins</p>
<h2 id="midgarddatafieldtypes_fieldtype">midgard.data.fieldtypes._fieldtype</h2>
<p>Abstract class used to define different types of tables for a Dataset</p>
<h3 id="fieldtype"><strong>FieldType</strong></h3>
<h3 id="fieldtype_1"><strong>FieldType</strong></h3>
<p>Full name: <code>midgard.data.fieldtypes._fieldtype.FieldType</code></p>
<p>Signature: <code>(num_obs, name, val=None, unit=None, write_level=None, multiplier=1, **field_args)</code></p>
<p>Abstract class representing a type of field in the Dataset</p>
Expand All @@ -469,9 +480,6 @@ <h3 id="boolfield"><strong>BoolField</strong></h3>
<p>Signature: <code>(num_obs, name, val=None, unit=None, write_level=None, multiplier=1, **field_args)</code></p>
<h2 id="midgarddatafieldtypescollection">midgard.data.fieldtypes.collection</h2>
<p>A Dataset collection field consisting of other fields</p>
<h3 id="collection"><strong>Collection</strong></h3>
<p>Full name: <code>midgard.data.fieldtypes.collection.Collection</code></p>
<p>Signature: <code>()</code></p>
<h3 id="collectionfield"><strong>CollectionField</strong></h3>
<p>Full name: <code>midgard.data.fieldtypes.collection.CollectionField</code></p>
<p>Signature: <code>(num_obs, name, val=None, unit=None, write_level=None, multiplier=1, **field_args)</code></p>
Expand Down
76 changes: 67 additions & 9 deletions docs/api/midgard-dev/index.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="../../img/favicon.ico">
<title>midgard.dev - Midgard v1.0.0</title>
<title>midgard.dev - Midgard v1.1.1</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">Midgard v1.0.0</a>
<a class="navbar-brand" href="../..">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down Expand Up @@ -306,6 +306,14 @@ <h3 id="num_leading_spaces"><strong>num_leading_spaces</strong>()</h3>
</ul>
<p><strong>Returns:</strong></p>
<p>Number of leading spaces.</p>
<h3 id="progress_bar"><strong>progress_bar</strong>()</h3>
<p>Full name: <code>midgard.dev.console.progress_bar</code></p>
<p>Signature: <code>(iteration:int, total:int, prefix:str='')</code></p>
<p>Call in a loop to create terminal progress bar</p>
<p><strong>Args:</strong></p>
<p>iteration current iteration
total total iterations
prefix prefix string</p>
<h2 id="midgarddevexceptions">midgard.dev.exceptions</h2>
<p>Definition of Midgard-specific exceptions</p>
<p><strong>Description:</strong></p>
Expand Down Expand Up @@ -434,11 +442,43 @@ <h3 id="load_path"><strong>load_path</strong>()</h3>
<h2 id="midgarddevlog">midgard.dev.log</h2>
<p>Midgard library module for logging</p>
<p><strong>Description:</strong></p>
<p>This module provides simple logging inside Midgard.</p>
<p>To use it, you must first add a an active logger. This is typically done using
one of the init-functions: init() or file_init().</p>
<p>To write a log message, simply call one of midgard.log.debug, midgard.log.info,
midgard.log.warn, midgard.log.error or midgard.log.fatal with a log message.</p>
<p>The Midgard <strong>log</strong> module provides simple logging functionality. </p>
<p>To use it, you must first add a an active logger. This is typically done using the init-functions: <strong>init()</strong> and/or
<strong>file_init()</strong>. <strong>init()</strong> initializes a console logger, where logging messages are written to the console.
<strong>file_init()</strong> initializes a file logger, where logging messages are written to a defined file path.</p>
<p>Following logging levels are defined:</p>
<table>
<thead>
<tr>
<th align="left">Level</th>
<th align="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><strong>debug</strong></td>
<td align="left">Debug messages</td>
</tr>
<tr>
<td align="left"><strong>info</strong></td>
<td align="left">Information messages</td>
</tr>
<tr>
<td align="left"><strong>warn</strong></td>
<td align="left">Warning messages</td>
</tr>
<tr>
<td align="left"><strong>error</strong></td>
<td align="left">Error messages</td>
</tr>
<tr>
<td align="left"><strong>fatal</strong></td>
<td align="left">Fatal error messages</td>
</tr>
</tbody>
</table>
<p>To write a log message, simply call <strong>log.{level}</strong> (e.g. log.info), whereby {level} is a placeholder for the defined
logging levels in the table above.</p>
<p>To add a different logger, you should subclass the Logger abstract class.</p>
<p><strong>Example:</strong></p>
<pre><code>&gt;&gt;&gt; from midgard.dev import log
Expand All @@ -455,6 +495,15 @@ <h3 id="filelogger"><strong>FileLogger</strong></h3>
<p>Full name: <code>midgard.dev.log.FileLogger</code></p>
<p>Signature: <code>(file_path:Union[str, pathlib.Path], log_level:Union[str, NoneType]=None, prefix:str='', rotation:Union[int, NoneType]=None) -&gt; None</code></p>
<p>Log to a file, the log files can be rotated so that older files are kept</p>
<p><strong>Args:</strong></p>
<ul>
<li><code>file_path</code>: File path.</li>
<li><code>log_level</code>: Define level from which logging should be started.</li>
<li><code>prefix</code>: Add prefix to logging messages.</li>
<li><code>rotation</code>: Logging files are rolled based on given number of rotations. That means, if there are old
log files, they will be moved to files with extension .0, .1 and so on. If the argument
is not specified, then existing logging file is overwritten from newer ones. </li>
</ul>
<h3 id="logger"><strong>Logger</strong></h3>
<p>Full name: <code>midgard.dev.log.Logger</code></p>
<p>Signature: <code>(log_level:Union[str, NoneType]=None, prefix:str='')</code></p>
Expand Down Expand Up @@ -487,6 +536,15 @@ <h3 id="file_init"><strong>file_init</strong></h3>
<p>Full name: <code>midgard.dev.log.file_init</code></p>
<p>Signature: <code>(file_path:Union[str, pathlib.Path], log_level:Union[str, NoneType]=None, prefix:str='', rotation:Union[int, NoneType]=None) -&gt; None</code></p>
<p>Log to a file, the log files can be rotated so that older files are kept</p>
<p><strong>Args:</strong></p>
<ul>
<li><code>file_path</code>: File path.</li>
<li><code>log_level</code>: Define level from which logging should be started.</li>
<li><code>prefix</code>: Add prefix to logging messages.</li>
<li><code>rotation</code>: Logging files are rolled based on given number of rotations. That means, if there are old
log files, they will be moved to files with extension .0, .1 and so on. If the argument
is not specified, then existing logging file is overwritten from newer ones. </li>
</ul>
<h3 id="info"><strong>info</strong>()</h3>
<p>Full name: <code>midgard.dev.log.info</code></p>
<p>Signature: <code>(log_text:str, *, level:str='info') -&gt; None</code></p>
Expand Down Expand Up @@ -858,10 +916,10 @@ <h2 id="midgarddevtimer">midgard.dev.timer</h2>
logger is used to report the timing. See <code>Timer.__init__</code> for more details.</p>
<h3 id="accumulatedtimer"><strong>AccumulatedTimer</strong></h3>
<p>Full name: <code>midgard.dev.timer.AccumulatedTimer</code></p>
<p>Signature: <code>(text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(&lt;function log at 0x7f800f4530d0&gt;, level='info')) -&gt; None</code></p>
<p>Signature: <code>(text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(&lt;function log at 0x7fade17fa0d0&gt;, level='info')) -&gt; None</code></p>
<h3 id="timer"><strong>Timer</strong></h3>
<p>Full name: <code>midgard.dev.timer.Timer</code></p>
<p>Signature: <code>(text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(&lt;function log at 0x7f800f4530d0&gt;, level='info')) -&gt; None</code></p>
<p>Signature: <code>(text:str='Elapsed time:', fmt:str='.4f', logger:Union[Callable[[str], NoneType], NoneType]=functools.partial(&lt;function log at 0x7fade17fa0d0&gt;, level='info')) -&gt; None</code></p>
<p>Class for timing running time of functions and code blocks.</p></div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions docs/api/midgard-files/index.html
Expand Up @@ -8,7 +8,7 @@


<link rel="shortcut icon" href="../../img/favicon.ico">
<title>midgard.files - Midgard v1.0.0</title>
<title>midgard.files - Midgard v1.1.1</title>
<link href="../../css/bootstrap-custom.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
Expand Down Expand Up @@ -39,7 +39,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../..">Midgard v1.0.0</a>
<a class="navbar-brand" href="../..">Midgard v1.1.1</a>
</div>

<!-- Expanded navigation -->
Expand Down

0 comments on commit 310bec5

Please sign in to comment.