Skip to content

Commit

Permalink
[gen_gtkmm] Updated ATS CLI mechanism, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vroncevic committed Jul 8, 2024
1 parent 901ed03 commit 78a210b
Show file tree
Hide file tree
Showing 48 changed files with 387 additions and 86 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ Generator structure
6 directories, 19 files
```

### Code coverage

| Name | Stmts | Miss | Cover |
|------|-------|------|-------|
| `gen_gtkmm/__init__.py` | 71 | 12 | 83% |
| `gen_gtkmm/pro/__init__.py` | 59 | 2 | 97% |
| `gen_gtkmm/pro/read_template.py` | 54 | 2 | 96% |
| `gen_gtkmm/pro/write_template.py` | 72 | 4 | 94% |
| **Total** | 256 | 20 | 92% |

### Docs

[![Documentation Status](https://readthedocs.org/projects/gen-esp/badge/?version=latest)](https://gen-esp.readthedocs.io/en/latest/?badge=latest)
Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/gen_gtkmm.doctree
Binary file not shown.
18 changes: 9 additions & 9 deletions docs/build/html/_modules/gen_gtkmm.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ <h1>Source code for gen_gtkmm</h1><div class="highlight"><pre>
<span class="sd">&#39;&#39;&#39;</span>

<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Dict</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Optional</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="kn">import</span> <span class="n">exists</span><span class="p">,</span> <span class="n">dirname</span><span class="p">,</span> <span class="n">realpath</span>
<span class="kn">from</span> <span class="nn">os</span> <span class="kn">import</span> <span class="n">getcwd</span>
<span class="kn">from</span> <span class="nn">argparse</span> <span class="kn">import</span> <span class="n">Namespace</span>

<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">ats_utilities.splash</span> <span class="kn">import</span> <span class="n">Splash</span>
<span class="kn">from</span> <span class="nn">ats_utilities.logging</span> <span class="kn">import</span> <span class="n">ATSLogger</span>
<span class="kn">from</span> <span class="nn">ats_utilities.cli.cfg_cli</span> <span class="kn">import</span> <span class="n">CfgCLI</span>
<span class="kn">from</span> <span class="nn">ats_utilities.cli</span> <span class="kn">import</span> <span class="n">ATSCli</span>
<span class="kn">from</span> <span class="nn">ats_utilities.console_io.error</span> <span class="kn">import</span> <span class="n">error_message</span>
<span class="kn">from</span> <span class="nn">ats_utilities.console_io.verbose</span> <span class="kn">import</span> <span class="n">verbose_message</span>
<span class="kn">from</span> <span class="nn">ats_utilities.console_io.success</span> <span class="kn">import</span> <span class="n">success_message</span>
Expand All @@ -82,15 +82,15 @@ <h1>Source code for gen_gtkmm</h1><div class="highlight"><pre>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;(C) 2024, https://electux.github.io/gen_gtkmm&#39;</span>
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Vladimir Roncevic&#39;</span><span class="p">,</span> <span class="s1">&#39;Python Software Foundation&#39;</span><span class="p">]</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/electux/gen_gtkmm/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.4&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.5&#39;</span>
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>


<div class="viewcode-block" id="GenGtkMM">
<a class="viewcode-back" href="../gen_gtkmm.html#gen_gtkmm.GenGtkMM">[docs]</a>
<span class="k">class</span> <span class="nc">GenGtkMM</span><span class="p">(</span><span class="n">CfgCLI</span><span class="p">):</span>
<span class="k">class</span> <span class="nc">GenGtkMM</span><span class="p">(</span><span class="n">ATSCli</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Defines class GenGtkMM with attribute(s) and method(s).</span>
<span class="sd"> Loads a base info, creates a CLI interface and runs operations.</span>
Expand Down Expand Up @@ -138,9 +138,9 @@ <h1>Source code for gen_gtkmm</h1><div class="highlight"><pre>
<span class="n">verbose</span><span class="p">,</span> <span class="p">[</span><span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s1"> init tool info&#39;</span><span class="p">]</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_logger</span><span class="p">:</span> <span class="n">ATSLogger</span> <span class="o">=</span> <span class="n">ATSLogger</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="n">current_dir</span><span class="si">}{</span><span class="bp">self</span><span class="o">.</span><span class="n">_LOG</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">,</span> <span class="n">verbose</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">(),</span> <span class="kc">True</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span>
<span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tool_operational</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_operational</span><span class="p">():</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_new_option</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_OPS</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="bp">self</span><span class="o">.</span><span class="n">_OPS</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">dest</span><span class="o">=</span><span class="s1">&#39;name&#39;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s1">&#39;generate project (provide name)&#39;</span>
Expand All @@ -164,9 +164,9 @@ <h1>Source code for gen_gtkmm</h1><div class="highlight"><pre>
<span class="sd"> :exceptions: None</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="n">status</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tool_operational</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_operational</span><span class="p">():</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">args</span><span class="p">:</span> <span class="n">Namespace</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">parse_args</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="n">args</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Namespace</span><span class="p">]</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">parse_args</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">bool</span><span class="p">(</span><span class="nb">getattr</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">)):</span>
<span class="n">error_message</span><span class="p">(</span>
<span class="p">[</span><span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s1"> missing name argument&#39;</span><span class="p">]</span>
Expand Down Expand Up @@ -209,7 +209,7 @@ <h1>Source code for gen_gtkmm</h1><div class="highlight"><pre>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">SystemExit</span><span class="p">:</span>
<span class="n">error_message</span><span class="p">(</span>
<span class="p">[</span><span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s1"> expected argument -n&#39;</span><span class="p">]</span>
<span class="p">[</span><span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_GEN_VERBOSE</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span><span class="si">}</span><span class="s1"> expected argument name&#39;</span><span class="p">]</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">status</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/_modules/gen_gtkmm/pro.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1>Source code for gen_gtkmm.pro</h1><div class="highlight"><pre>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;(C) 2024, https://electux.github.io/gen_gtkmm&#39;</span>
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Vladimir Roncevic&#39;</span><span class="p">,</span> <span class="s1">&#39;Python Software Foundation&#39;</span><span class="p">]</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/electux/gen_gtkmm/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.4&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.5&#39;</span>
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>
Expand Down
3 changes: 2 additions & 1 deletion docs/build/html/_modules/gen_gtkmm/pro/read_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ <h1>Source code for gen_gtkmm.pro.read_template</h1><div class="highlight"><pre>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;(C) 2024, https://electux.github.io/gen_gtkmm&#39;</span>
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Vladimir Roncevic&#39;</span><span class="p">,</span> <span class="s1">&#39;Python Software Foundation&#39;</span><span class="p">]</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/electux/gen_gtkmm/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.4&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.5&#39;</span>
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>

<span class="c1"># Template list type</span>
<span class="n">Templates</span><span class="p">:</span> <span class="n">TypeAlias</span> <span class="o">=</span> <span class="n">List</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">str</span><span class="p">]]</span>


Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/_modules/gen_gtkmm/pro/write_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1>Source code for gen_gtkmm.pro.write_template</h1><div class="highlight"><pre
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;(C) 2024, https://electux.github.io/gen_gtkmm&#39;</span>
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Vladimir Roncevic&#39;</span><span class="p">,</span> <span class="s1">&#39;Python Software Foundation&#39;</span><span class="p">]</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/electux/gen_gtkmm/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.4&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.1.5&#39;</span>
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/gen_gtkmm.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Link to this hea
<dl class="py class">
<dt class="sig sig-object py" id="gen_gtkmm.GenGtkMM">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">gen_gtkmm.</span></span><span class="sig-name descname"><span class="pre">GenGtkMM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/gen_gtkmm.html#GenGtkMM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#gen_gtkmm.GenGtkMM" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">CfgCLI</span></code></p>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">ATSCli</span></code></p>
<p>Defines class GenGtkMM with attribute(s) and method(s).
Loads a base info, creates a CLI interface and runs operations.</p>
<p>It defines:</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/objects.inv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sphinx inventory version 2
# Project: gen_gtkmm
# Version: 1.1.4
# Version: 1.1.5
# The remainder of this file is compressed using zlib.
xڵT�R�0����-�v����0@uɤp�V��hw��藘�bó�#��sN�9��� �Pz�G�w� ���v$
�x]�F�t��$�4tC��趉f�B_?.UĄd���p����gż�-e"�JW�#��Pݰ�!�,q��.��.����b&�tʺ��䐊m�a��h �a�e����1/fcZr��G:��8`��i޲=�B��Qbz���zP�5�ʮ�!�C<".+يf��l�yX��+�Z��/�1���`�ō���7Y$1�{�� V4; �@9��^�"��ޞ�(�n�}h��Bdy�Q�14�v+��u �j �s����=x/�C����]T9ϒ}J��*������+���@���@�I�ITN�����4~��"�b^�<��'Uxz�#�[\��g��5��x�`A��sw
Expand Down
Loading

0 comments on commit 78a210b

Please sign in to comment.