Skip to content

Commit

Permalink
Optional dependencies. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Nov 20, 2024
1 parent c806a84 commit 0d37b9f
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 17 deletions.
Binary file modified .doctrees/api.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/transactron.lib.doctree
Binary file not shown.
Binary file modified .doctrees/transactron.utils.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion api.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h2>transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion development-environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3>tprof.py<a class="headerlink" href="#tprof-py" title="Permalink to this head

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
12 changes: 9 additions & 3 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,10 @@ <h2 id="G">G</h2>
</ul></li>
<li><a href="transactron.testing.html#transactron.testing.testbenchio.TestbenchIO.get_call_result">get_call_result() (transactron.testing.testbenchio.TestbenchIO method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="transactron.utils.html#transactron.utils.transactron_helpers.get_caller_class_name">get_caller_class_name() (in module transactron.utils.transactron_helpers)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="transactron.lib.html#transactron.lib.dependencies.DependencyManager.get_dependency">get_dependency() (transactron.lib.dependencies.DependencyManager method)</a>

<ul>
Expand All @@ -723,6 +723,12 @@ <h2 id="G">G</h2>
</li>
<li><a href="transactron.html#transactron.graph.OwnershipGraph.get_name">get_name() (transactron.graph.OwnershipGraph method)</a>
</li>
<li><a href="transactron.lib.html#transactron.lib.dependencies.DependencyManager.get_optional_dependency">get_optional_dependency() (transactron.lib.dependencies.DependencyManager method)</a>

<ul>
<li><a href="transactron.utils.html#transactron.utils.dependencies.DependencyManager.get_optional_dependency">(transactron.utils.dependencies.DependencyManager method)</a>
</li>
</ul></li>
<li><a href="transactron.testing.html#transactron.testing.testbenchio.TestbenchIO.get_outputs">get_outputs() (transactron.testing.testbenchio.TestbenchIO method)</a>
</li>
<li><a href="transactron.lib.html#transactron.lib.metrics.HardwareMetricsManager.get_register_value">get_register_value() (transactron.lib.metrics.HardwareMetricsManager method)</a>
Expand Down Expand Up @@ -1783,7 +1789,7 @@ <h2 id="W">W</h2>

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1>Transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1>transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ <h1>Python Module Index</h1>

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion transactions.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h3>Transaction and method nesting<a class="headerlink" href="#transaction-and-m

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.core.html
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.html
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
10 changes: 9 additions & 1 deletion transactron.lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,14 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<p>The way dependencies are interpreted is dependent on the key type.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="transactron.lib.dependencies.DependencyManager.get_optional_dependency">
<span class="sig-name descname"><span class="pre">get_optional_dependency</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="transactron.utils.html#transactron.utils.dependencies.DependencyKey" title="transactron.utils.dependencies.DependencyKey"><span class="pre">DependencyKey</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">U</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.13)"><span class="pre">Optional</span></a><span class="p"><span class="pre">[</span></span><span class="pre">U</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#transactron.lib.dependencies.DependencyManager.get_optional_dependency" title="Permalink to this definition"></a></dt>
<dd><p>Gets the dependency for a key, if it exists.</p>
<p>If the dependency is gettable, the return value is the same as in
<cite>get_dependency</cite>. Otherwise, <cite>None</cite> is returned.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
Expand Down Expand Up @@ -2252,7 +2260,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.utils.amaranth_ext.html
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down
10 changes: 9 additions & 1 deletion transactron.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,14 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<p>The way dependencies are interpreted is dependent on the key type.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="transactron.utils.dependencies.DependencyManager.get_optional_dependency">
<span class="sig-name descname"><span class="pre">get_optional_dependency</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="#transactron.utils.dependencies.DependencyKey" title="transactron.utils.dependencies.DependencyKey"><span class="pre">DependencyKey</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">U</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.13)"><span class="pre">Optional</span></a><span class="p"><span class="pre">[</span></span><span class="pre">U</span><span class="p"><span class="pre">]</span></span></span></span><a class="headerlink" href="#transactron.utils.dependencies.DependencyManager.get_optional_dependency" title="Permalink to this definition"></a></dt>
<dd><p>Gets the dependency for a key, if it exists.</p>
<p>If the dependency is gettable, the return value is the same as in
<cite>get_dependency</cite>. Otherwise, <cite>None</cite> is returned.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
Expand Down Expand Up @@ -820,7 +828,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2024.
<span class="lastupdated">Last updated on 20:38 2024-11-19.
<span class="lastupdated">Last updated on 10:52 2024-11-20.
</span></p>
</div>

Expand Down

0 comments on commit 0d37b9f

Please sign in to comment.