Slide 1

Slide 1 text

Continuous integration, Documentation and Travis CI The Docathon Team, Matthias Bussonnier March 6, 2017

Slide 2

Slide 2 text

ME Carreau Mbussonn [email protected] Physicist Bipophysics Software (Terribheu Freignch Akheucent)

Slide 3

Slide 3 text

Travis CI

Slide 4

Slide 4 text

What is Travis-CI • CI stand for “Continuous Integration” • Can run unit-test in isolation and complain if test fail • But Travis can run almost arbitrary code ... let’s use it for documentation

Slide 5

Slide 5 text

Why for Documentation ? • Documentation is never complete, and evolve with your project • Your project is (likely) already setup for Travis • One less thing to think about, or configure, keep credential.

Slide 6

Slide 6 text

.travis.yml

Slide 7

Slide 7 text

How ? GhPages • Commits lands on the repository. • Travis builds and checks the docs. • If branch is “master”, push to GitHub Pages (for example) If Master branch

Slide 8

Slide 8 text

The tricky part • Give Credential to Travis to push back to GitHub • Well, obviously not in plaintext. • If you committed once as plaintext: Change it. • Use “$ travis encrypt” to encrypt ssh keys. • Don’t “echo ENCRYPTED_VARIABLE”

Slide 9

Slide 9 text

More details • Hands on tomorrow at The Hacker Within: • http://www.thehackerwithin.org/berkeley/ • Every* Tuesday from 4pm to 4:30pm, Here

Slide 10

Slide 10 text

Let’s use Magic • You likely don’t want to know how ssh/GitHub Api... etc. So let’s use DocTr (DOCumentation, TRavis) • Sets up credential for you • Tells you what to copy-past in travis.yml • Find the documentation folder • Push on GitHub

Slide 11

Slide 11 text

https://github.com/drdoctr/doctr • $ pip install doctr • $ doctr configure • And follow instruction • Push a commit

Slide 12

Slide 12 text

Go to https://.github.io/project/docs/

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

( Quick the attendees are hungry ) Questions ?