Skip to content

Commit

Permalink
Deploying to gh-pages from @ 2746b0d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoch committed Jun 16, 2024
1 parent 1b4ab1b commit 10bc634
Show file tree
Hide file tree
Showing 39 changed files with 1,122 additions and 612 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 426343ee4a53a2ac8c58cb9ee37b90ab
config: 1dff561de2024962663450f678f99fc1
tags: 645f666f9bcd5a90fca523b33c5a78b7
57 changes: 37 additions & 20 deletions _modules/container_guts/client.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>container_guts.client &mdash; Container Guts &#39;Guts&#39; 0.0.15 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/sphinx-argparse.css" type="text/css" />
<link rel="stylesheet" href="../../_static/theme.css" type="text/css" />
<title>container_guts.client &mdash; Container Guts &#39;Guts&#39; 0.0.16 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-argparse.css?v=24ffd50e" />
<link rel="stylesheet" type="text/css" href="../../_static/theme.css?v=1e8d79bf" />


<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=c7cdf6fe"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
Expand All @@ -33,7 +36,7 @@
Container Guts 'Guts'
</a>
<div class="version">
0.0.15
0.0.16
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
Expand Down Expand Up @@ -82,7 +85,7 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>

<span class="n">__author__</span> <span class="o">=</span> <span class="s2">&quot;Vanessa Sochat&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;Copyright 2021-2022, Vanessa Sochat&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;Copyright 2021-2024, Vanessa Sochat&quot;</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s2">&quot;MPL 2.0&quot;</span>

<span class="kn">import</span> <span class="nn">argparse</span>
Expand All @@ -93,7 +96,9 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">container_guts.logger</span> <span class="kn">import</span> <span class="n">setup_logger</span>


<div class="viewcode-block" id="get_parser"><a class="viewcode-back" href="../../api_reference/container_guts.client.html#container_guts.client.get_parser">[docs]</a><span class="k">def</span> <span class="nf">get_parser</span><span class="p">():</span>
<div class="viewcode-block" id="get_parser">
<a class="viewcode-back" href="../../api_reference/container_guts.client.html#container_guts.client.get_parser">[docs]</a>
<span class="k">def</span> <span class="nf">get_parser</span><span class="p">():</span>
<span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">(</span>
<span class="n">description</span><span class="o">=</span><span class="s2">&quot;Guts&quot;</span><span class="p">,</span>
<span class="n">formatter_class</span><span class="o">=</span><span class="n">argparse</span><span class="o">.</span><span class="n">RawTextHelpFormatter</span><span class="p">,</span>
Expand Down Expand Up @@ -144,14 +149,20 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span class="n">description</span><span class="o">=</span><span class="s2">&quot;take a diff of your container against a guts database.&quot;</span><span class="p">,</span>
<span class="n">formatter_class</span><span class="o">=</span><span class="n">argparse</span><span class="o">.</span><span class="n">RawTextHelpFormatter</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">diff</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--db&quot;</span><span class="p">,</span>
<span class="s2">&quot;--database&quot;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Database root (of json files) to use, either filesystem or git URL to clone&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;database&quot;</span><span class="p">,</span>
<span class="n">similar</span> <span class="o">=</span> <span class="n">subparsers</span><span class="o">.</span><span class="n">add_parser</span><span class="p">(</span>
<span class="s2">&quot;similar&quot;</span><span class="p">,</span>
<span class="n">description</span><span class="o">=</span><span class="s2">&quot;calculate similarity of your container against a guts database.&quot;</span><span class="p">,</span>
<span class="n">formatter_class</span><span class="o">=</span><span class="n">argparse</span><span class="o">.</span><span class="n">RawTextHelpFormatter</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">for</span> <span class="n">command</span> <span class="ow">in</span> <span class="p">[</span><span class="n">diff</span><span class="p">,</span> <span class="n">similar</span><span class="p">]:</span>
<span class="n">command</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--db&quot;</span><span class="p">,</span>
<span class="s2">&quot;--database&quot;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Database root (of json files) to use, either filesystem or git URL to clone&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;database&quot;</span><span class="p">,</span>
<span class="p">)</span>

<span class="k">for</span> <span class="n">command</span> <span class="ow">in</span> <span class="n">manifest</span><span class="p">,</span> <span class="n">diff</span><span class="p">:</span>
<span class="k">for</span> <span class="n">command</span> <span class="ow">in</span> <span class="n">manifest</span><span class="p">,</span> <span class="n">diff</span><span class="p">,</span> <span class="n">similar</span><span class="p">:</span>
<span class="n">command</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;-i&quot;</span><span class="p">,</span>
<span class="s2">&quot;--include&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -186,7 +197,10 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">parser</span></div>


<div class="viewcode-block" id="run"><a class="viewcode-back" href="../../api_reference/container_guts.client.html#container_guts.client.run">[docs]</a><span class="k">def</span> <span class="nf">run</span><span class="p">():</span>

<div class="viewcode-block" id="run">
<a class="viewcode-back" href="../../api_reference/container_guts.client.html#container_guts.client.run">[docs]</a>
<span class="k">def</span> <span class="nf">run</span><span class="p">():</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Entrypoint to generating container guts</span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -240,6 +254,8 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">.manifest</span> <span class="kn">import</span> <span class="n">main</span>
<span class="k">elif</span> <span class="n">args</span><span class="o">.</span><span class="n">command</span> <span class="o">==</span> <span class="s2">&quot;diff&quot;</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">.diff</span> <span class="kn">import</span> <span class="n">main</span>
<span class="k">elif</span> <span class="n">args</span><span class="o">.</span><span class="n">command</span> <span class="o">==</span> <span class="s2">&quot;similar&quot;</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">.similar</span> <span class="kn">import</span> <span class="n">main</span>

<span class="c1"># Pass on to the correct parser</span>
<span class="n">return_code</span> <span class="o">=</span> <span class="mi">0</span>
Expand All @@ -252,6 +268,7 @@ <h1>Source code for container_guts.client</h1><div class="highlight"><pre>
<span class="n">help</span><span class="p">(</span><span class="n">return_code</span><span class="p">)</span></div>



<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">run</span><span class="p">()</span>
</pre></div>
Expand Down
34 changes: 20 additions & 14 deletions _modules/container_guts/client/manifest.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>container_guts.client.manifest &mdash; Container Guts &#39;Guts&#39; 0.0.15 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/sphinx-argparse.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/theme.css" type="text/css" />
<title>container_guts.client.manifest &mdash; Container Guts &#39;Guts&#39; 0.0.16 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx-argparse.css?v=24ffd50e" />
<link rel="stylesheet" type="text/css" href="../../../_static/theme.css?v=1e8d79bf" />


<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=c7cdf6fe"></script>
<script src="../../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
Expand All @@ -33,7 +36,7 @@
Container Guts 'Guts'
</a>
<div class="version">
0.0.15
0.0.16
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
Expand Down Expand Up @@ -81,18 +84,20 @@

<h1>Source code for container_guts.client.manifest</h1><div class="highlight"><pre>
<span></span><span class="n">__author__</span> <span class="o">=</span> <span class="s2">&quot;Vanessa Sochat&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;Copyright 2022, Vanessa Sochat&quot;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s2">&quot;Copyright 2022-2024, Vanessa Sochat&quot;</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s2">&quot;MPL 2.0&quot;</span>

<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">os</span>

<span class="kn">import</span> <span class="nn">container_guts.utils</span> <span class="k">as</span> <span class="nn">utils</span>
<span class="kn">from</span> <span class="nn">..main</span> <span class="kn">import</span> <span class="n">ManifestGenerator</span>

<span class="kn">from</span> <span class="nn">..main</span> <span class="kn">import</span> <span class="n">ManifestGenerator</span>

<div class="viewcode-block" id="main"><a class="viewcode-back" href="../../../api_reference/container_guts.client.html#container_guts.client.manifest.main">[docs]</a><span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">extra</span><span class="p">,</span> <span class="n">subparser</span><span class="p">):</span>

<div class="viewcode-block" id="main">
<a class="viewcode-back" href="../../../api_reference/container_guts.client.html#container_guts.client.manifest.main">[docs]</a>
<span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">parser</span><span class="p">,</span> <span class="n">extra</span><span class="p">,</span> <span class="n">subparser</span><span class="p">):</span>
<span class="c1"># Show args to the user</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; image: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">args</span><span class="o">.</span><span class="n">image</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot; outfile: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">args</span><span class="o">.</span><span class="n">outfile</span><span class="p">)</span>
Expand Down Expand Up @@ -120,6 +125,7 @@ <h1>Source code for container_guts.client.manifest</h1><div class="highlight"><p
<span class="n">utils</span><span class="o">.</span><span class="n">write_json</span><span class="p">(</span><span class="n">manifests</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">manifests</span><span class="p">,</span> <span class="n">indent</span><span class="o">=</span><span class="mi">4</span><span class="p">))</span></div>

</pre></div>

</div>
Expand Down
Loading

0 comments on commit 10bc634

Please sign in to comment.