Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 4, 2024
1 parent 36e4dca commit 0094105
Show file tree
Hide file tree
Showing 186 changed files with 641 additions and 573 deletions.
11 changes: 11 additions & 0 deletions _modules/apis_core/apis_metainfo/models.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@

<h1>Source code for apis_core.apis_metainfo.models</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">from</span> <span class="nn">urllib.parse</span> <span class="kn">import</span> <span class="n">urlsplit</span>

<span class="kn">from</span> <span class="nn">django.contrib.contenttypes.models</span> <span class="kn">import</span> <span class="n">ContentType</span>
<span class="kn">from</span> <span class="nn">django.core.exceptions</span> <span class="kn">import</span> <span class="n">ImproperlyConfigured</span><span class="p">,</span> <span class="n">ValidationError</span>
Expand All @@ -94,6 +95,7 @@ <h1>Source code for apis_core.apis_metainfo.models</h1><div class="highlight"><p
<span class="kn">from</span> <span class="nn">apis_core.apis_metainfo</span> <span class="kn">import</span> <span class="n">signals</span>
<span class="kn">from</span> <span class="nn">apis_core.generic.abc</span> <span class="kn">import</span> <span class="n">GenericModel</span>
<span class="kn">from</span> <span class="nn">apis_core.utils</span> <span class="kn">import</span> <span class="n">rdf</span>
<span class="kn">from</span> <span class="nn">apis_core.utils</span> <span class="kn">import</span> <span class="n">settings</span> <span class="k">as</span> <span class="n">apis_settings</span>
<span class="kn">from</span> <span class="nn">apis_core.utils.normalize</span> <span class="kn">import</span> <span class="n">clean_uri</span>

<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
Expand Down Expand Up @@ -276,6 +278,15 @@ <h1>Source code for apis_core.apis_metainfo.models</h1><div class="highlight"><p
<span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ValidationError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">uri</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Uri.internal">
<a class="viewcode-back" href="../../../modules/apis_core.apis_metainfo.html#apis_core.apis_metainfo.models.Uri.internal">[docs]</a>
<span class="k">def</span> <span class="nf">internal</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="n">my_netloc</span> <span class="o">=</span> <span class="n">urlsplit</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">uri</span><span class="p">)</span><span class="o">.</span><span class="n">netloc</span>
<span class="k">return</span> <span class="nb">any</span><span class="p">(</span>
<span class="p">[</span><span class="n">my_netloc</span> <span class="o">==</span> <span class="n">urlsplit</span><span class="p">(</span><span class="n">uri</span><span class="p">)</span><span class="o">.</span><span class="n">netloc</span> <span class="k">for</span> <span class="n">uri</span> <span class="ow">in</span> <span class="n">apis_settings</span><span class="o">.</span><span class="n">internal_uris</span><span class="p">()]</span>
<span class="p">)</span></div>
</div>

</pre></div>
Expand Down
10 changes: 10 additions & 0 deletions _modules/apis_core/utils/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ <h1>Source code for apis_core.utils.settings</h1><div class="highlight"><pre>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;TOML parser could not read </span><span class="si">{</span><span class="n">file</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="n">e</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">configs</span></div>



<div class="viewcode-block" id="internal_uris">
<a class="viewcode-back" href="../../../modules/apis_core.utils.html#apis_core.utils.settings.internal_uris">[docs]</a>
<span class="k">def</span> <span class="nf">internal_uris</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
<span class="k">return</span> <span class="nb">set</span><span class="p">(</span>
<span class="p">[</span><span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">&quot;APIS_BASE_URI&quot;</span><span class="p">,</span> <span class="s2">&quot;https://example.org&quot;</span><span class="p">)]</span>
<span class="o">+</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">settings</span><span class="p">,</span> <span class="s2">&quot;APIS_FORMER_BASE_URIS&quot;</span><span class="p">,</span> <span class="p">[])</span>
<span class="p">)</span></div>

</pre></div>

</div>
Expand Down
4 changes: 4 additions & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -2270,6 +2270,10 @@ <h2 id="I">I</h2>
<li><a href="modules/apis_core.utils.html#apis_core.utils.test_rdf.Institution.DoesNotExist">Institution.DoesNotExist</a>
</li>
<li><a href="modules/apis_core.utils.html#apis_core.utils.test_rdf.Institution.MultipleObjectsReturned">Institution.MultipleObjectsReturned</a>
</li>
<li><a href="modules/apis_core.apis_metainfo.html#apis_core.apis_metainfo.models.Uri.internal">internal() (apis_core.apis_metainfo.models.Uri method)</a>
</li>
<li><a href="modules/apis_core.utils.html#apis_core.utils.settings.internal_uris">internal_uris() (in module apis_core.utils.settings)</a>
</li>
<li><a href="modules/apis_core.relations.html#apis_core.relations.utils.is_relation">is_relation() (in module apis_core.relations.utils)</a>
</li>
Expand Down
50 changes: 25 additions & 25 deletions htmlcov/class_index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0094105

Please sign in to comment.