commit 04228c13ebf6e491b408982e97ae7105ded176ed Author: Kevin Froman Date: Mon Jul 15 17:22:48 2019 -0500 created python project template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9067def --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +venv/* +streamedrequests/__pycache__/* +testdata/* +.vscode/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ea7b5d9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +dist: xenial +language: python +python: + - 3.7 +script: make test \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7a79fdb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +This project uses Semantic Versioning + +## 0.0.0 + +Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6dc1141 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +YOUR_LICENSE_HERE diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..110e50a --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +test: + ./run_tests.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f077a3 --- /dev/null +++ b/README.md @@ -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. \ No newline at end of file diff --git a/helloworld/__init__.py b/helloworld/__init__.py new file mode 100644 index 0000000..a7c4586 --- /dev/null +++ b/helloworld/__init__.py @@ -0,0 +1,2 @@ +# You should rename the folder that this script is in to whatever the main package name is +print("hello world") \ No newline at end of file diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2399115 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile --generate-hashes --output-file=requirements.txt requirements.in +# diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..ba03150 --- /dev/null +++ b/run_tests.sh @@ -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 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0b049bb --- /dev/null +++ b/setup.py @@ -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", + ], + ) diff --git a/tests/test.py b/tests/test.py new file mode 100644 index 0000000..0d6f79c --- /dev/null +++ b/tests/test.py @@ -0,0 +1,7 @@ +import unittest +class TestBasic(unittest.TestCase): + + def test_basic(self): + self.assertTrue(True) + +unittest.main() \ No newline at end of file