cleanup names for dirs

This commit is contained in:
bt3gl 2022-03-23 18:32:49 +04:00
parent 0904ec1dc4
commit 0da3cbd74a
80 changed files with 62 additions and 2263 deletions

View file

@ -0,0 +1,24 @@
.PHONY: clean-pyc clean-dit clean test dist version
default: test
clean-pyc:
@find . -iname '*.py[co]' -delete
@find . -iname '__pycache__' -delete
clean-dist:
@rm -rf dist/
@rm -rf build/
@rm -rf *.egg-info
clean: clean-pyc clean-dist
test:
pytest -vvv
dist: clean
python3 setup.py sdist
python3 setup.py bdist_wheel
version: dist
python3 setup.py --version

View file

@ -0,0 +1,41 @@
# Awesome Python CLI Boilerplate
A quick boilerplate when creating a new CLI apps/scripts in Python3.
### Install
Create and source a virtual environment:
```
virtualenv venv
source venv/bin/activate
```
Install dependencies:
```
pip install -r requirements.txt
```
Install package:
```
pip install .
```
Test your install with:
```
yourapp --help
```
---
### Development
Create a virtual environment and install the package with an editable option:
```
pip install --editable .
```

View file

@ -0,0 +1,5 @@
[pytest]
norecursedirs = venv* .*
addopts =
-r fEsxXw
-vvv

View file

@ -0,0 +1 @@
Click==7.0

View file

@ -0,0 +1,16 @@
from setuptools import setup, find_packages
setup(
name='yourapp',
version='0.0.1',
packages=find_packages(),
include_package_data=True,
author='Mia von Steinkirch',
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
yourapp=yourapp.yourapp:main
''',
)

View file

@ -0,0 +1 @@
# -*- coding: utf8 -*-

View file

@ -0,0 +1 @@
#!/usr/bin/env python3

View file

@ -0,0 +1,32 @@
#!/usr/bin/env python3
import click
@click.command()
@click.option('-s',
'--source',
default='dev',
nargs=1,
show_default=True,
help='Some source string.')
@click.option('-t',
'--target',
default='staging',
nargs=1,
show_default=True,
help='Some target string.')
@click.option('-p',
'--services',
required=True)
def main(source, target, services):
print(source, target, services)
if __name__ == "__main__":
main(source, target, services)