Skip to content

Commit

Permalink
Merge pull request #8 from domvwt/develop
Browse files Browse the repository at this point in the history
Final fixes to docs and examples
  • Loading branch information
domvwt authored Apr 7, 2021
2 parents bb15fa4 + dbea059 commit 40ff900
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 72 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ esparto
[![image](https://img.shields.io/pypi/v/esparto.svg)](https://pypi.python.org/pypi/esparto)
[![image](https://img.shields.io/travis/domvwt/esparto.svg)](https://travis-ci.org/domvwt/esparto)
[![codecov](https://codecov.io/gh/domvwt/esparto/branch/main/graph/badge.svg?token=35J8NZCUYC)](https://codecov.io/gh/domvwt/esparto)
[![Documentation Status](https://readthedocs.org/projects/esparto/badge/?version=latest)](https://esparto.readthedocs.io/en/latest/?badge=latest)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=domvwt_esparto&metric=alert_status)](https://sonarcloud.io/dashboard?id=domvwt_esparto)

A simple toolkit for creating accessible and shareable HTML documents.

A simple toolkit for creating accessible and shareable HTML documents.

Full documentation available at [domvwt.github.io/esparto/](https://domvwt.github.io/esparto/).

### Features
* Lightweight API
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/01-getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ my_page.save("esparto-quick.html")

The rendered HTML document:

<img src='/images/esparto-quickstart-screenshot.png' style='border: 1px dotted lightgrey; width: 80%; height: 80%'>
<img src='../esparto-quickstart-screenshot.png' style='border: 1px dotted lightgrey; width: 80%; height: 80%'>

<br>

Expand All @@ -53,7 +53,7 @@ html = my_page.save("esparto-quick-image.html")

Esparto determines that the string points to a valid image and loads the file:

<img src='/images/esparto-image-screenshot.png' height=70% style='border: 1px dotted lightgrey; width: 80%; height: 80%'>
<img src='../esparto-image-screenshot.png' height=70% style='border: 1px dotted lightgrey; width: 80%; height: 80%'>

<br>

Expand Down
2 changes: 1 addition & 1 deletion docs/04-about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Release Notes
=============

0.1.0 (2021-04-04)
0.1.0 (2021-04-07)
------------------

- First public release.
Expand Down
42 changes: 21 additions & 21 deletions docs/examples/iris.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
},
"outputs": [],
"source": [
"!pip install -Uqq esparto pandas matplotlib seaborn"
"# Environment setup\n",
"import os\n",
"!pip install -Uqq esparto\n",
"if os.environ.get(\"BINDER_SERVICE_HOST\"):\n",
" !pip install -Uqq pandas matplotlib seaborn"
]
},
{
Expand All @@ -41,9 +45,6 @@
},
"outputs": [],
"source": [
"from pathlib import Path\n",
"from subprocess import run\n",
"\n",
"import esparto as es\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
Expand All @@ -56,7 +57,7 @@
"id": "oOOwzOnkJcPI"
},
"source": [
"Before we start let's instatiate a Page object; we're not going to use this immediately but we'll need it later!"
"Before we start let's instantiate a Page object; we're not going to use this immediately but we'll need it later!"
]
},
{
Expand Down Expand Up @@ -195,7 +196,7 @@
{
"data": {
"text/plain": [
"<esparto._content.Markdown at 0x7f986a73deb0>"
"<esparto._content.Markdown at 0x7f4c71281d60>"
]
},
"execution_count": 5,
Expand Down Expand Up @@ -271,7 +272,7 @@
{
"data": {
"text/plain": [
"<esparto._content.Markdown at 0x7f986a75b0a0>"
"<esparto._content.Markdown at 0x7f4bef3f91c0>"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -371,7 +372,7 @@
{
"data": {
"text/plain": [
"<esparto._content.Image at 0x7f986a7618b0>"
"<esparto._content.Image at 0x7f4bef401460>"
]
},
"execution_count": 8,
Expand All @@ -394,7 +395,7 @@
"Now that we have some content ready for our introduction section, we can define the structure and check that it renders nicely.\n",
"\n",
"\n",
"See that the first row contains our intro text and iris virginica picture. The licenses and attribution have been added to a second row beneath these."
"Notice that the first row contains our intro text and iris virginica picture. The licenses and attribution have been added to a second row beneath these."
]
},
{
Expand Down Expand Up @@ -517,7 +518,7 @@
"id": "TRaAmkG1JcPT"
},
"source": [
"We have given a title to the section that helps identify it when looking at the document structure."
"Adding a title helps identify the item when looking at the document structure."
]
},
{
Expand Down Expand Up @@ -876,7 +877,7 @@
{
"data": {
"text/plain": [
"<esparto._content.DataFramePd at 0x7f98ce0467c0>"
"<esparto._content.DataFramePd at 0x7f4bef401c10>"
]
},
"execution_count": 13,
Expand Down Expand Up @@ -1251,7 +1252,7 @@
{
"data": {
"text/plain": [
"<esparto._content.FigureMpl at 0x7f98cdba2370>"
"<esparto._content.FigureMpl at 0x7f4c58cf2850>"
]
},
"execution_count": 20,
Expand Down Expand Up @@ -1861,13 +1862,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"import os\n",
"Click the link below to view the page."
]
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
Expand All @@ -1877,22 +1877,22 @@
},
"outputs": [],
"source": [
"# Ignore this!\n",
"msg = \"Page link:\"\n",
"if 'google.colab' in str(get_ipython()):\n",
" from google.colab.output import eval_js\n",
" from IPython.display import display, Markdown\n",
" page_link = f\"{eval_js('google.colab.kernel.proxyPort(8000)')}{page_name}\"\n",
" print(msg, page_link)\n",
" es.Markdown(f\"[{page_link}]({page_link})\").display()\n",
" print(\"(Interrupt the kernel to stop the http server process when you're done)\")\n",
" !python -m http.server 8000 > /dev/null 2>&1\n",
"elif os.environ[\"BINDER_SERVICE_HOST\"]:\n",
"elif os.environ.get(\"BINDER_SERVICE_HOST\"):\n",
" import socket\n",
" hash_id = socket.gethostname()[-8:]\n",
" page_link = f\"https://hub-binder.mybinder.ovh/user/domvwt-esparto-{hash_id}/view/docs/examples/iris-report.html\"\n",
" print(msg, page_link)\n",
" es.Markdown(f\"[{page_link}]({page_link})\").display()\n",
"else:\n",
" page_link = \"./iris-report-html\"\n",
" print(msg, pagelink)"
" page_link = \"./iris-report.html\"\n",
" es.Markdown(f\"[{page_link}]({page_link})\").display()"
]
},
{
Expand Down Expand Up @@ -1931,4 +1931,4 @@
},
"nbformat": 4,
"nbformat_minor": 1
}
}
Binary file removed docs/images/esparto-image-screenshot.png
Binary file not shown.
Binary file removed docs/images/esparto-quickstart-screenshot.png
Binary file not shown.
45 changes: 0 additions & 45 deletions esparto-doc.html

This file was deleted.

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ theme:
features:
- 'navigation.tabs'

repo_url: 'https://github.com/domvwt/esparto'
repo_url: 'https://github.com/domvwt/esparto/'

markdown_extensions:
- admonition
Expand Down

0 comments on commit 40ff900

Please sign in to comment.