created python project template

master
Kevin Froman 4 years ago
commit 04228c13eb

4
.gitignore vendored

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

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

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

@ -0,0 +1 @@
YOUR_LICENSE_HERE

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

@ -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.

@ -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,0 +1,6 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --generate-hashes --output-file=requirements.txt requirements.in
#

@ -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

@ -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",
],
)

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