created python project template

This commit is contained in:
Kevin Froman 2019-07-15 17:22:48 -05:00
commit 04228c13eb
12 changed files with 73 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
venv/*
streamedrequests/__pycache__/*
testdata/*
.vscode/*

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
dist: xenial
language: python
python:
- 3.7
script: make test

7
CHANGELOG.md Normal file
View File

@ -0,0 +1,7 @@
# Changelog
This project uses Semantic Versioning
## 0.0.0
Initial release

1
LICENSE Normal file
View File

@ -0,0 +1 @@
YOUR_LICENSE_HERE

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
test:
./run_tests.sh

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# Python Template
This is a template repository for Python projects.
Recommended tools:
* virtualenv: https://virtualenv.pypa.io/en/latest/
* pip-tools: https://github.com/jazzband/pip-tools
This includes a setup for running tests including travis-ci. The Makefile contains a test command which will execute all test scripts in tests/ and exit with an error code if any of the tests fail.

2
helloworld/__init__.py Normal file
View File

@ -0,0 +1,2 @@
# You should rename the folder that this script is in to whatever the main package name is
print("hello world")

0
requirements.in Normal file
View File

6
requirements.txt Normal file
View File

@ -0,0 +1,6 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --generate-hashes --output-file=requirements.txt requirements.in
#

13
run_tests.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
ran=0
SECONDS=0 ;
close () {
exit 10;
}
for f in tests/*.py; do
python3 "$f" || close # if needed
let "ran++"
done
echo "ran $ran test files successfully in $SECONDS seconds"
rm -f *.dat

16
setup.py Normal file
View File

@ -0,0 +1,16 @@
from distutils.core import setup
setup(name='modulename',
version='0.0.0',
description='Library desc',
author='Author Name',
author_email='author@example.com',
url='https://example.com/',
packages=['basename'],
install_requires=[],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
)

7
tests/test.py Normal file
View File

@ -0,0 +1,7 @@
import unittest
class TestBasic(unittest.TestCase):
def test_basic(self):
self.assertTrue(True)
unittest.main()