!pip install -U Sphinx
Collecting Sphinx
Downloading https://files.pythonhosted.org/packages/a7/5b/50ccdef4683ffac13fdf4cc80fa9ced84849fd4eca444dec22e6c937a1e2/Sphinx-4.0.1-py3-none-any.whl (2.9MB)
|████████████████████████████████| 2.9MB 5.0MB/s
Requirement already satisfied, skipping upgrade: Pygments>=2.0 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (2.6.1)
Collecting sphinxcontrib-htmlhelp
Downloading https://files.pythonhosted.org/packages/36/62/8222554b29b3acde8420128d6d3999c5904d40922ef4b6ccb370e2be7421/sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl (96kB)
|████████████████████████████████| 102kB 6.1MB/s
Requirement already satisfied, skipping upgrade: docutils<0.18,>=0.14 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (0.17.1)
Collecting sphinxcontrib-applehelp
Downloading https://files.pythonhosted.org/packages/dc/47/86022665a9433d89a66f5911b558ddff69861766807ba685de2e324bd6ed/sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121kB)
|████████████████████████████████| 122kB 30.3MB/s
Requirement already satisfied, skipping upgrade: Jinja2<3.0,>=2.3 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (2.11.3)
Requirement already satisfied, skipping upgrade: alabaster<0.8,>=0.7 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (0.7.12)
Requirement already satisfied, skipping upgrade: imagesize in /usr/local/lib/python3.7/dist-packages (from Sphinx) (1.2.0)
Requirement already satisfied, skipping upgrade: sphinxcontrib-serializinghtml in /usr/local/lib/python3.7/dist-packages (from Sphinx) (1.1.4)
Collecting sphinxcontrib-qthelp
Downloading https://files.pythonhosted.org/packages/2b/14/05f9206cf4e9cfca1afb5fd224c7cd434dcc3a433d6d9e4e0264d29c6cdb/sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90kB)
|████████████████████████████████| 92kB 7.5MB/s
Collecting sphinxcontrib-jsmath
Downloading https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: snowballstemmer>=1.1 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (2.1.0)
Collecting sphinxcontrib-devhelp
Downloading https://files.pythonhosted.org/packages/c5/09/5de5ed43a521387f18bdf5f5af31d099605c992fd25372b2b9b825ce48ee/sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84kB)
|████████████████████████████████| 92kB 7.9MB/s
Requirement already satisfied, skipping upgrade: requests>=2.5.0 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (2.23.0)
Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/python3.7/dist-packages (from Sphinx) (56.1.0)
Requirement already satisfied, skipping upgrade: packaging in /usr/local/lib/python3.7/dist-packages (from Sphinx) (20.9)
Requirement already satisfied, skipping upgrade: babel>=1.3 in /usr/local/lib/python3.7/dist-packages (from Sphinx) (2.9.1)
Collecting MarkupSafe<2.0
Downloading https://files.pythonhosted.org/packages/c2/37/2e4def8ce3739a258998215df907f5815ecd1af71e62147f5eea2d12d4e8/MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx) (2020.12.5)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx) (1.24.3)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.5.0->Sphinx) (2.10)
Requirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->Sphinx) (2.4.7)
Requirement already satisfied, skipping upgrade: pytz>=2015.7 in /usr/local/lib/python3.7/dist-packages (from babel>=1.3->Sphinx) (2018.9)
ERROR: datascience 0.10.6 has requirement folium==0.2.1, but you'll have folium 0.8.3 which is incompatible.
Installing collected packages: sphinxcontrib-htmlhelp, sphinxcontrib-applehelp, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-devhelp, MarkupSafe, Sphinx
Found existing installation: MarkupSafe 2.0.0
Uninstalling MarkupSafe-2.0.0:
Successfully uninstalled MarkupSafe-2.0.0
Found existing installation: Sphinx 1.8.5
Uninstalling Sphinx-1.8.5:
Successfully uninstalled Sphinx-1.8.5
Successfully installed MarkupSafe-1.1.1 Sphinx-4.0.1 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-1.0.3 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3
# import sys
# sys.path.append("/content/drive/MyDrive")
# import mykeys
# project_name = "4CED0278"
# path = "/content/" + project_name
# !mkdir "{path}"
# %cd "{path}"
# import sys
# sys.path.append(path)
# !git config --global user.email "<email>"
# !git config --global user.name "sparsh-ai"
# !git init
# !git remote add origin2 https://"{mykeys.git_token}":x-oauth-basic@github.com/sparsh-ai/"{project_name}".git
# !git pull origin2 master
!sphinx-quickstart
Welcome to the Sphinx 3.4.3 quickstart utility. Please enter values for the following settings (just press Enter to accept a default value, if one is given in brackets). Selected root path: . You have two options for placing the build directory for Sphinx output. Either, you use a directory "_build" within the root path, or you separate "source" and "build" directories within the root path. > Separate source and build directories (y/n) [n]: The project name will occur in several places in the built documentation. > Project name: MovieLens Recommender System > Author name(s): Sparsh Agarwal > Project release []: 1.0.0 If the documents are to be written in a language other than English, you can select a language here by its language code. Sphinx will then translate text that it generates into that language. For a list of supported codes, see https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language. > Project language [en]: Creating file /content/4CED0278/conf.py. Creating file /content/4CED0278/index.rst. Creating file /content/4CED0278/Makefile. Creating file /content/4CED0278/make.bat. Finished: An initial directory structure has been created. You should now populate your master file /content/4CED0278/index.rst and create other documentation source files. Use the Makefile to build the docs, like so: make builder where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
!pip install -q sphinx-rtd-theme
%%writefile conf.py
project = 'MovieLens Recommender System'
copyright = '2021, Sparsh Agarwal'
author = 'Sparsh Agarwal'
release = '1.0.0'
extensions = ['sphinx.ext.autodoc',
'nbsphinx',
'sphinx.ext.mathjax',
'sphinx.ext.githubpages',
'IPython.sphinxext.ipython_console_highlighting',
'rst2pdf.pdfbuilder'
]
source_suffix = ['.rst', '.ipynb']
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
master_doc = 'index'
pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Sparsh Agarwal'),]
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
Overwriting conf.py
!pip install sphinx
!pip install nbconvert
!pip install pandoc
!pip install latex
!pip install nbsphinx
!cp "/content/drive/MyDrive/Colab Notebooks/tutorial_temp.ipynb" .
# !mkdir documentation
!rm -r ./documentation
%%writefile index.rst
.. MovieLens Recommender System documentation master file, created by
sphinx-quickstart on Tue Jan 12 17:48:52 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to MovieLens Recommender System's documentation!
========================================================
.. toctree::
:maxdepth: 2
:caption: Contents:
tutorial_temp
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Overwriting index.rst
%%writefile readthedocs.yml
# python version
python:
version: 3.8
method: pip
install:
- requirements: requirements.txt
# build a PDF
formats:
- none
sphinx:
configuration: conf.py
Overwriting readthedocs.yml
%%writefile requirements.txt
python==3.8
pandoc
nbformat
jupyter_client
ipython
nbconvert
sphinx>=1.5.1
ipykernel
sphinx_rtd_theme
nbsphinx
Writing requirements.txt
# !sphinx-build -b pdf . build/pdf
# !make html
# !git checkout -b sphinx
!git add .
!git commit -m 'commit'
!git push origin2 sphinx
[sphinx 7f43bd2] commit 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 requirements.txt Counting objects: 4, done. Delta compression using up to 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 499 bytes | 499.00 KiB/s, done. Total 4 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), completed with 1 local object. To https://github.com/sparsh-ai/4CED0278.git cd134e5..7f43bd2 sphinx -> sphinx
!pip install -q rst2pdf
|████████████████████████████████| 174kB 5.8MB/s |████████████████████████████████| 2.6MB 12.6MB/s