-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up the Travis.CI integration environment and packaging.
- Loading branch information
Showing
18 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 # | ||
####################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
numpy | ||
matplotlib | ||
six | ||
seaborn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |