Skip to content

Commit

Permalink
Deploying to gh-pages from @ b6196ca 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoch committed Nov 16, 2023
1 parent da0c607 commit 8a191d6
Show file tree
Hide file tree
Showing 34 changed files with 180 additions and 39 deletions.
2 changes: 1 addition & 1 deletion _modules/functools.html
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ <h1 id="modules-functools--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ <h1 id="modules-index--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ <h1 id="modules-oras-auth--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ <h1 id="modules-oras-client--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/container.html
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ <h1 id="modules-oras-container--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/decorator.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ <h1 id="modules-oras-decorator--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
7 changes: 6 additions & 1 deletion _modules/oras/defaults.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ <h1 id="modules-oras-defaults--page-root">

<span class="c1"># what you get for a blank digest, so we don't need to save and recalculate</span>
<span class="n">blank_hash</span> <span class="o">=</span> <span class="s2">"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"</span>

<span class="c1"># what you get for a blank config digest, so we don't need to save and recalculate</span>
<span class="n">blank_config_hash</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">"sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"</span>
<span class="p">)</span>
</pre>
</div>
</article>
Expand All @@ -358,7 +363,7 @@ <h1 id="modules-oras-defaults--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ <h1 id="modules-oras-logger--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/main/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ <h1 id="modules-oras-main-login--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
10 changes: 5 additions & 5 deletions _modules/oras/oci.html
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ <h1 id="modules-oras-oci--page-root">
<a class="viewcode-back" href="../../source/oras.html#oras.oci.ManifestConfig">[docs]</a>
<span class="k">def</span> <span class="nf">ManifestConfig</span><span class="p">(</span>
<span class="n">path</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">media_type</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">object</span><span class="p">],</span> <span class="nb">str</span><span class="p">]:</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Tuple</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">object</span><span class="p">],</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]]:</span>
<span class="w"> </span><span class="sd">"""</span>
<span class="sd"> Write an empty config, if one is not provided</span>

Expand All @@ -449,11 +449,11 @@ <h1 id="modules-oras-oci--page-root">
<span class="sd"> """</span>
<span class="c1"># Create an empty config if we don't have one</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">path</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">devnull</span>
<span class="n">path</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">conf</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"mediaType"</span><span class="p">:</span> <span class="n">media_type</span> <span class="ow">or</span> <span class="n">oras</span><span class="o">.</span><span class="n">defaults</span><span class="o">.</span><span class="n">unknown_config_media_type</span><span class="p">,</span>
<span class="s2">"size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">"digest"</span><span class="p">:</span> <span class="n">oras</span><span class="o">.</span><span class="n">defaults</span><span class="o">.</span><span class="n">blank_hash</span><span class="p">,</span>
<span class="s2">"size"</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span>
<span class="s2">"digest"</span><span class="p">:</span> <span class="n">oras</span><span class="o">.</span><span class="n">defaults</span><span class="o">.</span><span class="n">blank_config_hash</span><span class="p">,</span>
<span class="p">}</span>

<span class="k">else</span><span class="p">:</span>
Expand Down Expand Up @@ -495,7 +495,7 @@ <h1 id="modules-oras-oci--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
23 changes: 20 additions & 3 deletions _modules/oras/provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,11 @@ <h1 id="modules-oras-provider--page-root">
<span class="kn">import</span> <span class="nn">copy</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">urllib</span>
<span class="kn">from</span> <span class="nn">contextlib</span> <span class="kn">import</span> <span class="n">contextmanager</span><span class="p">,</span> <span class="n">nullcontext</span>
<span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">asdict</span><span class="p">,</span> <span class="n">dataclass</span>
<span class="kn">from</span> <span class="nn">http.cookiejar</span> <span class="kn">import</span> <span class="n">DefaultCookiePolicy</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span>
<span class="kn">from</span> <span class="nn">tempfile</span> <span class="kn">import</span> <span class="n">TemporaryDirectory</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">Generator</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Tuple</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">jsonschema</span>
<span class="kn">import</span> <span class="nn">requests</span>
Expand All @@ -320,6 +322,17 @@ <h1 id="modules-oras-provider--page-root">
<span class="n">container_type</span> <span class="o">=</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">oras</span><span class="o">.</span><span class="n">container</span><span class="o">.</span><span class="n">Container</span><span class="p">]</span>


<div class="viewcode-block" id="temporary_empty_config">
<a class="viewcode-back" href="../../source/oras.html#oras.provider.temporary_empty_config">[docs]</a>
<span class="nd">@contextmanager</span>
<span class="k">def</span> <span class="nf">temporary_empty_config</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="n">Generator</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">]:</span>
<span class="k">with</span> <span class="n">TemporaryDirectory</span><span class="p">()</span> <span class="k">as</span> <span class="n">tmpdir</span><span class="p">:</span>
<span class="n">config_file</span> <span class="o">=</span> <span class="n">oras</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">get_tmpfile</span><span class="p">(</span><span class="n">tmpdir</span><span class="o">=</span><span class="n">tmpdir</span><span class="p">,</span> <span class="n">suffix</span><span class="o">=</span><span class="s2">".json"</span><span class="p">)</span>
<span class="n">oras</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">write_file</span><span class="p">(</span><span class="n">config_file</span><span class="p">,</span> <span class="s2">"</span><span class="si">{}</span><span class="s2">"</span><span class="p">)</span>
<span class="k">yield</span> <span class="n">config_file</span></div>



<div class="viewcode-block" id="Subject">
<a class="viewcode-back" href="../../source/oras.html#oras.provider.Subject">[docs]</a>
<span class="nd">@dataclass</span>
Expand Down Expand Up @@ -1079,7 +1092,11 @@ <h1 id="modules-oras-provider--page-root">

<span class="c1"># Config is just another layer blob!</span>
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Preparing config </span><span class="si">{</span><span class="n">conf</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
<span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">upload_blob</span><span class="p">(</span><span class="n">config_file</span><span class="p">,</span> <span class="n">container</span><span class="p">,</span> <span class="n">conf</span><span class="p">)</span>
<span class="k">with</span> <span class="n">temporary_empty_config</span><span class="p">()</span> <span class="k">if</span> <span class="n">config_file</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">nullcontext</span><span class="p">(</span>
<span class="n">config_file</span>
<span class="p">)</span> <span class="k">as</span> <span class="n">config_file</span><span class="p">:</span>
<span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">upload_blob</span><span class="p">(</span><span class="n">config_file</span><span class="p">,</span> <span class="n">container</span><span class="p">,</span> <span class="n">conf</span><span class="p">)</span>

<span class="bp">self</span><span class="o">.</span><span class="n">_check_200_response</span><span class="p">(</span><span class="n">response</span><span class="p">)</span>

<span class="c1"># Final upload of the manifest</span>
Expand Down Expand Up @@ -1379,7 +1396,7 @@ <h1 id="modules-oras-provider--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/tests/test_oras.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ <h1 id="modules-oras-tests-test-oras--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/tests/test_provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ <h1 id="modules-oras-tests-test-provider--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/tests/test_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ <h1 id="modules-oras-tests-test-utils--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/utils/fileio.html
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ <h1 id="modules-oras-utils-fileio--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion _modules/oras/utils/request.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ <h1 id="modules-oras-utils-request--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion about/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ <h1 id="about-license--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ <h2 id="pull-request-process">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
7 changes: 6 additions & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,11 @@ <h2 id="T">
tags_url() (oras.container.Container method)
</a>
</li>
<li>
<a href="source/oras.html#oras.provider.temporary_empty_config">
temporary_empty_config() (in module oras.provider)
</a>
</li>
<li>
<a href="source/oras.tests.html#oras.tests.test_provider.test_annotated_registry_push">
test_annotated_registry_push() (in module oras.tests.test_provider)
Expand Down Expand Up @@ -1766,7 +1771,7 @@ <h2 id="Y">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion getting_started/developer-guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ <h3 id="docstrings">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion getting_started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ <h1 id="getting-started-index--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion getting_started/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ <h2 id="docker-container">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion getting_started/user-guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ <h2 id="custom-clients">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ <h1 id="index--page-root">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
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 @@ -632,7 +632,7 @@ <h1>
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ <h1 id="search-documentation">
© Copyright 2023, Oras Python Developers.
</div>
Last updated on
Oct 05, 2023.
Nov 16, 2023.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

Loading

0 comments on commit 8a191d6

Please sign in to comment.