created python project template
This commit is contained in:
commit
04228c13eb
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
venv/*
|
||||||
|
streamedrequests/__pycache__/*
|
||||||
|
testdata/*
|
||||||
|
.vscode/*
|
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
dist: xenial
|
||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- 3.7
|
||||||
|
script: make test
|
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
This project uses Semantic Versioning
|
||||||
|
|
||||||
|
## 0.0.0
|
||||||
|
|
||||||
|
Initial release
|
10
README.md
Normal file
10
README.md
Normal 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
2
helloworld/__init__.py
Normal 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
0
requirements.in
Normal file
6
requirements.txt
Normal file
6
requirements.txt
Normal 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
13
run_tests.sh
Executable 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
16
setup.py
Normal 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
7
tests/test.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import unittest
|
||||||
|
class TestBasic(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_basic(self):
|
||||||
|
self.assertTrue(True)
|
||||||
|
|
||||||
|
unittest.main()
|
Loading…
Reference in New Issue
Block a user