Metadata-Version: 2.1
Name: ul-py-tool
Version: 1.15.42
Summary: Python ul py tool
Home-page: https://gitlab.neroelectronics.by/unic-lab/libraries/common-python-utils/ul-py-tool.git
Author: Unic-lab
Author-email: 
Platform: any
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: numpy (==1.23.3)
Requires-Dist: pandas (==1.4.3)
Requires-Dist: pydantic[mypy] (==1.10.2)
Requires-Dist: PyYAML (==6.0)
Requires-Dist: colored (==1.4.3)
Requires-Dist: rich (==12.6.0)
Requires-Dist: tomli (==2.0.1)
Requires-Dist: requests (==2.28.1)
Requires-Dist: deepdiff (==5.8.1)
Requires-Dist: mypy (==0.982)
Requires-Dist: types-pyyaml (==6.0.11)
Requires-Dist: types-pytz (==2022.1.2)
Requires-Dist: types-python-dateutil (==2.8.19)
Requires-Dist: types-setuptools (==63.4.0)
Requires-Dist: typing-extensions (==4.3.0)
Requires-Dist: data-science-types (==0.2.23)
Requires-Dist: types-requests (==2.28.8)
Requires-Dist: pycodestyle (==2.9.1)
Requires-Dist: flake8 (==5.0.4)
Requires-Dist: flake8-commas (==2.1.0)
Requires-Dist: flake8-noqa (==1.2.8)
Requires-Dist: flake8-polyfill (==1.0.2)
Requires-Dist: flake8-blind-except (==0.2.1)
Requires-Dist: flake8-tidy-imports (==4.8.0)
Requires-Dist: flake8-self (==0.2.2)
Requires-Dist: flake8-super-call (==1.0.0)
Requires-Dist: flake8-bugbear (==22.7.1)
Requires-Dist: flake8-print (==5.0.0)
Requires-Dist: pep8-naming (==0.13.1)
Requires-Dist: isort[colors] (==5.10.1)
Requires-Dist: black (==22.10.0)
Requires-Dist: yamllint (==1.28.0)
Requires-Dist: ruff (==0.0.198)
Requires-Dist: pytest (==7.1.3)
Requires-Dist: pytest-cov (==3.0.0)
Requires-Dist: python-gitlab (==3.8.0)
Requires-Dist: kubernetes (==23.6.0)
Requires-Dist: wheel (==0.37.1)
Requires-Dist: twine (==4.0.1)
Requires-Dist: setuptools (==63.4.2)

# ul-py-tool
> This library allows to bootstrap Python UnicLab project from scratch.
> It provides a set of useful CMD commands mapping in *main.py* file.

```python
def main() -> None:
    Cmd.main({
        'code_stats': 'ul_py_tool.commands.cmd_stats:CmdStats',
        'minor': 'ul_py_tool.commands.cmd_version:CmdVersionMinor',
        'major': 'ul_py_tool.commands.cmd_version:CmdVersionMajor',
        'patch': 'ul_py_tool.commands.cmd_version:CmdVersionPatch',
        'lint': 'ul_py_tool.commands.cmd_lint:CmdLint',
        'install': 'ul_py_tool.commands.cmd_install:CmdInstall',
        'test': 'ul_py_tool.commands.cmd_test:CmdTest',
        'fmt': 'ul_py_tool.commands.cmd_fmt:CmdFmt',
        'release': 'ul_py_tool.commands.cmd_release:CmdRelease',
        'test_secrets': 'ul_py_tool.commands.cmd_test_secrets.py:CmdTestSecrets',
        'build-images': 'ul_py_tool.commands.cmd_build_images:CmdBuildImages',
        'outdated': 'ul_py_tool.commands.cmp_outdated:CmdOutdated',
        'cleanup': 'ul_py_tool.commands.cmd_cleanup:CmdCleanup',
        'fix_own': 'ul_py_tool.commands.cmd_fix_own:CmdFixOwn',
    })
```

> This maps the code of the CMD command to its name. After mapping, we can use a command like this:
```bash
python -m FOLDER_NAME_WHERE_MAIN_PY_LOCATED command_name
python -m src run_some_script  # main.py located in src/ root
```


| Command        | Desription                                                                     |
|----------------|--------------------------------------------------------------------------------|
| Cmd            | Base class. Each command should inherit from it and provide method *run()*.    |
| CmdStats       | Command that provides us statistics about service, lines of code written, etc. |
| CmdVersion     | Command that applies a versioning to setup.py (major, minor, patch).           |
| CmdTest        | Command that runs tests.                                                       |
| CmdRelease     | Command for making a release.                                                  |
| CmdLint        | Command to run lint (different steps).                                         |
| CmdFmt         | Command to apply formatting (black, isort (to be implemented)).                |
| CmdBuildImages | Command that helps to build & push to the registry Docker images.              |
| CmdInstall     | Generates project files, configs, pre-commits, etc.                            |

