Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/gen_py_module_package_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
Expand All @@ -33,5 +33,5 @@ jobs:
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide => strict 79
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics --max-doc-length 79
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics --max-doc-length 127
4 changes: 1 addition & 3 deletions .github/workflows/gen_py_module_python3_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@ on:
- 'gen_py_module/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
pull_request:
branches: [ master ]
paths:
- 'gen_py_module/**'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.cfg'
- 'setup.py'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up python3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gen_py_module_python_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
modules_ok=0
modules=($(find gen_py_module/ tests/ -type f -name '*.py' -exec echo '{}' \;))
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 80 ]] && modules_ok=1; done
for mod in "${modules[@]}"; do line_length=$(wc -L < "${mod}"); [[ $line_length -gt 127 ]] && modules_ok=1; done
[[ $modules_ok -eq 0 ]] && echo ok || exit 1
- name: Check max number of lines in modules
id: num_line_checker
Expand Down
118 changes: 58 additions & 60 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,58 @@
# Copyright 2017 - 2024 Vladimir Roncevic <elektron.ronca@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM debian:12
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
vim \
nano \
tree \
htop \
unzip \
ca-certificates \
openssl \
python3 \
python3-pip \
python3-wheel \
libyaml-dev

RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade build
RUN rm -f get-pip.py
RUN mkdir /gen_py_module/
RUN mkdir /tests/
COPY gen_py_module /gen_py_module/
COPY setup.py /
COPY setup.cfg /
COPY pyproject.toml /
COPY MANIFEST.in /
COPY README.md /
COPY LICENSE /
COPY requirements.txt /
COPY tests /tests/
RUN pip3 install -r requirements.txt
RUN rm -f requirements.txt
RUN python3 -m build --no-isolation --wheel
RUN pip3 install /dist/gen_py_module-*-py3-none-any.whl
RUN rm -rf /gen_py_module/
RUN rm -rf dist/ tests/
RUN rm -f setup.cfg
RUN rm -f pyproject.toml
RUN rm -f MANIFEST.in
RUN rm -f setup.py
RUN rm -f README.md
RUN rm -f LICENSE
# Copyright 2017 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM debian:12
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
vim \
nano \
tree \
htop \
unzip \
ca-certificates \
openssl \
python3 \
python3-pip \
python3-wheel \
libyaml-dev

RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python3 get-pip.py
RUN python3 -m pip install --upgrade setuptools
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade build
RUN rm -f get-pip.py
RUN mkdir /gen_py_module/
RUN mkdir /tests/
COPY gen_py_module /gen_py_module/
COPY setup.py /
COPY pyproject.toml /
COPY MANIFEST.in /
COPY README.md /
COPY LICENSE /
COPY requirements.txt /
COPY tests /tests/
RUN pip3 install -r requirements.txt
RUN rm -f requirements.txt
RUN python3 -m build --no-isolation --wheel
RUN pip3 install /dist/gen_py_module-*-py3-none-any.whl
RUN rm -rf /gen_py_module/
RUN rm -rf dist/ tests/
RUN rm -f pyproject.toml
RUN rm -f MANIFEST.in
RUN rm -f setup.py
RUN rm -f README.md
RUN rm -f LICENSE
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ other information that should be provided before the modules are installed.
- [Install using docker](#install-using-docker)
- [Dependencies](#dependencies)
- [Tool structure](#tool-structure)
- [Code structure](#code-coverage)
- [Docs](#docs)
- [Contributing](#contributing)
- [Copyright and licence](#copyright-and-licence)
Expand Down Expand Up @@ -137,11 +138,11 @@ Generator structure

| Name | Stmts | Miss | Cover |
|------|-------|------|-------|
| `gen_py_module/__init__.py` | 75 | 14 | 81% |
| `gen_py_module/pro/__init__.py` | 62 | 2 | 97% |
| `gen_py_module/pro/read_template.py` | 66 | 13 | 80% |
| `gen_py_module/pro/write_template.py` | 52 | 3 | 94% |
| **Total** | 255 | 32 | 87% |
| `gen_py_module/__init__.py` | 73 | 12 | 84%|
| `gen_py_module/pro/__init__.py` | 60 | 0 | 100%|
| `gen_py_module/pro/read_template.py` | 64 | 11 | 83%|
| `gen_py_module/pro/write_template.py` | 50 | 1 | 98%|
| **Total** | 247 | 24 | 90% |

### Docs

Expand All @@ -160,7 +161,7 @@ More documentation and info at

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Copyright (C) 2017 - 2024 by [vroncevic.github.io/gen_py_module](https://vroncevic.github.io/gen_py_module)
Copyright (C) 2017 - 2026 by [vroncevic.github.io/gen_py_module](https://vroncevic.github.io/gen_py_module)

**gen_py_module** is free software; you can redistribute it and/or modify
it under the same terms as Python itself, either Python version 3.x or,
Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/gen_py_module.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/gen_py_module.pro.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/gen_py_module.pro.read_template.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/gen_py_module.pro.write_template.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/modules.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.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: 37c487715594ac9029a4292119c25613
config: f0134f3e34050deb1ab63ac77d03eadb
tags: 645f666f9bcd5a90fca523b33c5a78b7
24 changes: 12 additions & 12 deletions docs/build/html/_modules/gen_py_module.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1>Source code for gen_py_module</h1><div class="highlight"><pre>
<span class="sd">Module</span>
<span class="sd"> gen_py_module.py</span>
<span class="sd">Copyright</span>
<span class="sd"> Copyright (C) 2017 - 2024 Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;</span>
<span class="sd"> Copyright (C) 2017 - 2026 Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;</span>
<span class="sd"> gen_py_module is free software: you can redistribute it and/or modify it</span>
<span class="sd"> under the terms of the GNU General Public License as published by the</span>
<span class="sd"> Free Software Foundation, either version 3 of the License, or</span>
Expand Down Expand Up @@ -74,18 +74,18 @@ <h1>Source code for gen_py_module</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">ats_utilities.exceptions.ats_type_error</span> <span class="kn">import</span> <span class="n">ATSTypeError</span>
<span class="kn">from</span> <span class="nn">ats_utilities.exceptions.ats_value_error</span> <span class="kn">import</span> <span class="n">ATSValueError</span>
<span class="kn">from</span> <span class="nn">gen_py_module.pro</span> <span class="kn">import</span> <span class="n">GenModule</span>
<span class="k">except</span> <span class="ne">ImportError</span> <span class="k">as</span> <span class="n">ats_error_message</span><span class="p">:</span>
<span class="c1"># Force close python ATS ##################################################</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;</span><span class="se">\n</span><span class="si">{</span><span class="vm">__file__</span><span class="si">}</span><span class="se">\n</span><span class="si">{</span><span class="n">ats_error_message</span><span class="si">}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">ImportError</span> <span class="k">as</span> <span class="n">ats_error_message</span><span class="p">:</span> <span class="c1"># pragma: no cover</span>
<span class="c1"># Force exit python #######################################################</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;</span><span class="se">\n</span><span class="si">{</span><span class="vm">__file__</span><span class="si">}</span><span class="se">\n</span><span class="si">{</span><span class="n">ats_error_message</span><span class="si">}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span> <span class="c1"># pragma: no cover</span>

<span class="n">__author__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;Copyright 2017, https://vroncevic.github.io/gen_form_model&#39;</span>
<span class="n">__author__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__copyright__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Copyright 2026, https://vroncevic.github.io/gen_form_model&#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/vroncevic/gen_py_module/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.5.6&#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="n">__license__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/vroncevic/gen_py_module/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;1.5.7&#39;</span>
<span class="n">__maintainer__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>


<div class="viewcode-block" id="GenPyModule">
Expand Down Expand Up @@ -270,7 +270,7 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2024, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;.
&#169; Copyright 2026, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
</div>
</body>
Expand Down
24 changes: 12 additions & 12 deletions docs/build/html/_modules/gen_py_module/pro.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>Source code for gen_py_module.pro</h1><div class="highlight"><pre>
<span class="sd">Module</span>
<span class="sd"> __init__.py</span>
<span class="sd">Copyright</span>
<span class="sd"> Copyright (C) 2017 - 2024 Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;</span>
<span class="sd"> Copyright (C) 2017 - 2026 Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;</span>
<span class="sd"> gen_py_module is free software: you can redistribute it and/or modify it</span>
<span class="sd"> under the terms of the GNU General Public License as published by the</span>
<span class="sd"> Free Software Foundation, either version 3 of the License, or</span>
Expand Down Expand Up @@ -73,18 +73,18 @@ <h1>Source code for gen_py_module.pro</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">ats_utilities.exceptions.ats_value_error</span> <span class="kn">import</span> <span class="n">ATSValueError</span>
<span class="kn">from</span> <span class="nn">gen_py_module.pro.read_template</span> <span class="kn">import</span> <span class="n">ReadTemplate</span>
<span class="kn">from</span> <span class="nn">gen_py_module.pro.write_template</span> <span class="kn">import</span> <span class="n">WriteTemplate</span>
<span class="k">except</span> <span class="ne">ImportError</span> <span class="k">as</span> <span class="n">ats_error_message</span><span class="p">:</span>
<span class="c1"># Force close python ATS ##################################################</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;</span><span class="se">\n</span><span class="si">{</span><span class="vm">__file__</span><span class="si">}</span><span class="se">\n</span><span class="si">{</span><span class="n">ats_error_message</span><span class="si">}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">ImportError</span> <span class="k">as</span> <span class="n">ats_error_message</span><span class="p">:</span> <span class="c1"># pragma: no cover</span>
<span class="c1"># Force exit python #######################################################</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;</span><span class="se">\n</span><span class="si">{</span><span class="vm">__file__</span><span class="si">}</span><span class="se">\n</span><span class="si">{</span><span class="n">ats_error_message</span><span class="si">}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span> <span class="c1"># pragma: no cover</span>

<span class="n">__author__</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">&#39;Copyright 2017, https://vroncevic.github.io/gen_form_model&#39;</span>
<span class="n">__author__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__copyright__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Copyright 2026, https://vroncevic.github.io/gen_form_model&#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/vroncevic/gen_py_module/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">&#39;1.5.6&#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="n">__license__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;https://github.com/vroncevic/gen_py_module/blob/dev/LICENSE&#39;</span>
<span class="n">__version__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;1.5.7&#39;</span>
<span class="n">__maintainer__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Vladimir Roncevic&#39;</span>
<span class="n">__email__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;elektron.ronca@gmail.com&#39;</span>
<span class="n">__status__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s1">&#39;Updated&#39;</span>


<div class="viewcode-block" id="GenModule">
Expand Down Expand Up @@ -250,7 +250,7 @@ <h3>Navigation</h3>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2024, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;.
&#169; Copyright 2026, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
</div>
</body>
Expand Down
Loading
Loading