Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pyup.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# autogenerated pyup.io config file
# autogenerated pyup.io config file
# see https://pyup.io/docs/configuration/ for all available options

schedule: every week
59 changes: 48 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ python:

dist:

addons:
coverity_scan:
# GitHub project metadata
project:
name: reactive-firewall/python-repo
version: 1.1.0
description: Python Repo Template
# Commands to prepare for build_command
# ** likely specific to your build **
build_command_prepend: make clean
# The command that will be added as an argument to "cov-build" to compile your project for analysis,
# ** likely specific to your build **
build_command: make test
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per
# https://scan.coverity.com/faq#frequency
branch_pattern: master

branches:
only:
- stable
Expand Down Expand Up @@ -52,6 +70,12 @@ matrix:
python: "pypy3.5-5.8.0"
- os: linux
python: "pypy3.5-6.0"
- os: linux
python: "pypy3.5-5.10.0"
env: TRAVIS_PYTHON_VERSION="3.5"
- os: linux
python: "pypy2.7-5.10.0"
env: TRAVIS_PYTHON_VERSION="2.7"
- os: linux
python: "nightly" # currently points to 3.7-dev
env: TRAVIS_PYTHON_VERSION="3.7-dev"
Expand All @@ -76,13 +100,25 @@ matrix:
- os: osx
osx_image: xcode9.3
language: generic
- os: osx
osx_image: xcode9.4
language: generic
- os: osx
osx_image: xcode10
language: generic
allow_failures:
- os: linux
python: "nightly" # currently points to 3.7-dev
env: TRAVIS_PYTHON_VERSION="3.7-dev"
- os: osx
osx_image: xcode6.4
language: generic
- os: osx
osx_image: xcode7.2
language: generic
- os: osx
osx_image: xcode7.3
language: generic
- os: linux
python: "2.6"
- os: linux
Expand All @@ -106,6 +142,12 @@ matrix:
python: "pypy3.5-5.8.0"
- os: linux
python: "pypy2.7-5.8.0"
- os: linux
python: "pypy3.5-5.10.0"
env: TRAVIS_PYTHON_VERSION="3.5"
- os: linux
python: "pypy2.7-5.10.0"
env: TRAVIS_PYTHON_VERSION="2.7"
- os: linux
python: "pypy3.5-6.0"
- os: linux
Expand Down Expand Up @@ -168,18 +210,18 @@ script:
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP make test" ; else make test || exit $? ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov || exit $? ; fi ;
- cp -vf .coverage ".coverall.Lasting.45678.12345" 2>/dev/null || true
- make clean || exit $? ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP make test-tox" ; else make test-tox || exit $? ; fi ;
- make clean ;
- make clean || exit $? ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP make test-tox" ; else make test-tox || exit $? ; fi ;
Copy link
Owner Author

@reactive-firewall reactive-firewall Aug 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround helps fixes tox dependency on python 3.4+ from breaking 3.3 or older builds
also lines 180-181

- make clean || true ;
- mv -vf ".coverall.Lasting.45678.12345" .coverage 2>/dev/null || true

after_failure:
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage" ; else coverage combine 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage xml" ; else coverage xml 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov 2>/dev/null || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP code climate" ; else ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov 2>/dev/null || true ; fi ;
- make clean 2>/dev/nul || true
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP code climate" ; else ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP codecov" ; else codecov 2>/dev/null || true ; fi ;
- make clean 2>/dev/null || true

after_success:
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage" ; else coverage combine 2>/dev/null || true ; fi ;
Expand All @@ -188,9 +230,4 @@ after_success:
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov || true ; fi ;
- travis_retry python3 -m pip install python-coveralls || python3 -m pip install python-coveralls || true ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else coveralls 2>/dev/null || true ; fi ;
- travis_wait 35 curl --url "https://scan.coverity.com/download/linux64?token=${COVERTY_TOKEN}&project=reactive-firewall%2Fpython-repo" -o coverity_tool.tgz || true
- travis_wait tar xzf coverity_tool.tgz || true
- rm -fr cov-int || true
- cov-build --dir cov-int ./ || true
- curl --form token=${COVERTY_TOKEN} --form email=${RF_EMAIL} --form file=@./coverty.tar.gz --form version=1.0 --form description="Python Repo - (Travis CI Build)" https://scan.coverity.com/builds?project=reactive-firewall%2Fpython-repo || true

1 change: 1 addition & 0 deletions LICENSE
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ By default this template will assume that the Travis CI Service and Circle-CI Se
[![Appveyor](https://ci.appveyor.com/api/projects/status/6gggp1wpbnnjokm4/branch/master?svg=true)](https://ci.appveyor.com/project/reactive-firewall/python-repo/branch/master)
[![Python 3](https://pyup.io/repos/github/reactive-firewall/python-repo/python-3-shield.svg)](https://pyup.io/repos/github/reactive-firewall/PiAP-python-tools/)
[![Updates](https://pyup.io/repos/github/reactive-firewall/python-repo/shield.svg)](https://pyup.io/repos/github/reactive-firewall/python-repo/)
![Size](https://img.shields.io/github/languages/code-size/reactive-firewall/python-repo.svg)
[![Test Coverage](https://api.codeclimate.com/v1/badges/f76f4e7e2eae6bff9b6a/test_coverage)](https://codeclimate.com/github/reactive-firewall/python-repo/test_coverage)
[![code coverage](https://codecov.io/gh/reactive-firewall/python-repo/branch/master/graph/badge.svg)](https://codecov.io/gh/reactive-firewall/python-repo/branch/master/)
[![Coverage Status](https://coveralls.io/repos/github/reactive-firewall/python-repo/badge.svg?branch=master)](https://coveralls.io/github/reactive-firewall/python-repo?branch=master)
[![coverity](https://scan.coverity.com/projects/13847/badge.svg)](https://scan.coverity.com/projects/reactive-firewall-python-repo)
![commits-since](https://img.shields.io/github/commits-since/reactive-firewall/python-repo/stable.svg?maxAge=9000)
[![Code Climate](https://codeclimate.com/github/reactive-firewall/python-repo/badges/gpa.svg)](https://codeclimate.com/github/reactive-firewall/python-repo)
[![CodeFactor](https://www.codefactor.io/repository/github/reactive-firewall/python-repo/badge)](https://www.codefactor.io/repository/github/reactive-firewall/python-repo)
[![codebeat badge](https://codebeat.co/badges/da1d8064-5736-49fd-9d61-d046aca38afb)](https://codebeat.co/projects/github-com-reactive-firewall-python-repo-master)
![Size](https://img.shields.io/github/languages/code-size/reactive-firewall/python-repo.svg)
![commits-since](https://img.shields.io/github/commits-since/reactive-firewall/python-repo/stable.svg?maxAge=9000)

### Stable:
[![status](https://travis-ci.org/reactive-firewall/python-repo.svg?branch=stable)](https://travis-ci.org/reactive-firewall/python-repo)
Expand All @@ -28,7 +30,7 @@ By default this template will assume that the Travis CI Service and Circle-CI Se
[![code coverage](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/graph/badge.svg)](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/)
[![code coverage](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/graph/badge.svg)](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/)
[![Coverage Status](https://coveralls.io/repos/github/reactive-firewall/python-repo/badge.svg?branch=stable)](https://coveralls.io/github/reactive-firewall/python-repo?branch=stable)

[![codebeat badge](https://codebeat.co/badges/87520e4a-6d24-4e98-a61e-6e9efc58f783)](https://codebeat.co/projects/github-com-reactive-firewall-python-repo-stable)

# How do I use this to create a new project repo?

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

# General information about the project.
project = u'python_template'
copyright = u'2017, reactive-firewall'
copyright = u'2017-2018, reactive-firewall'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -65,7 +65,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ['_build', 'tests']
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document tests separately ... not in template


# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None
Expand Down
6 changes: 5 additions & 1 deletion pythonrepo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
__version__ = """1.1.0"""
"""This is version 1.1.0 of pythonrepo Template"""


try:
import sys
import os
if 'pythonrepo' in __file__:
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
__parentPath = os.path.join(
os.path.dirname(__file__), '..'
)
sys.path.insert(0, os.path.abspath(__parentPath))
except Exception as ImportErr:
print(str(type(ImportErr)))
print(str(ImportErr))
Expand Down
34 changes: 15 additions & 19 deletions pythonrepo/pythonrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

# Python Repo Template
# ..................................
# Copyright (c) 2017, Kendrick Walls
# Copyright (c) 2017-2018, Kendrick Walls
# ..................................
# Licensed under MIT (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# ..........................................
# http://www.github.com/reactive-firewall/python-repo/LICENSE.md
# https://www.github.com/reactive-firewall/python-repo/LICENSE.md
# ..........................................
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -19,15 +19,8 @@


try:
import os
import sys
import argparse
sys.path.insert(
0,
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..')
)
)
except Exception as err:
# Show Error Info
print(str(type(err)))
Expand Down Expand Up @@ -57,7 +50,7 @@
"""Contains the short epilog of the program CLI help text."""


__version__ = """1.0.0"""
__version__ = """1.1.0"""
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version bump

"""The version of this program."""


Expand Down Expand Up @@ -103,20 +96,24 @@ def parseArgs(arguments=None):
return parser.parse_known_args(arguments)


def __checkToolArgs(args=None):
"""Handles None case for arguments as a helper function."""
if args is None:
args = [None]
return args


def useTool(tool, arguments=None):
"""Handler for launching the functions."""
if arguments is None:
arguments = [None]
if tool is None:
return None
if tool in TASK_OPTIONS.keys():
arguments = __checkToolArgs(arguments)
if (tool is not None) and (tool in TASK_OPTIONS.keys()):
try:
# print(str("launching: " + tool))
TASK_OPTIONS[tool](arguments)
except Exception:
print(str(
"WARNING - An error occured while" +
"handling the shell. Cascading failure."
"handling the tool. Cascading failure."
))
else:
return None
Expand Down Expand Up @@ -147,6 +144,5 @@ def main(argv=None):


if __name__ == '__main__':
if (sys.argv is not None) and (sys.argv is not []):
if (len(sys.argv) > 1):
main(sys.argv[1:])
if (sys.argv is not None) and (len(sys.argv) >= 1):
main(sys.argv[1:])
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pythonrepo
version = 1.0.2
version = 1.1.1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version bump

author = Mr. Walls
author-email = reactive-firewall@users.noreply.github.com
summary = python-repo template
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Python Repo Template
# ..................................
# Copyright (c) 2017, Kendrick Walls
# Copyright (c) 2017-2018, Kendrick Walls
# ..................................
# Licensed under MIT (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,7 +48,7 @@ def readFile(filename="""./README.md"""):

setup(
name="""pythonrepo""",
version="""1.0.2""",
version="""1.1.0""",
description="""Python Repo""",
long_description=readme,
install_requires=requirements,
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Python Repo Template
# ..................................
# Copyright (c) 2017, Kendrick Walls
# Copyright (c) 2017-2018, Kendrick Walls
# ..................................
# Licensed under MIT (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading