Skip to content

Commit

Permalink
Merge pull request #98 from sloria/dev-chores
Browse files Browse the repository at this point in the history
Dev chores
  • Loading branch information
sloria committed Nov 9, 2018
2 parents 3170e30 + 626df2e commit 366d1ff
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 124 deletions.
24 changes: 14 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
language: python
sudo: false
cache: pip
python:
- '3.6'
- '3.5'
- '2.7'
install:
- pip install -r dev-requirements.txt
script: invoke test --lint

install: travis_retry pip install -U tox

script: tox
jobs:
fast_finish: true

include:
- { python: '3.6', env: TOXENV=lint }
- { python: '2.7', env: TOXENV=py27 }
- { python: '3.5', env: TOXENV=py35 }
- { python: '3.6', env: TOXENV=py36 }
- { python: '3.7', env: TOXENV=py37, dist: xenial, sudo: required }
- { python: '3.6', env: TOXENV=docs }

- stage: PyPI Release
if: tag IS present
python: "3.6"
env: []
# Override install and script to no-ops
install: true
script: echo "Releasing to PyPI..."
install: skip
script: skip
deploy:
provider: pypi
user: sloria
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
---------

4.2.0 (unreleased)
******************

Other changes:

* Test against Python 3.7.

4.1.0 (2018-10-25)
******************

Expand Down
16 changes: 0 additions & 16 deletions dev-requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ If you have `IPython <https://ipython.org/>`_ installed, you can run doitlive in
.. note::
Only IPython>=5.0 is supported.
Only IPython>=5.0,<7.0 is supported.
Shell completion
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ universal = 1
ignore = E127,E128,E265,E302,N803,N804,N806,E266,E731,E305,W504
max-line-length = 100
exclude = .git,.ropeproject,.tox,docs,.git,build,env,venv

[tool:pytest]
addopts = -s
28 changes: 22 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@
from setuptools import setup


REQUIRES = [
INSTALL_REQUIRES = [
'click>=4.0',
'click-completion>=0.3.1',
'click-didyoumean>=0.0.3',
]

if 'win32' in str(sys.platform).lower():
# Terminal colors for Windows
REQUIRES.append('colorama>=0.2.4')
INSTALL_REQUIRES.append('colorama>=0.2.4')

EXTRAS_REQUIRE = {
'tests': [
'pytest',
'IPython<6; python_version < "3"',
'IPython==6.5.0; python_version >= "3"',
],
'lint': [
'flake8==3.6.0',
],
}
EXTRAS_REQUIRE['dev'] = (
EXTRAS_REQUIRE['tests'] +
EXTRAS_REQUIRE['lint'] +
['tox']
)

def find_version(fname):
"""Attempts to find the version number in the file names fname.
Expand All @@ -31,7 +47,6 @@ def find_version(fname):
raise RuntimeError('Cannot find version information')
return version

__version__ = find_version('doitlive/__version__.py')

def read(fname):
with codecs.open(fname, 'r', encoding='utf-8') as fp:
Expand All @@ -40,13 +55,14 @@ def read(fname):

setup(
name='doitlive',
version=__version__,
version=find_version('doitlive/__version__.py'),
description='Because sometimes you need to do it live.',
long_description=read('README.rst'),
author='Steven Loria',
author_email='sloria1@gmail.com',
url='https://github.com/sloria/doitlive',
install_requires=REQUIRES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
license='MIT',
zip_safe=False,
keywords='doitlive cli live coding presentations shell',
Expand All @@ -59,7 +75,7 @@ def read(fname):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: 3.7',
'Environment :: Console',
],
packages=['doitlive'],
Expand Down
86 changes: 0 additions & 86 deletions tasks.py

This file was deleted.

33 changes: 28 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
[tox]
envlist =py27,py35,py36
envlist = lint,py27,py35,py36,py37,docs

[testenv]
deps=
-rdev-requirements.txt
commands=
invoke test
extras = tests
commands = pytest -s {posargs}
passenv = HOME SHELL

[testenv:lint]
extras = lint
commands = flake8 .

[testenv:docs]
deps = -rdocs/requirements.txt
extras =
commands = sphinx-build docs/ docs/_build {posargs}

; Below tasks are for development only (not run in CI)

[testenv:watch-docs]
deps =
-rdocs/requirements.txt
sphinx-autobuild
extras =
commands = sphinx-autobuild --open-browser docs/ docs/_build {posargs} -z doitlive

[testenv:watch-readme]
deps = restview
skip_install = true
commands = restview README.rst

0 comments on commit 366d1ff

Please sign in to comment.