Skip to content

Commit ade9acf

Browse files
authored
Merge pull request #372 from betatim/add-docs-to-ci
Fix warnings in the documentation build and add to CI
2 parents d2f7ebd + e3ceed2 commit ade9acf

File tree

5 files changed

+34
-22
lines changed

5 files changed

+34
-22
lines changed

.travis.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ install:
1515
script:
1616
# cd into tests so CWD being repo2docker does not hide
1717
# possible issues with MANIFEST.in
18-
- if [ ${REPO_TYPE} == "r" ]; then cd tests && travis_wait pytest --cov repo2docker
19-
-v ${REPO_TYPE}; else cd tests && travis_retry pytest --cov repo2docker -v ${REPO_TYPE};
20-
fi
18+
- pushd tests;
19+
if [ ${REPO_TYPE} == "r" ]; then
20+
travis_wait pytest --cov repo2docker -v ${REPO_TYPE};
21+
else
22+
travis_retry pytest --cov repo2docker -v ${REPO_TYPE};
23+
fi;
24+
popd;
25+
- pip install -r docs/doc-requirements.txt
26+
- pushd docs;
27+
make html;
28+
popd;
2129
after_success:
2230
- pip install codecov
2331
- codecov

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
5+
SPHINXOPTS = -W
66
SPHINXBUILD = python3 -msphinx
77
SPHINXPROJ = repo2docker
88
SOURCEDIR = source

docs/source/deploy.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
.. _usage:
1+
.. _deploy:
22

33
Using ``repo2docker`` as part of your Continuous Integration
44
============================================================
55

6-
We've created for you the `continuous-build <https://www.github.com/binder-examples/continuous-build/>`_
7-
repository so that you can push a `Docker <https://docs.docker.com/>`_ container
6+
We've created for you the `continuous-build <https://www.github.com/binder-examples/continuous-build/>`_
7+
repository so that you can push a `Docker <https://docs.docker.com/>`_ container
88
to `Docker Hub <https://hub.docker.com/>`_ directly from a Github repository
99
that has a Jupyter notebook. Here are instructions to do this.
1010

@@ -25,7 +25,7 @@ to pull from Docker Hub.
2525
Step 1. Clone the Repository
2626
............................
2727
First, fork the `continuous-build <https://www.github.com/binder-examples/continuous-build/>`_ Github
28-
repository to your account, and clone the branch.
28+
repository to your account, and clone the branch.
2929

3030
git clone https://www.github.com/<username>/continuous-build
3131
# or
@@ -35,17 +35,17 @@ repository to your account, and clone the branch.
3535
Step 2. Choose your Configuration
3636
.................................
3737

38-
The hidden folder `.circleci/config.yml` has instructions for `CircleCI <https://circleci.com/dashboard/>`_
38+
The hidden folder `.circleci/config.yml` has instructions for `CircleCI <https://circleci.com/dashboard/>`_
3939
to automatically discover and build your repo2docker jupyter notebook container.
40-
The default template provided in the repository in this folder will do the most basic steps,
40+
The default template provided in the repository in this folder will do the most basic steps,
4141
including:
4242

4343
1. clone of the repository with the notebook that you specify
4444
2. build
4545
3. push to Docker Hub
4646

4747
This repository aims to provide templates for your use.
48-
If you have a request for a new template, please
48+
If you have a request for a new template, please
4949
`let us know <https://www.github.com/binder-examples/continuous-build/issues/>`_.
5050
We will add templates as they are requested to do additional tasks like test containers, run
5151
nbconvert, etc.
@@ -57,7 +57,7 @@ creating a new folder called "myrepo" and then copying the entire folder there.
5757
mkdir -p myrepo
5858
cp -R continuous-build/.circleci myrepo/
5959

60-
You would then logically create a Github repository in the "myrepo" folder,
60+
You would then logically create a Github repository in the "myrepo" folder,
6161
add the circleci configuration folder, and continue on to the next steps.
6262

6363
cd myrepo
@@ -69,7 +69,7 @@ Step 3. Docker Hub
6969
..................
7070
Go to `Docker Hub <https://hub.docker.com/>`_, log in, and click the big blue
7171
button that says "create repository" (not an automated build). Choose an organization
72-
and name that you like (in the traditional format ``<ORG>/<NAME>``), and
72+
and name that you like (in the traditional format ``<ORG>/<NAME>``), and
7373
remember it! We will be adding it, along with your
7474
Docker credentials, to be encrypted CircleCI environment variables.
7575

@@ -78,12 +78,12 @@ Step 4. Connect to CircleCI
7878
...........................
7979
If you navigate to the main `app page <https://circleci.com/dashboard/>`_ you
8080
should be able to click "Add Projects" and then select your repository. If you don't
81-
see it on the list, then select a different organization in the top left. Once
81+
see it on the list, then select a different organization in the top left. Once
8282
you find the repository, you can click the button to "Start Building" adn accept
8383
the defaults.
8484

8585
Before you push or trigger a build, let's set up the following environment variables.
86-
Also in the project interface on CirleCi, click the gears icon next to the project
86+
Also in the project interface on CirleCi, click the gears icon next to the project
8787
name to get to your project settings. Under settings, click on the "Environment
8888
Variables" tab. In this section, you want to define the following:
8989

@@ -92,7 +92,7 @@ Variables" tab. In this section, you want to define the following:
9292
3. ``DOCKER_USER`` and ``DOCKER_PASS`` should be your credentials (to allowing pushing)
9393
4. ``REPO_NAME`` should be the full Github url (or other) of the repository with the notebook. This doesn't have to coincide with the repository you are using to do the build (e.g., "myrepo" in our example).
9494

95-
If you don't define the ``CONTAINER_NAME`` it will default to be the repository where it is
95+
If you don't define the ``CONTAINER_NAME`` it will default to be the repository where it is
9696
building from, which you should only do if the Docker Hub repository is named equivalently.
9797
If you don't define either of the variables from step 3. for the Docker credentials, your
9898
image will build but not be pushed to Docker Hub. Finally, if you don't define the ``REPO_NAME``
@@ -120,7 +120,7 @@ You should then be able to pull your new container, and run it! Here is an examp
120120

121121
docker pull <ORG>/<NAME>
122122
docker run -it --name repo2docker -p 8888:8888 <ORG>/<NAME> jupyter notebook --ip 0.0.0.0
123-
123+
124124

125125
For a pre-built working example, try the following:
126126

docs/source/install.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ Bash on Windows) provides additional information about Windows and docker.
5757

5858
.. _using Windows and the WSL: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
5959

60-
.. _jupyterhub:
60+
.. _jupyterhub_ready:
6161

6262
JupyterHub-ready images
6363
-----------------------
6464

65-
`JupyterHub <https://jupyterhub.readthedocs.io/en/stable/>`_ allows multiple
65+
JupyterHub_ allows multiple
6666
users to collaborate on a shared Jupyter server. ``repo2docker`` can build
6767
Docker images that can be shared within a JupyterHub deployment. For example,
6868
`mybinder.org <https://mybinder.org>`_ uses JupyterHub and ``repo2docker``
6969
to allow anyone to build a Docker image of a git repository online and
7070
share an executable version of the repository with a URL to the built image.
7171

72-
To build `JupyterHub <https://github.com/jupyterhub/jupyterhub>`_-ready
72+
To build JupyterHub_-ready
7373
Docker images with ``repo2docker``, the version of your JupterHub deployment
7474
must be included in the ``environment.yml`` or ``requiements.txt`` of the
7575
git repositories you build.
@@ -79,3 +79,5 @@ command to run ``jupyterhub-singleuser`` by adding this line in your
7979
configuration file::
8080

8181
c.DockerSpawner.cmd = ['jupyterhub-singleuser']
82+
83+
.. _JupyterHub: https://github.com/jupyterhub/jupyterhub

docs/source/usage.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repo2docker is called with this command::
2121
where ``<URL-or-path to repo>`` is a URL or path to the source repository.
2222

2323
For example, use the following to build an image of Peter Norvig's
24-
`Pytudes <https://github.com/norvig/pytudes/>`_::
24+
Pytudes_::
2525

2626
jupyter-repo2docker https://github.com/norvig/pytudes
2727

@@ -47,12 +47,14 @@ Python 3.6 unless you include the version of Python in your
4747
Python 2.7, 3.5, and 3.6. In the case of this repo, a Python version is not
4848
specified in their configuation files and Python 3.6 is installed.
4949

50-
`Pytudes <https://github.com/norvig/pytudes>`_
50+
Pytudes_
5151
uses a `requirements.txt file <https://github.com/norvig/pytudes/blob/master/requirements.txt>`_
5252
to specify its Python environment. ``repo2docker`` uses ``pip`` to install
5353
dependencies listed in the ``requirement.txt`` in the image. To learn more about
5454
configuration files in ``repo2docker`` visit :ref:`config-files`.
5555

56+
.. _Pytudes: https://github.com/norvig/pytudes
57+
5658
When the image is built, a message will be output to your terminal::
5759

5860
Copy/paste this URL into your browser when you connect for the first time,

0 commit comments

Comments
 (0)