Skip to content

Commit

Permalink
Merge pull request #1114 from mgeier/circleci
Browse files Browse the repository at this point in the history
Create docs on CircleCI
  • Loading branch information
MSeal authored Oct 16, 2019
2 parents fda8ba5 + 2070bdb commit ea2cc90
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 4 deletions.
93 changes: 93 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build_docs:
docker:
# https://github.com/dante-ev/docker-texlive
- image: danteev/texlive

working_directory: ~/checkout

environment:
MINICONDA_INSTALLER: https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
ACTIVATE: source /root/miniconda/bin/activate nbconvert_docs
PIP_INSTALL: python3 -m pip install --user --progress-bar off --upgrade

steps:
- checkout

- restore_cache:
keys:
- v1-miniconda-{{ .Branch }}-{{ checksum "docs/environment.yml" }}
- v1-miniconda-{{ .Branch }}-
- v1-miniconda-

- run:
name: Installing Miniconda
command: |
if [ ! -d /root/miniconda ]
then
wget $MINICONDA_INSTALLER -O miniconda-installer.sh
bash miniconda-installer.sh -b -p /root/miniconda
else
echo Miniconda is already installed
fi
- run:
name: Creating/Updating conda environment
command: |
/root/miniconda/bin/conda env update -f docs/environment.yml --prune
- save_cache:
key: v1-miniconda-{{ .Branch }}-{{ checksum "docs/environment.yml" }}
paths:
- /root/miniconda

- run:
name: Installing nbconvert
command: |
$ACTIVATE
$PIP_INSTALL .
- run:
name: Building HTML
command: |
$ACTIVATE
python3 setup.py build_sphinx -b html
- store_artifacts:
name: Uploading HTML files
path: build/sphinx/html
destination: html

- run:
name: Building LaTeX
command: |
$ACTIVATE
python3 setup.py build_sphinx -b latex
- run:
name: Building PDF
command: |
cd build/sphinx/latex
latexmk -pdf
- store_artifacts:
name: Uploading PDF file
path: build/sphinx/latex/nbconvert.pdf
destination: nbconvert.pdf

- run:
name: Checking for broken links
command: |
$ACTIVATE
python3 setup.py build_sphinx -b linkcheck
workflows:
version: 2
docs:
jobs:
- build_docs
5 changes: 3 additions & 2 deletions docs/source/external_exporters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ these be distributed as Python libraries.
Registering a custom exporter as an entry point
-----------------------------------------------

Additional exporters may be registered as named `entry_points`_.
Additional exporters may be registered as named entry_points_.
nbconvert uses the ``nbconvert.exporters`` entry point to find exporters
from any package you may have installed.

Expand Down Expand Up @@ -60,7 +60,8 @@ custom exporters can call the entry point name::

instead of having to specify the full import name of the custom exporter.

.. _entry_points: https://packaging.python.org/en/latest/distributing/#entry-points
.. _entry_points: https://packaging.python.org/guides/
creating-and-discovering-plugins/#using-package-metadata


Using a custom exporter without entrypoints
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Nbconvert is packaged for both pip and conda, so you can install it with::
# OR
conda install nbconvert

If you're new to Python, we recommend installing `Anaconda <https://www.continuum.io/downloads>`_,
If you're new to Python, we recommend installing `Anaconda <https://www.anaconda.com/distribution/>`_,
a Python distribution which includes nbconvert and the other Jupyter components.

.. important::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/nbconvert_library.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"@damianavila wrote the Nikola Plugin to [write blog post as Notebooks](http://www.damian.oquanta.info/posts/one-line-deployment-of-your-site-to-gh-pages.html) and is developing a js-extension to publish notebooks via one click from the web app."
"@damianavila wrote the Nikola Plugin to [write blog post as Notebooks](http://damianavila.github.io/blog/posts/one-line-deployment-of-your-site-to-gh-pages.html) and is developing a js-extension to publish notebooks via one click from the web app."
]
},
{
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ license_file = LICENSE
[check-manifest]
ignore =
nbconvert/resources/style.min.css
.circleci*

0 comments on commit ea2cc90

Please sign in to comment.