File tree Expand file tree Collapse file tree 6 files changed +86
-9
lines changed Expand file tree Collapse file tree 6 files changed +86
-9
lines changed Original file line number Diff line number Diff line change 88 - secure : " TWGKPL4FGtWjCQ427QrSffaQBSCPy1QzPdhtYKAW9AlDo/agdp9RyZRQr8WTlyZ5AOG18X8MDdi0EcpFnyfDNd4thCLyZOntxwltlVV2yNNvnird3XRKUV1F2DD42L64wna04M2KYxpCKhEQ84gEnCH1DGD4g1NnR6fYuEYNSTU="
99 - secure : " NvgIWe14pv4SJ5BQhw6J0zIpCTFH4fVpzr9pRzM2tD8yf/3cspX3uyXTt4owiqtjoQ3aQGNnhWtVlmSwlgJrwu7KUaE9IPtlsENYDniAj2oJgejjx02d367pHtMB/9e3+4b2fWUsFNJgWw0ordiIT0p1lzHRdQ9ut4l/Yn/lkJs="
1010 - secure : " D3ASNRu32pV79lv/Nl0dBm2ldZiTgbb6boOrN0SzIKsQU3yBwedpqX6EI6KjpVg17lGhhhFXGzL2Gz1qjU3/+m6aMvekxHgpfuc0AlEFCEqenWPxIdDDrUkdfJoCvfQQPd5oxChfHgqaEDLjuqHy1ZEgnJ2/L/6dwZ4fUt62hMk="
11+ # pandas-docs-bot GH
12+ - secure : " PCzUFR8CHmw9lH84p4ygnojdF7Z8U5h7YfY0RyT+5K/aiQ1ZTU3ZkDTPI0/rR5FVMxsEEKEQKMcc5fvqW0PeD7Q2wRmluloKgT9w4EVEJ1ppKf7lITPcvZR2QgVOvjv4AfDtibLHFNiaSjzoqyJVjM4igjOu8WTlF3JfZcmOQjQ="
1113
1214matrix :
1315 include :
@@ -30,6 +32,7 @@ matrix:
3032 - FULL_DEPS=true
3133 - CLIPBOARD_GUI=gtk2
3234 - JOB_NAME : " 27_nslow" # ScatterCI Build name, 20 chars max
35+ - DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
3336 - python : 3.2
3437 env :
3538 - NOSE_ARGS="not slow"
@@ -75,6 +78,7 @@ before_script:
7578script :
7679 - echo "script"
7780 - ci/script.sh
81+ - if [ -f /tmp/doc.log ]; then cat /tmp/doc.log; fi
7882
7983after_script :
8084 - ci/print_versions.py
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ cd " $TRAVIS_BUILD_DIR "
5+
6+ git show --pretty=" format:" --name-only HEAD~5.. --first-parent | grep -P " rst|txt|doc"
7+
8+ if [ " $? " != " 0" ]; then
9+ echo " Skipping doc build, none were modified"
10+ # nope, skip docs build
11+ exit 0
12+ fi
13+
14+
15+ if [ x" $DOC_BUILD " != x" " ]; then
16+ # we're running network tests, let's build the docs in the meantim
17+ echo " Will build docs"
18+ pip install sphinx==1.1.3 ipython==1.1.0
19+
20+ mv " $TRAVIS_BUILD_DIR " /doc /tmp
21+ cd /tmp/doc
22+
23+ rm /tmp/doc/source/api.rst # no R
24+ rm /tmp/doc/source/r_interface.rst # no R
25+
26+ echo # ############################## > /tmp/doc.log
27+ echo # Log file for the doc build # > /tmp/doc.log
28+ echo # ############################## > /tmp/doc.log
29+ echo " " > /tmp/doc.log
30+ echo -e " y\n" | ./make.py --no-api 2>&1
31+
32+ cd /tmp/doc/build/html
33+ git config --global user.email " pandas-docs-bot@localhost.foo"
34+ git config --global user.name " pandas-docs-bot"
35+
36+ git init
37+ touch README
38+ git add README
39+ git commit -m " Initial commit" --allow-empty
40+ git branch gh-pages
41+ git checkout gh-pages
42+ touch .nojekyll
43+ git add --all .
44+ git commit -m " Version" --allow-empty
45+ git remote add origin https://$GH_TOKEN @github.com/pandas-docs/pandas-docs-travis
46+ git push origin gh-pages -f
47+ fi
48+
49+ exit 0
Original file line number Diff line number Diff line change @@ -98,5 +98,6 @@ export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
9898which gcc
9999ccache -z
100100time pip install $( find dist | grep gz | head -n 1)
101-
101+ # restore cython
102+ time pip install $PIP_ARGS $( cat ci/requirements-${wheel_box} .txt | grep -i cython)
102103true
Original file line number Diff line number Diff line change 99import base64
1010from hashlib import sha1
1111from iron_cache import *
12+ import traceback as tb
1213
1314key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
1415 os .environ .get ('JOB_NAME' ,'unk' ))
16+ print (key )
17+
1518if sys .version_info [0 ] > 2 :
16- key = sha1 ( bytes (key ,encoding = 'utf8' )). hexdigest ()[: 8 ] + '.'
17- else :
18- key = sha1 (key ).hexdigest ()[:8 ]+ '.'
19+ key = bytes (key ,encoding = 'utf8' )
20+
21+ key = sha1 (key ).hexdigest ()[:8 ]+ '.'
1922
2023b = b''
2124cache = IronCache ()
2225for i in range (20 ):
2326 print ("getting %s" % key + str (i ))
2427 try :
2528 item = cache .get (cache = "travis" , key = key + str (i ))
26- b += bytes (base64 .b64decode (item .value ))
27- except :
29+ v = item .value
30+ if sys .version_info [0 ] > 2 :
31+ v = bytes (v ,encoding = 'utf8' )
32+ b += bytes (base64 .b64decode (v ))
33+ except Exception as e :
34+ try :
35+ print (tb .format_exc (e ))
36+ except :
37+ print ("exception during exception, oh my" )
2838 break
2939
3040with open (os .path .join (os .environ .get ('HOME' ,'' ),"ccache.7z" ),'wb' ) as f :
Original file line number Diff line number Diff line change 1212
1313key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
1414 os .environ .get ('JOB_NAME' ,'unk' ))
15+
16+ key = 'KEY.%s.%s' % (os .environ .get ('TRAVIS_REPO_SLUG' ,'unk' ),
17+ os .environ .get ('JOB_NAME' ,'unk' ))
18+ print (key )
19+
1520if sys .version_info [0 ] > 2 :
16- key = sha1 ( bytes (key ,encoding = 'utf8' )). hexdigest ()[: 8 ] + '.'
17- else :
18- key = sha1 (key ).hexdigest ()[:8 ]+ '.'
21+ key = bytes (key ,encoding = 'utf8' )
22+
23+ key = sha1 (key ).hexdigest ()[:8 ]+ '.'
1924
2025os .chdir (os .environ .get ('HOME' ))
2126
Original file line number Diff line number Diff line change @@ -12,5 +12,13 @@ if [ -n "$LOCALE_OVERRIDE" ]; then
1212 cd " $curdir "
1313fi
1414
15+ # conditionally build and upload docs to GH/pandas-docs/pandas-docs/travis
16+ " $TRAVIS_BUILD_DIR " /ci/build_docs.sh 2>&1 > /tmp/doc.log &
17+ # doc build log will be shown after tests
18+
1519echo nosetests -v --exe -w /tmp -A " $NOSE_ARGS " pandas --with-xunit --xunit-file=/tmp/nosetests.xml
1620nosetests -v --exe -w /tmp -A " $NOSE_ARGS " pandas --with-xunit --xunit-file=/tmp/nosetests.xml
21+
22+
23+ # wait until subprocesses finish (build_docs.sh)
24+ wait
You can’t perform that action at this time.
0 commit comments