Skip to content

Commit 75dc4f1

Browse files
committed
Move to cookiecutter template
Allows easy distribution and docs
1 parent 598061e commit 75dc4f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1345
-164
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.gitignore

+58-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,59 @@
1-
*.sublime-*
2-
*.pyc
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
340
.coverage
4-
*.egg-info
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
55+
# Sphinx documentation
56+
docs/_build/
57+
58+
# PyBuilder
59+
target/

.travis.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
language: python
22

3-
# python versions to test
43
python:
5-
- "2.7"
6-
- "3.3"
7-
- "3.4"
8-
- "3.5"
4+
- 2.7
5+
- 3.3
6+
- 3.4
7+
- 3.5
98

10-
# install prerequisites and dependencies
11-
install:
12-
- pip install pep8 coveralls nose-exclude
13-
- pip install git+https://github.com/davidchall/nrtest.git
14-
- pip install -e .
9+
install: pip install -U tox tox-travis coverage coveralls
1510

16-
# run PEP-8 compliance test and unit tests
17-
script:
18-
- pep8 nrtest testing
19-
- nosetests testing --exclude-test=nrtest.Test --with-coverage --cover-package=nrtest
11+
script: tox
2012

21-
# Submit data to coveralls
22-
after_success:
23-
coveralls
13+
after_success: coveralls
14+
15+
deploy:
16+
provider: pypi
17+
distributions: sdist bdist_wheel
18+
user: davidchall
19+
password:
20+
secure: nPUzupWOgnO8wxr7+os3P1KfM+2amcZR9GfqHlkcq7FA9422hK2TK2gdRSK6uz0gvOfQjJS71B1KAeD8IpigqFFL6h27hwZLVcsYhYBzw4itGPHwdqLkx4+pRhJI51PfvlNviHuuK8mvzCn6LRa6DAc2dt1YDilU7lrT7e+eSGh1m7qOBqdl2lMNz4k3Z2hqML/+fA37uAmyVEaemkdoa+I3piFDhqry5G++RbUb201KrM3jvo1WS/YoXvKDJlMdkT7ZpVbVRHKubi/YKcOfFN99IsNkwF+6a0InL5+8p8c69jhwuxI9x2s+mI/PK6g3EfWHUXH5RuyMo0YJh2YzLSTWiyCeeNyS6/nj+t96MLMQdGDkWhM4ndIUwy+ZCt+eq34aE77WAiuUtAo5ttRvu3Gs/K4egl8ifgC8B7kUQmT1uPV0tRQV78ay1o3907HuhLpEo9XYRaN6GUW78nWHlKrQi+Hds3JaowRx2kp3ATHaoDV6ksJx2dUdU2Fo3w/CcNphAUHdm8iFO44tdtHufOCLOPjS37E9M2dNLF+SBQhMriZQ5Dn4olkg9zFinKI5cqQlIGLvN1FEjU8+wbGBlmqtVUrfOLqykyqoAbYoIw77N+bq2tcUDKK1/bYMEcjBesHx+zpyhkfaqAA6ZKe/44hbja/aVKmkDhXgd3H7t7U=
21+
on:
22+
tags: true
23+
repo: davidchall/nrtest
24+
python: '2.7'

HISTORY.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=======
2+
History
3+
=======
4+
5+
0.1.0 (2016-2-19)
6+
------------------
7+
8+
* First release on PyPI.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

MANIFEST.in

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
include HISTORY.rst
2+
include LICENSE
3+
include README.rst
4+
5+
recursive-include tests *
6+
recursive-exclude * __pycache__
7+
recursive-exclude * *.py[co]
8+
9+
recursive-include docs *.rst conf.py Makefile make.bat

Makefile

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
.PHONY: clean-pyc clean-build docs clean
2+
define BROWSER_PYSCRIPT
3+
import os, webbrowser, sys
4+
try:
5+
from urllib import pathname2url
6+
except:
7+
from urllib.request import pathname2url
8+
9+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
10+
endef
11+
export BROWSER_PYSCRIPT
12+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
13+
14+
help:
15+
@echo "clean - remove all build, test, coverage and Python artifacts"
16+
@echo "clean-build - remove build artifacts"
17+
@echo "clean-pyc - remove Python file artifacts"
18+
@echo "clean-test - remove test and coverage artifacts"
19+
@echo "lint - check style with flake8"
20+
@echo "test - run tests quickly with the default Python"
21+
@echo "test-all - run tests on every Python version with tox"
22+
@echo "coverage - check code coverage quickly with the default Python"
23+
@echo "docs - generate Sphinx HTML documentation, including API docs"
24+
@echo "release - package and upload a release"
25+
@echo "dist - package"
26+
@echo "install - install the package to the active Python's site-packages"
27+
28+
clean: clean-build clean-pyc clean-test
29+
30+
clean-build:
31+
rm -fr build/
32+
rm -fr dist/
33+
rm -fr .eggs/
34+
find . -name '*.egg-info' -exec rm -fr {} +
35+
find . -name '*.egg' -exec rm -f {} +
36+
37+
clean-pyc:
38+
find . -name '*.pyc' -exec rm -f {} +
39+
find . -name '*.pyo' -exec rm -f {} +
40+
find . -name '*~' -exec rm -f {} +
41+
find . -name '__pycache__' -exec rm -fr {} +
42+
43+
clean-test:
44+
rm -fr .tox/
45+
rm -f .coverage
46+
rm -fr htmlcov/
47+
48+
lint:
49+
flake8 nrtest tests
50+
51+
test:
52+
python setup.py test
53+
54+
test-all:
55+
tox
56+
57+
coverage:
58+
coverage run --source nrtest setup.py test
59+
coverage report -m
60+
coverage html
61+
$(BROWSER) htmlcov/index.html
62+
63+
docs:
64+
rm -f docs/nrtest.rst
65+
rm -f docs/modules.rst
66+
sphinx-apidoc -o docs/ nrtest
67+
$(MAKE) -C docs clean
68+
$(MAKE) -C docs html
69+
$(BROWSER) docs/_build/html/index.html
70+
71+
servedocs: docs
72+
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
73+
74+
release: clean
75+
python setup.py sdist upload
76+
python setup.py bdist_wheel upload
77+
78+
dist: clean
79+
python setup.py sdist
80+
python setup.py bdist_wheel
81+
ls -l dist
82+
83+
install: clean
84+
python setup.py install

README.md

-6
This file was deleted.

README.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
===============================
2+
nrtest
3+
===============================
4+
5+
|pypi| |travis-ci| |coveralls| |readthedocs|
6+
7+
Numerical regression testing
8+
9+
10+
.. |pypi| image:: https://img.shields.io/pypi/v/nrtest.svg
11+
:target: https://pypi.python.org/pypi/nrtest
12+
:alt: PyPI Package
13+
14+
.. |travis-ci| image:: https://img.shields.io/travis/davidchall/nrtest.svg
15+
:target: https://travis-ci.org/davidchall/nrtest
16+
:alt: Build Status
17+
18+
.. |coveralls| image:: https://coveralls.io/repos/github/davidchall/nrtest/badge.svg?branch=master
19+
:target: https://coveralls.io/github/davidchall/nrtest?branch=master
20+
:alt: Code Coverage
21+
22+
.. |readthedocs| image:: https://readthedocs.org/projects/nrtest/badge/?version=latest
23+
:target: https://nrtest.readthedocs.org/en/latest/?badge=latest
24+
:alt: Documentation Status

0 commit comments

Comments
 (0)