mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-19 07:00:43 -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
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
|
||||
|
1
Test_Boilerplate/README.md
Normal file
1
Test_Boilerplate/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
## Testing in Python
|
0
Test_Boilerplate/requirements.txt
Normal file
0
Test_Boilerplate/requirements.txt
Normal file
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
|
47
Test_Boilerplate/tox.ini
Normal file
47
Test_Boilerplate/tox.ini
Normal file
|
@ -0,0 +1,47 @@
|
|||
[tox]
|
||||
envlist =
|
||||
lint,py27,py35,py36,py37,py38,pypy,pypy3,docs,coverage-report,flake8,spelling
|
||||
|
||||
|
||||
[testenv:coverage-report]
|
||||
basepython = python3.7
|
||||
skip_install = true
|
||||
deps = coverage[toml]>=5.0.2
|
||||
commands =
|
||||
coverage combine
|
||||
coverage report
|
||||
|
||||
|
||||
[pipupgrade]
|
||||
commands =
|
||||
{envpython} -m pip install --upgrade pip
|
||||
|
||||
|
||||
[testenv:docs]
|
||||
changedir = {toxinidir}/docs
|
||||
commands =
|
||||
{[pipupgrade]commands}
|
||||
sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||
{[cleanup]commands}
|
||||
deps =
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
|
||||
|
||||
[cleanup]
|
||||
commands =
|
||||
find {toxinidir}/tests -type f -name "*.pyc" -delete
|
||||
find {toxinidir}/tests -type d -name "__pycache__" -delete
|
||||
find {toxinidir}/src -type f -name "*.pyc" -delete
|
||||
find {toxinidir}/src -type d -name "__pycache__" -delete
|
||||
find {toxinidir}/src -type f -path "*.egg-info*" -delete
|
||||
find {toxinidir}/src -type d -path "*.egg-info" -delete
|
||||
|
||||
|
||||
[testenv:flake8]
|
||||
changedir = {toxinidir}
|
||||
deps = flake8
|
||||
commands =
|
||||
{[pipupgrade]commands}
|
||||
flake8 {toxinidir}/src/django_registration {toxinidir}/tests
|
||||
{[cleanup]commands}
|
Loading…
Add table
Add a link
Reference in a new issue