jasonzhuyx
released this
01 Jul 17:59
·
73 commits
to dev-setup
since this release
Python3 Project Templates v2.0 (2019-05-31, dev-setup)
Features
- Python3 Project Creator
- Dockerfile and template for python:3
- Makefile and template (with bash scripts) to support CI integration
- Reusable
config
,logging
, and python3extension
modules - Project templates for
setup.cfg
,logging.yaml
,requirements*.txt
, andREADME.md
- Python API template options
- spec-first flask/connexion and
- code-first fastapi with gunicorn wsgi
- production Dockerfile with nginx.conf template
- openApi (swagger) spec templates
- Python unit tests examples - code coverage 98%
- Support both MacOS and Ubuntu Linux systems
QA
- Test result:
---------- coverage: platform darwin, python 3.7.3-final-0 -----------
Name Stmts Miss Cover Missing
---------------------------------------------------------------
ml/__init__.py 0 0 100.00%
ml/api/__init__.py 0 0 100.00%
ml/api/__models.py 9 0 100.00%
ml/api/__route.py 30 0 100.00%
ml/api/v1/__init__.py 0 0 100.00%
ml/api/v1/info.py 15 0 100.00%
ml/api_v1.py 5 0 100.00%
ml/app.py 6 1 83.33% 13
ml/app_config.py 21 0 100.00%
ml/app_connexion.py 56 1 98.21% 127
ml/app_fastapi.py 11 2 81.82% 39-40
ml/common/__init__.py 0 0 100.00%
ml/config.py 88 6 93.18% 87-99
ml/config_gunicorn.py 82 0 100.00%
ml/config_uvicorn.py 82 0 100.00%
ml/main.py 6 0 100.00%
ml/utils/__init__.py 0 0 100.00%
ml/utils/domain_trie.py 50 0 100.00%
ml/utils/extension.py 149 0 100.00%
ml/utils/logger.py 45 0 100.00%
ml/utils/logger_formatter.py 54 0 100.00%
---------------------------------------------------------------
TOTAL 709 10 98.59%
Coverage HTML written to dir htmlcov
Required test coverage of 95% reached. Total coverage: 98.59%
================ 131 passed, 1 skipped in 6.28 seconds ================
- CLOC
$ cloc *
118 text files.
113 unique files.
71 files ignored.
github.com/AlDanial/cloc v 1.74 T=0.52 s (113.7 files/s, 16696.9 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Bourne Shell 9 311 318 2381
Python 33 630 1101 1899
Markdown 7 171 0 477
make 2 56 75 420
Bourne Again Shell 2 51 46 406
YAML 3 14 16 150
INI 1 7 0 49
Dockerfile 1 12 14 45
JSON 1 0 0 12
--------------------------------------------------------------------------------
SUM: 59 1252 1570 5839
--------------------------------------------------------------------------------