Metadata-Version: 2.1
Name: clinterfacer
Version: 1.1.2
Summary: This framework aims to simplify the creation of Command-Line Interfaces (CLIs) using python.
Home-page: https://gitlab.com/adrianohrl/cli
Author: Adriano Henrique Rossette Leite
Author-email: adrianohrl@gmail.com
Maintainer: Adriano Henrique Rossette Leite
Maintainer-email: adrianohrl@gmail.com
License: UNKNOWN
Description: # cli
        
        This framework aims to simplify the creation of Command-Line Interfaces (CLIs) using python.
        
        ## Installation
        
        To install the `clinterfacer` framework using [pip]() only, enter the following command:
        
        ```bash
        pip install clinterfacer==1.1.2
        ```
        
        However, if you are using [`pipenv`](https://pipenv.kennethreitz.org), enter the following command in the root of your project.
        
        ```bash
        pipenv install clinterfacer==1.1.2
        ```
        
        ## Usage
        
        After installation, it must be exist the follow files and folders in your project:
        
        ```bash
        clinterfaced
        ├── clinterfaced*
        │   ├── commands*
        │   │   ├── build.py
        │   │   ├── config.py
        │   │   ├── deploy.py
        │   │   ├── doc.py
        │   │   ├── __init__.py*
        │   │   └── train.py
        │   ├── __init__.py*
        │   ├── __main__.py*
        │   ├── subparsers*
        │   │   ├── build.py
        │   │   ├── config.py
        │   │   ├── deploy.py
        │   │   ├── doc.py
        │   │   ├── __init__.py*
        │   │   └── train.py
        │   └── utils.py
        ├── Makefile
        ├── Pipfile
        ├── README.md*
        └── setup.py*
        ```
        
        All the above files and foldes ending with `*` are expected by the `clinterfacer` framework. The remaining files and folders were merely used for exemplifying.
        
        ### The `setup.py` file
        
        There is a template for the `setup.py` file bellow.
        
        ```python
        #!/usr/bin/env python
        
        
        """This file is used to install the clinterfaced package."""
        
        
        # standard library(ies)
        import setuptools
        
        # local source(s)
        import clinterfaced as package
        
        
        def read(filename: pathlib.Path, encoding: str = 'utf-8') -> str:
            if not filename.exists():
                return ''
            with open(filename, 'r', encoding=encoding) as f:
                return f.read()
        
        readme = pathlib.Path('./README.md')
        metadata = {
            'name': package.__name__,
            'version': package.__version__,
            'author': package.__author__,
            'author_email': package.__email__,
            'maintainer': package.__maintainer__,
            'maintainer_email': package.__email__,
            'description': package.__description__,
            'long_description': read(readme),
            'long_description_content_type': 'text/markdown',
            'url': package.__url__,
            'packages': setuptools.find_packages(),
            'include_package_data': True,
            'install_requires': [
            ],
            'entry_points': {
                'console_scripts': [
                    f'{package.__name__} = {package.__name__}.__main__:main',
                ],
            },
            'classifiers': [
                'Programming Language :: Python :: 3',
                'Operating System :: OS Independent',
            ],
        }
        if __name __ == '__main__':
            setuptools.setup(**metadata)
        
        ```
        
        ### The `__init__.py` file
        
        ```python
        #!/usr/bin/env python
        
        """__init__.py: This script includes all the project's metadata."""
        
        __authors__ = (
            'Adriano Henrique Rossette Leite',
        )
        __email__ = (
            'adrianohrl@gmail.com',
        )
        __maintainer__ = (
            'Adriano Henrique Rossette Leite',
        )
        __copyright__ = ''
        __credits__ = []
        __license__ = ''
        __version__ = '0.0.0' # this information should be altered only by the bumpversion tool
        __status__ = 'Development' # should typically be one of 'Prototype', 'Development', 
        __description__ = 'This package uses the clinterfacer framework.'
        __url__ = 'https://gitlab.com/adrianohrl/clinterfaced'
        __author__ = ', '.join(__author__)
        __email__ = ', '.join(__email__)
        __maintainer__ = ', '.join(__maintainer__)
        options = [
            'Development',
            'Prototype',
            'Production',
        ]
        if __status__ is not in options:
            raise Exception(f'Invalid __status__: {__status__}. It should typically be one of the following: {options}')
        
        ```
        
        ### The `__main__.py` file
        
        ```python
        #!/usr/bin/env python
        
        
        """This is the main script of the clinterfaced package."""
        
        
        # standard library(ies)
        import sys
        
        # 3rd party package(s)
        import clinterfacer
        
        
        def main() -> int:
            cli = clinterfacer.CLI('clinterfaced')
            return cli.main()
        
        if __name__ == '__main__':
            return sys.exit(main())
            
        ```
        
        ### The `commands` folder
        
        ### The `subparsers` folder
        
        ### Installing the package
        
        ```bash
        pipenv install clinterfacer 
        ```
        
        ### Entering the commands in terminal
        
        ```bash
        pipenv shell
        clinterfaced build
        clinterfaced config -f ./build.txt
        clinterfaced train -t 0.6
        clinterfaced deploy
        clinterfaced doc -b html
        exit # or Ctrl+D
        ```
        
        # Releasing
        
        ```bash
        git checkout master
        git pull
        git merge --no-ff new-feature
        bumpversion [major|minor|patch]
        git push origin master --tags
        ```
        
        ```bash
        python setup.py sdist bdist_wheel
        tar tzf dist/clinterfacer-1.1.2.tar.gz 
        twine check dist/*
        twine upload  --verbose --repository-url https://test.pypi.org/legacy/ dist/*
        twine upload  --verbose dist/*
        ```
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3.7
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
