mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-17 14:10:21 -04:00
add a few simple boilerplates
This commit is contained in:
parent
962d1a0778
commit
60f223867a
16 changed files with 80 additions and 0 deletions
26
Argparse_app/main.py
Normal file
26
Argparse_app/main.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
description = 'Describe what your app does here'
|
||||
|
||||
# Run CLI menu.
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
|
||||
group.add_argument('-e', '--encode', type=int, help="some help here")
|
||||
|
||||
group.add_argument('-d', '--decode', help="another help here")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
print(args.encode)
|
||||
print(args.decode)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
28
Test_Boilerplate/Makefile
Normal file
28
Test_Boilerplate/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
.PHONY: setup install clean test lint
|
||||
|
||||
default: test
|
||||
|
||||
setup:
|
||||
pip install -r requirements.txt
|
||||
|
||||
install:
|
||||
python setup.py install
|
||||
|
||||
clean:
|
||||
@find . -type f -name '*.pyc' -delete
|
||||
@find . -type d -name '__pycache__' | xargs rm -rf
|
||||
@find . -type d -name '*.ropeproject' | xargs rm -rf
|
||||
@rm -rf build/
|
||||
@rm -rf dist/
|
||||
@rm -rf venv/
|
||||
@rm -f src/*.egg*
|
||||
@rm -f MANIFEST
|
||||
@rm -rf docs/build/
|
||||
@rm -f .coverage.*
|
||||
|
||||
test:
|
||||
@tox -- -s
|
||||
|
||||
lint:
|
||||
@tox -e lint
|
||||
|
15
Test_Boilerplate/setup.py
Normal file
15
Test_Boilerplate/setup.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='testing_app_name',
|
||||
version='0.0.1',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
author='Mia von Steinkirch',
|
||||
install_requires=[
|
||||
],
|
||||
entry_points='''
|
||||
[console_scripts]
|
||||
testing_app_name=src.main:main
|
||||
''',
|
||||
)
|
11
Test_Boilerplate/tests/example_test.py
Normal file
11
Test_Boilerplate/tests/example_test.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
class AppNameTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
passd
|
||||
|
||||
def test_something(self):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue