Skip to content

Commit

Permalink
Merge pull request #106 from chrisjsewell/develop
Browse files Browse the repository at this point in the history
Release v0.10.9
  • Loading branch information
chrisjsewell committed Sep 4, 2019
2 parents 8f6627b + a4eee3f commit 28ff4b3
Show file tree
Hide file tree
Showing 16 changed files with 665 additions and 278 deletions.
76 changes: 76 additions & 0 deletions docs/source/dev_guide.rst
@@ -0,0 +1,76 @@
Developer Guide
+++++++++++++++

Installation
~~~~~~~~~~~~

To install the development version::

>> git clone https://github.com/chrisjsewell/ipypublish .
>> cd ipypublish

and either use the pre-written Conda development environment (recommended)::

>> conda env create -n ipub_testenv -f conda_dev_env.yaml python=3.6
>> conda activate ipub_testenv
>> pip install --no-deps -e .

or install all *via* pip::

>> pip install -e .[tests]

Testing
~~~~~~~

|Build Status| |Coverage Status|

The following will discover and run all unit test:

.. code:: shell
>> cd ipypublish
>> pytest -v
Coding Style Requirements
~~~~~~~~~~~~~~~~~~~~~~~~~

The code style is tested using `flake8 <http://flake8.pycqa.org>`__,
with the configuration set in ``.flake8``, and code should be formatted
with `yapf <https://github.com/google/yapf>`__ (configuration set in
``.style.yapf``).

Installing with ``ipypublish[tests]`` makes the
`pre-commit <https://pre-commit.com/>`__ package available, which will
ensure these tests are passed by reformatting the code and testing for
lint errors before submitting a commit. It can be setup by:

.. code:: shell
>> cd ipypublish
>> pre-commit install
Optionally you can run ``yapf`` and ``flake8`` separately:

.. code:: shell
>> yapf -i path/to/file # format file in-place
>> flake8
Editors like VS Code also have automatic code reformat utilities, which
can check and adhere to this standard.

Documentation
~~~~~~~~~~~~~

The documentation can be created locally by:

.. code:: shell
>> cd ipypublish/docs
>> make clean
>> make # or make debug
.. |Build Status| image:: https://travis-ci.org/chrisjsewell/ipypublish.svg?branch=master
:target: https://travis-ci.org/chrisjsewell/ipypublish
.. |Coverage Status| image:: https://coveralls.io/repos/github/chrisjsewell/ipypublish/badge.svg?branch=master
:target: https://coveralls.io/github/chrisjsewell/ipypublish?branch=master
39 changes: 28 additions & 11 deletions docs/source/index.rst
Expand Up @@ -13,10 +13,12 @@ and presentations, from Jupyter Notebooks.

.. attention::

IPyPublish has evolved!

IPyPublish is evolving!
Please see :ref:`releases` for all the exciting new feature.

Also see `pytest-notebook <https://pytest-notebook.readthedocs.io>`_,
for a new tool to test and regenerate notebooks.


IPyPublish: Features
====================
Expand Down Expand Up @@ -54,33 +56,48 @@ Badges
|Build Status| |Coverage Status| |PyPI| |Conda|

.. toctree::
:maxdepth: 2
:maxdepth: 1
:numbered:
:caption: Contents:
:caption: Using IPyPublish
:hidden:

getting_started
code_cells
markdown_cells
nb_conversion
metadata_tags
custom_export_config

.. toctree::
:maxdepth: 1
:caption: Sphinx Extensions
:hidden:

sphinx_extensions
sphinx_ext_notebook
sphinx_ext_bibgloss

.. toctree::
:maxdepth: 1
:caption: Additional Information
:hidden:

releases
examples
applications
dev_guide
additional_tools
acknowledgements
package_api
releases

.. toctree::
:maxdepth: 2
:caption: Included Files:
:maxdepth: 1
:caption: Validation Schemas
:hidden:

latex_ipypublish_all
export_schema
outline_schema
segment_example
metadata_doc_schema
metadata_cell_schema
export_schema


.. todo:: how to use with vs-code
Expand Down
2 changes: 2 additions & 0 deletions docs/source/latex_ipypublish_all.rst
@@ -1,3 +1,5 @@
:orphan:

.. _latex_ipypublish_all:

Example Export Configuration
Expand Down
16 changes: 9 additions & 7 deletions docs/source/markdown_cells.Rmd
Expand Up @@ -10,7 +10,7 @@ jupyter:
author: Chris Sewell
email: chrisj\_sewell@hotmail.com
logo: _static/logo_example.png
title: Example of Converted Jupyter Notebook
title: Example of Converted Jupyter Notebook
subtitle: Formatting Markdown Cells
tagline: Converted using IPyPublish ('latex\_ipypublish\_all.exec').
supervisors:
Expand All @@ -20,7 +20,7 @@ jupyter:
- Institution1
- Institution2
pandoc:
convert_raw: true
convert_raw: true
hide_raw: false
at_notation: true
use_numref: true
Expand Down Expand Up @@ -61,7 +61,7 @@ This filter extends the common markdown syntax to:
- Correctly translate pieces of documentation written in other formats
(such as using LaTeX commands like `\cite` or RST roles like `:cite:`)
- Handle labelling and referencing of figures, tables and equations, and
add additional formatting options.
add additional formatting options.

`ipubpandoc` is detached from the rest of the
notebook conversion process, and so can be used as a standalone process on any markdown content:
Expand All @@ -74,6 +74,8 @@ $ pandoc -f markdown -t html --filter ipubpandoc path/to/file.md

[The PDF representation of this notebook](_static/markdown_cells.pdf)

:ref:`pandoc_doc_metadata`, for the notebook document level metadata options.

.. _jupytext_rmarkdown:

## Converting Notebooks to RMarkdown
Expand Down Expand Up @@ -309,7 +311,7 @@ Glossary Terms: %@gtkey2, &@akey2, &@symbol2

.. note::

Citations in sphinx are provided by the excellent
Citations in sphinx are provided by the excellent
[sphinxcontrib-bibtex extension](https://sphinxcontrib-bibtex.readthedocs.io),
and glossary referencing is provided by the equally good :ref:`sphinx_ext_gls`

Expand Down Expand Up @@ -384,10 +386,10 @@ data-latex="cref" data-rst="numref" data-a="1">
<span class="citation" data-cites="label">
@label
</span></span>
xyz
xyz
<em><span class="citation" data-cites="label2">
@label2
</span></em>
</span></em>
<span class="attribute-Cite b">
<span class="citation" data-cites="label3">
@label3
Expand All @@ -396,4 +398,4 @@ xyz
```

Formatter filters, then look for these parent spans,
to provide identifiers, classes and attributes.
to provide identifiers, classes and attributes.
7 changes: 7 additions & 0 deletions docs/source/metadata_cell_schema.rst
@@ -0,0 +1,7 @@
.. _meta_celllevel_schema:

Cell/Output Level Metadata Schema
---------------------------------

.. literalinclude:: ../../ipypublish/schema/cell_metadata.schema.json
:language: JSON

0 comments on commit 28ff4b3

Please sign in to comment.