Skip to content

Commit

Permalink
Use sphinx instead of gitbook
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Oct 8, 2019
1 parent 5bf72d9 commit 57772bd
Show file tree
Hide file tree
Showing 73 changed files with 1,207 additions and 617 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ _book
node_modules
book.pdf
*~
build
32 changes: 10 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
language: node_js
node_js:
- "node"
language: python
python:
- "3.7"
cache: false
addons:
apt:
packages:
- calibre
- calibre-bin
dist: xenial
services:
- xvfb
before_install:
- npm install gitbook-cli -g

install:
- gitbook install
- npm install svgexport -g
# Using xvfb to Run Tests That Require a GUI
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
before_script:
- "export DISPLAY=:99.0"
- sleep 3 # give xvfb some time to start
- pip install sphinx sphinx-rtd-theme

script:
- gitbook pdf
- cp book.pdf starterkit-lessons.pdf
- gitbook build
- make html
- make linkcheck

# With instructions from http://www.steveklabnik.com/automatically_update_github_pages_with_travis_example/
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash deploy.sh

env:
global:
- secure: u2cXfS9DzeKaSRqV2X12aNzLtCdk/DIvV6BbEbqwmOFjRcUfDXTty+tU9Huz9gS1QchlNYO6rQDPi/t4XkaMrX2BI+PY0ehKRM9LsUm/KmVNqjXQdeoynu2apPQ9HR0M2HKF9d/a1PHRiEXSV7UeUUbPUrvjsy4Cxz9XZB5FM43XDxW+IAhOYhMqdirknYcPS/NsHb21PRkVED8nwgRZuX7igiB2X/i797ngq9fmxQg2jBGQHQLaSqBgO9LIjIP1EshuoyZA3z1YBsCgRtEv4xds7jJJs84/bO21N0t40wU27yI1tu8P4hR17dDGwo9mJo2z7pOG1Qdt0vxajUw+YHwGWkjtY7AliHIYJ9Xdwqe8b5kUBpzg3yHmoV8gXQV7WMHxv7za44hmlfrpry0GwEtNNUjRvbrymOh/FwfQaONpzi/b0kZnydxehe81KsUhqK1d/HVWcCDbf6iVO5sDRfddeQQPdRhf2xFbBCMdEtrMQqaf/eNmobVKDNB0wnsN1cYxa/8U5IQnNdwry8k7uQ+mQsRJXF1qXtzu4EKoCdFe3HHbWsZyBBwiD7HWVpeatJj9JpvTfIxgpmtW0Ll40A7CVvrdoqz+pI3u8aH8IzOzewq2a/oCNwNL2x6jSL19BeOp31jh8Ow9TwmOcpB6FF7TxqLCAY04Iwz02cTygr0=
6 changes: 3 additions & 3 deletions CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ As contributors and maintainers of this project, we pledge to respect all people

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
Examples of unacceptable behaviour by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/).
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.0.0, available at [https://contributor-covenant.org/version/1/0/0/](https://www.contributor-covenant.org/version/1/0/0/).
50 changes: 28 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,65 @@
# Contributing

[starterkit-lessons][repo] is an open source project,
and we welcome contributions of all kinds:
[starterkit-lessons][repo] is an open source project, and we welcome contributions of all kinds:

* New lessons;
* Fixes to existing material;
* Bug reports; and
* Reviews of proposed changes.

By contributing,
you are agreeing that we may redistribute your work under
[these licenses][license].
You also agree to abide by our
[contributor code of conduct][conduct].
By contributing, you are agreeing that we may redistribute your work under [these licenses][license].
You also agree to abide by our [contributor code of conduct][conduct].

## Getting Started

1. We use the [fork and pull][gh-fork-pull] model to manage changes. More information
about [forking a repository][gh-fork] and [making a Pull Request][gh-pull].
1. We use the [fork and pull][gh-fork-pull] model to manage changes.
More information about [forking a repository][gh-fork] and [making a Pull Request][gh-pull].

2. To build the lessons please install the [dependencies](#DEPENDENCIES).

2. For our lessons,
you should branch from and submit pull requests against the `master` branch.
2. For our lessons, you should branch from and submit pull requests against the `master` branch.

3. When editing lesson pages, you need only commit changes to the Markdown source files.

4. If you're looking for things to work on,
please see [the list of issues for this repository][issues].
4. If you're looking for things to work on, please see [the list of issues for this repository][issues].
Comments on issues and reviews of pull requests are equally welcome.

## Dependencies

To build the lessons locally, install the following:

1. [Gitbook](https://github.com/GitbookIO/gitbook/blob/master/docs/setup.md)
1. [sphinx](http://www.sphinx-doc.org/en/master/usage/installation.html)
2. [sphinx-rtd-theme](https://sphinx-rtd-theme.readthedocs.io/en/stable/)

Install the Gitbook plugins:
Then build the pages:

```shell
$ gitbook install
$ make html
$ make linkcheck
```

Then (from the starterkit-lessons directory) build the pages and start a web server to host them:
and start a web server to host them:

```shell
$ gitbook serve
$ cd build
$ python -m http.server 8000
```
You can see your local version by using a web-browser to navigate to `http://localhost:4000` or wherever it says it's serving the book.
You can see your local version by using a web-browser to navigate to `http://localhost:8000` or wherever it says it's serving the book.

[conduct]: CONDUCT.md
[repo]: https://github.com/lhcb/starterkit-lessons
[issues]: https://github.com/lhcb/starterkit-lessons/issues
[license]: LICENSE.md
[pro-git-chapter]: http://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project
[gh-fork]: https://help.github.com/articles/fork-a-repo/
[gh-pull]: https://help.github.com/articles/using-pull-requests/
[gh-fork-pull]: https://help.github.com/articles/using-pull-requests/#fork--pull
[gh-fork]: https://help.github.com/en/articles/fork-a-repo
[gh-pull]: https://help.github.com/en/articles/about-pull-requests
[gh-fork-pull]: https://reflectoring.io/github-fork-and-pull/


```eval_rst
.. toctree::
:hidden:
CONDUCT.md
LICENSE.md
```
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ SOFTWARE.

[cc-by-human]: https://creativecommons.org/licenses/by/4.0/
[cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode
[mit-license]: http://opensource.org/licenses/mit-license.html
[osi]: http://opensource.org
[mit-license]: https://opensource.org/licenses/mit-license.html
[osi]: https://opensource.org
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?= -W
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# The LHCb Starterkit lessons [![Build Status](https://travis-ci.org/lhcb/starterkit-lessons.svg?branch=master)](https://travis-ci.org/lhcb/starterkit-lessons)
# The LHCb Starterkit lessons [![Build Status](https://api.travis-ci.org/lhcb/starterkit-lessons.svg?branch=master)](https://travis-ci.org/lhcb/starterkit-lessons)

These are the lessons taught during the [LHCb Starterkit][starterkit].
If you'd like to join the next workshop, visit [the website][starterkit] to find out when that will how and how to sign up.

If you'd just like to learn about how to use the LHCb software, [read on](first-analysis-steps)!
If you'd just like to learn about how to use the LHCb software, [read on](first-analysis-steps/README)!

[starterkit]: https://lhcb.github.io/starterkit
[first-analysis-steps]: https://lhcb.github.io/starterkit-lessons/first-analysis-steps/


```eval_rst
.. toctree::
:maxdepth: 3
:includehidden:
:caption: Contents:
first-analysis-steps/README.md
second-analysis-steps/README.md
self-guided-lessons/README.md
CONTRIBUTING.md
```
71 changes: 0 additions & 71 deletions SUMMARY.md

This file was deleted.

Loading

0 comments on commit 57772bd

Please sign in to comment.