From 7ae493b3f3b146562b6836be6b0541cc591283ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Thu, 18 Jul 2019 11:40:41 +0200 Subject: [PATCH] Minor fix setup and docs --- docs/Quickstart.ipynb | 10 +++++++--- docs/conf.py | 5 ++--- setup.py | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/Quickstart.ipynb b/docs/Quickstart.ipynb index 1680aaf..9970f18 100644 --- a/docs/Quickstart.ipynb +++ b/docs/Quickstart.ipynb @@ -13,7 +13,10 @@ "* Annotating text with sentiment and emotion using interoperable services\n", "* Switching to different services (service interoperability)\n", "* Getting results in different formats (Turtle, XML, text...)\n", - "* Asking for specific emotion models (automatic model conversion)" + "* Asking for specific emotion models (automatic model conversion)\n", + "\n", + "The tutorial is originally published as an interactive [jupyter notebook](https://jupyter.org/) (`ipynb` file) that you can download and run locally.\n", + "The on-line documentation contains a **static** version of the notebook." ] }, { @@ -27,9 +30,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will use the demo server at http://senpy.gsi.upm.es abd the requests library.\n", + "We will use the demo server at http://senpy.gsi.upm.es and the requests library.\n", "\n", - "We will use a variable for our endpoint so you can try these examples on other instances:" + "We will use a variable for our endpoint.\n", + "To try these examples on other instances simply change the value of this variable and re-run the query:" ] }, { diff --git a/docs/conf.py b/docs/conf.py index 914ff4c..8ba6042 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -293,11 +293,10 @@ texinfo_documents = [ #texinfo_no_detailmenu = False nbsphinx_prolog = """ -.. note:: This page has been auto-generated from a Jupyter notebook using nbsphinx_. +.. note:: This is an `auto-generated `_ static view of a Jupyter notebook. - The original source is available at: https://github.com/gsi-upm/senpy/tree/master/docs//{{ env.doc2path(env.docname, base=None) }} + To run the code examples in your computer, you may download the original notebook from the repository: https://github.com/gsi-upm/senpy/tree/master/docs/{{ env.doc2path(env.docname, base=None) }} - .. _nbsphinx: https://nbsphinx.readthedocs.io/ ---- """ diff --git a/setup.py b/setup.py index f8f37da..9fd2c76 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,10 @@ limitations under the License. from setuptools import setup from os import path +import io try: - with open('senpy/VERSION') as f: + with io.open('senpy/VERSION') as f: __version__ = f.read().strip() assert __version__ except IOError: # pragma: no cover @@ -28,13 +29,13 @@ except IOError: # pragma: no cover def parse_requirements(filename): """ load requirements from a pip requirements file """ - with open(filename, 'r') as f: + with io.open(filename, 'r') as f: lineiter = list(line.strip() for line in f) return [line for line in lineiter if line and not line.startswith("#")] this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f: +with io.open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f: long_description = f.read()