Skip to content

Commit 7944ee2

Browse files
authored
Updated template
1 parent 61745c3 commit 7944ee2

File tree

12 files changed

+189
-1
lines changed

12 files changed

+189
-1
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
MAINTAINER Kayan Hau <[email protected]>
2+
3+
# This implies using the following docker build black magic
4+
# to make it work with different PIP indexes
5+
# https://stackoverflow.com/questions/19537645/get-environment-variable-value-in-dockerfile
6+
ENV PIP_INDEX_URL $PIP_INDEX_URL
7+
8+
ADD . /opt/apps/module
9+
RUN ((cd /opt/apps/module && pip --no-cache-dir install -e .) && \
10+
rm -rf /root/.cache/pip)

MANIFEST.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Include the license file
2+
# include LICENSE.txt
3+
4+
# Include the data files
5+
# recursive-include data *
6+
7+
# If using Python 2.6 or less, then have to include package data, even though
8+
# it's already declared in setup.py
9+
# include sample/*.dat
10+
11+
include README.md
12+
13+
include ReleaseNotes.md

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
# python-repo-template
1+
# python-repo-template
2+
This is a template repository that you can use to quickly create a python application that can be built, tested, and released as an internal python module.
3+
4+
## Setting up a new repository from this template
5+
**Create a directory and pull all the files in this template into it**
6+
7+
mkdir new_repo_name
8+
cd new_repo_name
9+
git init
10+
git pull https://github.com/kyhau/python-repo-template

ReleaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0.1.0 - Date
2+
============
3+
4+
Initial

constraints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file should only be used to resolve dependencies that pip cannot successfully resolve by itself.
2+
# Once pip is smart enough to do that itself, it should no longer be required.
3+
# See https://github.com/pypa/pip/issues/988
4+
# and https://pip.pypa.io/en/stable/user_guide/#constraints-files

module/submodule/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
Your application
3+
"""

module/submodule/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
App's main
3+
"""
4+
from __future__ import print_function
5+
import sys
6+
7+
8+
def main():
9+
"""
10+
Entry point of the app.
11+
"""
12+
print("Hello World.")
13+
return 0
14+
15+
if __name__ == "__main__":
16+
sys.exit(main())
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def test_hello_world():
2+
assert 1*100 == 10*10
3+

requirements-build.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is used for running tox, pylint and build the wheel
2+
logilab-common==1.0.2
3+
py==1.4.31
4+
pip==8.1.2
5+
pylint==1.6.4
6+
tox==2.3.1
7+
virtualenv==15.0.1
8+
wheel==0.26.0

requirements-test.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file prepares the pytest and coverage env and is used by tox.ini
2+
cov-core==1.15.0
3+
coverage==3.7.1
4+
mock==2.0.0
5+
py==1.4.31
6+
pytest==2.9.2
7+
pytest-cov==1.8.1
8+
pytest-gitignore==1.3
9+
pytest-mock==1.2
10+
-e.

0 commit comments

Comments
 (0)