Skip to content

Commit

Permalink
Merge pull request #99 from TheFriendlyCoder/template_update
Browse files Browse the repository at this point in the history
updated to template spec
  • Loading branch information
TheFriendlyCoder committed Feb 11, 2019
2 parents dddbd86 + c6cd95b commit 1332eb8
Show file tree
Hide file tree
Showing 18 changed files with 495 additions and 303 deletions.
28 changes: 0 additions & 28 deletions .idea/codeStyles/Project.xml

This file was deleted.

77 changes: 32 additions & 45 deletions .travis.yml
@@ -1,54 +1,41 @@
language: python

# Generate a matrix for all Python versions we support
matrix:
python:
- 2.7
- 3.4
- 3.5
- 3.6
- pypy
- pypy3.5

install:
- pip install tox twine wheel python-coveralls

script:
- echo $TRAVIS_PYTHON_VERSION
- export PYVER=`echo $TRAVIS_PYTHON_VERSION | tr "." "\n" | head -n 1 | sed 's/^py//'`
- echo $PYVER
- tox -e py$PYVER

# Deploy to test.pypi.org for branches
# Deploy to pypi.org for tags
# NOTE: You can not replace builds published to pypi, even if you delete one
# so you must make sure your versions are always unique
jobs:
include:
- name: "Python pypy 2 tests"
python: pypy
env: TOXENV=pypy
- name: "Python pypy 3 tests"
python: pypy3
env: TOXENV=pypy3
- name: "Python 2.7 tests"
python: 2.7
env: TOXENV=py27
- name: "Python 3.4 tests"
python: 3.4
env: TOXENV=py34
- name: "Python 3.5 tests"
python: 3.5
env: TOXENV=py35
- name: "Python 3.6 tests"
python: 3.6
env: TOXENV=py36
- name: "Python 3.7 tests"
python: 3.7
env: TOXENV=py37
# NOTE: Python 3.7 is currently not natively supported by Travis-CI so we
# have to hack around it here using Ubuntu 16.04
dist: xenial
sudo: true
- name: "Deploy to PYPI"
# Only enable deploys when building from tags
if: tag IS present
# As a general convention we just package and deploy from Python 3.6
# The version really shouldn't matter since our wheel file is version
# agnostic
- stage: deploy-release
python: 3.6
env: TOXENV=py36
stage: deploy
script:
- python setup.py bdist_wheel
- twine upload dist/*.whl -u $DEPLOY_USER -p $DEPLOY_PASS

# Install all of our build-time dependencies
install: pip install wheel twine tox coveralls

# Scripts for the default "test" stage
# one copy of this default job will be generated for each python
# version stated above
script:
- tox
if: tag IS true
- stage: deploy-snapshot
python: 3.6
script:
- python setup.py bdist_wheel
- twine upload --repository-url https://test.pypi.org/legacy/
dist/*.whl -u $DEPLOY_USER -p $DEPLOY_PASS
if: tag IS NOT true

after_success:
- coveralls
- coveralls
40 changes: 0 additions & 40 deletions README.rst
@@ -1,43 +1,3 @@
.. This is a readme file encoded in reStructuredText format, intended for use on
.. the summary page for the FriendlyShell PyPI project. Care should be taken to
.. make sure the encoding is compatible with PyPI's markup syntax. See this site
.. for details:
.. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
..

.. image:: https://img.shields.io/pypi/l/friendlyshell.svg
:target: https://github.com/TheFriendlyCoder/friendlyshell/blob/master/LICENSE
:alt: License

.. image:: https://coveralls.io/repos/github/TheFriendlyCoder/friendlyshell/badge.svg?branch=master
:target: https://coveralls.io/github/TheFriendlyCoder/friendlyshell?branch=master
:alt: Test Coverage

.. image:: https://readthedocs.org/projects/friendlyshell/badge/?version=latest
:target: http://friendlyshell.readthedocs.io/en/latest
:alt: Documentation Status

.. image:: https://requires.io/github/TheFriendlyCoder/friendlyshell/requirements.svg?branch=master
:target: https://requires.io/github/TheFriendlyCoder/friendlyshell/requirements/?branch=master
:alt: Requirements Status

.. image:: https://img.shields.io/pypi/pyversions/friendlyshell.svg
:target: https://pypi.org/project/friendlyshell/
:alt: Python Versions

.. image:: https://img.shields.io/pypi/format/friendlyshell.svg
:target: https://pypi.org/project/friendlyshell/
:alt: Format

.. image:: https://badge.fury.io/py/friendlyshell.svg
:target: https://pypi.org/project/friendlyshell/
:alt: Latest Version

.. image:: https://api.travis-ci.org/TheFriendlyCoder/friendlyshell.svg?branch=master
:target: https://travis-ci.org/TheFriendlyCoder/friendlyshell
:alt: Build status

=============
Overview
=============
Expand Down
25 changes: 16 additions & 9 deletions docs/conf.py
Expand Up @@ -12,20 +12,27 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join('..', 'src')))
import ast
# import os
# import sys
# sys.path.insert(0, os.path.abspath(os.path.join('..', 'src')))


# -- Project information -----------------------------------------------------

project = 'friendlyshell'
copyright = '2018, Kevin S. Phillips'
copyright = '2019, Kevin S. Phillips'
author = 'Kevin S. Phillips'

# The short X.Y version
import friendlyshell
version = friendlyshell.__version__
_proj_props = ast.literal_eval(open('../project.prop').read())
_proj_props["VERSION"] = \
ast.literal_eval(open("../src/" + _proj_props["NAME"] + "/version.prop").read())
project = _proj_props["NAME"]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = _proj_props["VERSION"]
# The full version, including alpha/beta/rc tags.
release = version


Expand Down
25 changes: 25 additions & 0 deletions lock.sh
@@ -0,0 +1,25 @@
#!/bin/bash -e
# Generates pip dependency files for build and test purposes
# NOTE: The generated requirements files are named in a weird
# way here because we are trying to prevent requires.io
# from picking up test dependencies and reporting on them
# to our users. It seems to pick up quite a variety of
# file patterns, recursively within the repo. *.reqs
# seems to be a suitable exception
# NOTE: The requirements files generated by this script are
# referenced by the tox.ini config file at build time.
# Any changes to this pattern will need to be reflected
# there as well.
virtualenv -p python2 tmp
source ./tmp/bin/activate
pip install -e .[dev]
pip freeze --exclude-editable > ./tests/python2.reqs
deactivate
rm -rf tmp

virtualenv -p python3 tmp
source ./tmp/bin/activate
pip install -e .[dev]
pip freeze --exclude-editable > ./tests/python3.reqs
deactivate
rm -rf tmp
28 changes: 28 additions & 0 deletions project.prop
@@ -0,0 +1,28 @@
# This file contains a single dictionary definition containing all of the
# project-specific customization options supported by this template. It is
# parsed by the setup.py at build time.
{
"NAME" : "friendlyshell",
"REPO" : "friendlyshell",
"DEPENDENCIES" : [
"six",
"pyparsing",
"tabulate",
'pyreadline; platform_system == "Windows"',
],
"DEV_DEPENDENCIES" : [
"twine",
"pytest",
"pytest-cov",
"pytest-timeout",
"mock",
"pylint",
"sphinx",
"tox",
],
"DESCRIPTION" : "Framework for writing interactive Python command line "
"interfaces, similar to the 'cmd' built in class.",
"KEYWORDS" : "cmd command line shell interactive interpreter",
"SUPPORTED_PYTHON_VERSION" :
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4",
}
50 changes: 0 additions & 50 deletions requirements2.txt

This file was deleted.

41 changes: 0 additions & 41 deletions requirements3.txt

This file was deleted.

0 comments on commit 1332eb8

Please sign in to comment.