Skip to content

Commit

Permalink
Set up the Travis.CI integration environment and packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoboturov committed Jan 10, 2017
1 parent d03e5f1 commit baaa8a3
Show file tree
Hide file tree
Showing 18 changed files with 149 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
install:
- pip install tox tox-travis
script:
- tox
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Reinforcement Learning: An Introduction

[![Build Status](https://travis-ci.org/aoboturov/reinforcement-learning-an-introduction.svg?branch=master)](https://travis-ci.org/aoboturov/reinforcement-learning-an-introduction)

Python code for Sutton & Barto's book [*Reinforcement Learning: An Introduction (2nd Edition)*](http://incompleteideas.net/sutton/book/the-book-2nd.html)

# Contents
Expand Down
5 changes: 5 additions & 0 deletions chapter01/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter02/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter03/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter04/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter05/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter06/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter07/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter08/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter09/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter10/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter11/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions chapter12/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
5 changes: 5 additions & 0 deletions extra/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######################################################################
# Copyright (C) 2016 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
#######################################################################
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy
matplotlib
six
seaborn
57 changes: 57 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

import setuptools
from setuptools import setup
from setuptools.command.test import test as TestCommand

NAME = 'reinforcement-learning-an-introduction'
VERSION = '0.1.0'
DESCRIPTION = 'Python code for Sutton & Barto\'s book'
LICENSE = ''
URL = 'https://github.com/ShangtongZhang/reinforcement-learning-an-introduction'
AUTHOR = 'Shangtong Zhang'
EMAIL = 'zhangshangtong.cpp@gmail.com'
KEYWORDS = ''


class PyTest(TestCommand):
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []

def run_tests(self):
sys.exit(0)


def setup_package():
# Assemble additional setup commands
cmdclass = {}
cmdclass['test'] = PyTest

setup(
name=NAME,
version=VERSION,
url=URL,
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,
keywords=KEYWORDS,
long_description='',
classifiers=[],
test_suite='',
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
install_requires=['numpy', 'matplotlib', 'six', 'seaborn'],
setup_requires=[],
cmdclass=cmdclass,
tests_require=['pytest'],
command_options={},
entry_points={},
)


if __name__ == '__main__':
setup_package()
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tox]
envlist = py27,py34,py35
deps = -rrequirements.txt

[travis]
python =
2.7: py27
3.4: py34
3.5: py35

[testenv]
commands = python -m compileall -q chapter01 chapter02 chapter03 chapter04 chapter05 chapter06 chapter07 chapter08 chapter09 chapter10 chapter11 chapter12 extra utils

0 comments on commit baaa8a3

Please sign in to comment.