Skip to content

Commit b931bf6

Browse files
TF Build Matrix added for Travis (#644)
* TF Build Matrix added for Travis * Update .travis.yml * Update .travis.yml * Update .travis.yml * Travis only deploying with TF 1.8.0 * Not Compatible TF Versions Removed * Changelog Configuration Updated * Changelog Update * TF Versions older than 1.6.0 raises an exception * Readme Badge Updated with supported TF & Python Versions * Travis Building only the branch `master` and all PR
1 parent ad71b7f commit b931bf6

File tree

5 files changed

+83
-14
lines changed

5 files changed

+83
-14
lines changed

.github/changelog.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
filename: CHANGELOG.md
22
include:
3-
- /^tensorlayer\//
4-
- /^tests\//
3+
# Folders
4+
- /^.github\//
55
- /^docs\//
66
- /^example\//
7+
- /^tensorlayer\//
8+
- /^tests\//
9+
10+
# Python Package Files
11+
- setup.py
12+
- setup.cfg
13+
- pytest.ini
14+
15+
# Dependency Files
16+
- requirements.txt
17+
- requirements_db.txt
18+
- requirements_dev.txt
19+
- requirements_tf_cpu.txt
20+
- requirements_tf_gpu.txt
21+
22+
# Configuration Files
23+
- .travis.yml
24+
- .readthedocs.yml
25+
- .pyup.yml
26+
27+
# Docker Files
28+
- Dockerfile
29+
- Dockerfile.gpu
30+
- .dockerignore
31+
32+
# Text Files
33+
- README.md
34+
- LICENSE.rst
35+
- CHANGELOG.md
36+
- CONTRIBUTING.md
37+
38+
# Github Files
39+
- .gitignore

.travis.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
# https://docs.travis-ci.com/user/languages/python/
22
language: python
33

4+
branches:
5+
only:
6+
- master
7+
48
python:
59
- "2.7"
610
- "3.5"
711
- "3.6"
812

913
env:
14+
15+
# Backward Compatibility in insured for release less than 1 year old.
16+
# https://pypi.org/project/tensorflow/#history
17+
matrix:
18+
- _TF_VERSION=1.8.0 # Remove on Apr 28, 2019
19+
- _TF_VERSION=1.7.1 # Remove on May 08, 2019
20+
- _TF_VERSION=1.7.0 # Remove on Mar 29, 2019
21+
- _TF_VERSION=1.6.0 # Remove on Mar 01, 2019
22+
# - _TF_VERSION=1.5.1 # Remove on Mar 20, 2019
23+
# - _TF_VERSION=1.5.0 # Remove on Jan 26, 2019
24+
# - _TF_VERSION=1.4.1 # Remove on Dec 08, 2018
25+
# - _TF_VERSION=1.4.0 # Remove on Nov 01, 2018
26+
# - _TF_VERSION=1.3.0 # Remove on Aug 16, 2018
27+
# - _TF_VERSION=1.2.1 # Remove on Jun 30, 2018
28+
1029
global:
1130

1231
- PYPI_USER='jonathandekhtiar'
@@ -22,12 +41,13 @@ env:
2241
- secure: "kMxg4WfTwhnYMD7WjYk71vgw7XlShPpANauKzfTL6oawDrpQRkBUai4uQwiL3kXVBuVv9rKKKZxxnyAm05iB5wGasPDhlFA1DPF0IbyU3pwQKlw2Xo5qtHdgxBnbms6JJ9z5b+hHCVg+LXYYeUw5qG01Osg5Ue6j1g2juQQHCod00FNuo3fe8ah/Y10Rem6CigH8ofosCrTvN2w1GaetJwVehRYf8JkPC6vQ+Yk8IIjHn2CaVJALbhuchVblxwH0NXXRen915BVBwWRQtsrvEVMXKu7A8sMHmvPz1u3rhXQfjpF2KeVOfy1ZnyiHcLE2HgAPuAGh4kxZAAA8ovmcaCbv8m64bm72BrQApSbt6OEtR9L1UeUwdEgi54FH1XFOHQ9dA6CpiGCyk3wAJZqO0/PkNYVLfb4gPLvnvBRwYBaPgUPvVNhidFu/oODENZmcf8g9ChtuC1GT70EYlVwhgDGqUY7/USZCEvIPe81UToqtIKgcgA+Is51XindumJVMiqTsjgdqeC/wZcw+y37TAjIvvXbtYxeqIKv9zh1JuZppqUhnf+OhI+HHFaY4iu7lQTs3C0WmoLskZAp9srwRtifnVFFkdYzngmPaSjWyko2qiS0cTdFJQB/ljqmnJdksacbv5OOa0Q4qZef/hW774nVx105FlkAIk70D2b5l2pA="
2342

2443
install:
25-
- pip install -e .[tf_cpu,db,dev,test,doc]
44+
- pip install tensorflow==$_TF_VERSION
45+
- pip install -e .[db,dev,test,doc]
2646

2747
script:
2848
# units test
2949
# https://docs.pytest.org/en/latest/
30-
- pytest
50+
- pytest
3151

3252

3353
before_deploy:
@@ -41,12 +61,13 @@ deploy:
4161

4262
# Documentation: https://docs.travis-ci.com/user/deployment/pypi/
4363
- provider: pypi
44-
user: "$PYPI_USER"
45-
password: "$PYPI_PASSWORD"
64+
user: '$PYPI_USER'
65+
password: '$PYPI_PASSWORD'
4666
skip_cleanup: true
4767
on:
4868
tags: true
4969
python: '3.6'
70+
condition: '$_TF_VERSION = 1.8.0'
5071

5172
# Documentation: https://docs.travis-ci.com/user/deployment/releases/
5273
- provider: releases
@@ -55,7 +76,8 @@ deploy:
5576
- tensorlayer.egg-info/PKG-INFO
5677
file_glob: true
5778
skip_cleanup: true
58-
api_key: "$GITHUB_PERSONAL_TOKEN"
79+
api_key: '$GITHUB_PERSONAL_TOKEN'
5980
on:
6081
tags: true
6182
python: '3.6'
83+
condition: '$_TF_VERSION = 1.8.0'

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ To release a new version, please update the changelog as followed:
7979
- `Array_Op_Alphas_Test` and `Array_Op_Alphas_Like_Test` added to test `tensorlayer/array_ops.py` file (by @DEKHTIARJonathan in #580)
8080
- `test_optimizer_amsgrad.py` added to test `AMSGrad` optimizer (by @DEKHTIARJonathan in #636)
8181
- CI Tool:
82-
- https://github.com/apps/stale/ added to clean stale issues (by @DEKHTIARJonathan in #573)
83-
- Changelog Probot Configuration added (by @DEKHTIARJonathan in #637)
82+
- [Stale Probot](https://github.com/probot/stale) added to clean stale issues (by @DEKHTIARJonathan in #573)
83+
- [Changelog Probot](https://github.com/mikz/probot-changelog) Configuration added (by @DEKHTIARJonathan in #637)
84+
- Travis Builds now handling a matrix of TF Version from TF==1.6.0 to TF==1.8.0 (by @DEKHTIARJonathan in #644)
8485
- Layer:
8586
- ElementwiseLambdaLayer added to use custom function to connect multiple layer inputs (by @One-sixth in #579)
8687
- Documentation:
@@ -94,6 +95,8 @@ To release a new version, please update the changelog as followed:
9495
- Tensorflow CPU & GPU dependencies moved to separated requirement files in order to allow PyUP.io to parse them (by @DEKHTIARJonathan in #573)
9596
- The document of LambdaLayer for linking it with ElementwiseLambdaLayer (by @zsdonghao in #587)
9697
- RTD links point to stable documentation instead of latest used for development (by @DEKHTIARJonathan in #633)
98+
- TF Version older than 1.6.0 are officially unsupported and raises an exception (by @DEKHTIARJonathan in #644)
99+
- Readme Badges Updated with Support Python and Tensorflow Versions (by @DEKHTIARJonathan in #644)
97100

98101
### Deprecated
99102

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
</div>
1414
</a>
1515

16-
[![PyPI version](https://badge.fury.io/py/tensorlayer.svg)](https://badge.fury.io/py/tensorlayer)
17-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca2a29ddcf7445588beff50bee5406d9)](https://app.codacy.com/app/tensorlayer/tensorlayer?utm_source=github.com&utm_medium=referral&utm_content=tensorlayer/tensorlayer&utm_campaign=badger)
18-
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tensorlayer/Lobby#?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
1916
[![Build Status](https://travis-ci.org/tensorlayer/tensorlayer.svg?branch=master)](https://travis-ci.org/tensorlayer/tensorlayer)
20-
[![Documentation Status](https://readthedocs.org/projects/tensorlayer/badge/?version=stable)](https://tensorlayer.readthedocs.io/)
17+
[![PyPI version](https://badge.fury.io/py/tensorlayer.svg)](https://pypi.org/project/tensorlayer/)
18+
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/tensorlayer/tensorlayer/latest.svg)](https://github.com/tensorlayer/tensorlayer/compare/1.8.5...master)
19+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tensorlayer.svg)](https://pypi.org/project/tensorlayer/)
20+
[![Supported TF Version](https://img.shields.io/badge/tensorflow-1.6.0+-blue.svg)](https://github.com/tensorflow/tensorflow/releases)
21+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca2a29ddcf7445588beff50bee5406d9)](https://app.codacy.com/app/tensorlayer/tensorlayer)
2122
[![Docker Pulls](https://img.shields.io/docker/pulls/tensorlayer/tensorlayer.svg?maxAge=604800)](https://hub.docker.com/r/tensorlayer/tensorlayer/)
23+
24+
[![Documentation Status](https://readthedocs.org/projects/tensorlayer/badge/?version=stable)](https://tensorlayer.readthedocs.io/)
2225
[![PyUP Updates](https://pyup.io/repos/github/tensorlayer/tensorlayer/shield.svg)](https://pyup.io/repos/github/tensorlayer/tensorlayer/)
23-
[![Python 3](https://pyup.io/repos/github/tensorlayer/tensorlayer/python-3-shield.svg)](https://pyup.io/repos/github/tensorlayer/tensorlayer/)
26+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tensorlayer/Lobby)
2427

2528
TensorLayer is a deep learning and reinforcement learning library on top of [TensorFlow](https://www.tensorflow.org). It provides rich neural layers and utility functions to help researchers and engineers build real-world AI applications. TensorLayer is awarded the 2017 Best Open Source Software by the prestigious [ACM Multimedia Society](http://www.acmmm.org/2017/mm-2017-awardees/).
2629

tensorlayer/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
try:
77
import tensorflow
88

9+
if tensorflow.__version__ < "1.6.0":
10+
raise RuntimeError(
11+
"TensorLayer does not support Tensorflow version older than 1.6.0.\n"
12+
"Please update Tensorflow with:\n"
13+
" - `pip install --upgrade tensorflow`\n"
14+
" - `pip install --upgrade tensorflow-gpu`"
15+
)
16+
917
from . import activation
1018
from . import array_ops
1119
from . import cost

0 commit comments

Comments
 (0)