Skip to content

Commit

Permalink
ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
benedekrozemberczki committed Dec 15, 2021
1 parent 3b6ef0a commit 72d3036
Show file tree
Hide file tree
Showing 11 changed files with 367 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SPHINXBUILD = sphinx-build
SPHINXPROJ = chemicalx
SOURCEDIR = source
BUILDDIR = build

.PHONY: help Makefile

%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)"
8 changes: 8 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>

<html>
<head>
<title>Redirect</title>
<meta http-equiv="refresh" content="0; url=https://chemicalx.readthedocs.io" />
</head>
</html>
11 changes: 11 additions & 0 deletions docs/requirements_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
tqdm
numpy
sphinx==4.0.2
sphinx_rtd_theme==0.5.2
sklearn
scipy
pandas
six
nbsphinx
nbsphinx_link
jupyter-sphinx
195 changes: 195 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
.wy-side-nav-search .wy-dropdown > a img.logo, .wy-side-nav-search > a img.logo {
}

.wy-side-nav-search {
background: rgb(243,244,247);
}

.wy-side-nav-search > div.version {
color: black;
}

.wy-nav-content-wrap {
background: inherit;
}

.wy-side-nav-search input[type="text"] {
border: none;
box-shadow: none;
background: white;
border-radius: 0;
font-size: 100%;
}

.wy-menu-vertical li.current a,
.wy-menu-vertical li.toctree-l1.current > a {
border: none;
}

.ethical-rtd > div.ethical-sidebar,
.ethical-rtd > div.ethical-footer {
display: none !important;
}

h1 {
text-transform: uppercase;
font-family: inherit;
font-weight: 200;
}

h2,
.rst-content .toctree-wrapper p.caption {
font-family: inherit;
font-weight: 200;
}

.rst-content a:visited {
color: #3091d1;
}

/* Begin code */
.rst-content pre.literal-block,
.rst-content div[class^="highlight"] {
border: none;
}

.rst-content pre.literal-block,
.rst-content div[class^="highlight"] pre,
.rst-content .linenodiv pre {
font-size: 80%;
}

.highlight {
background: #f6f8fa;
border-radius: 6px;
}

.highlight .kn,
.highlight .k {
color: #d73a49;
}

.highlight .nn {
color: inherit;
font-weight: inherit;
}

.highlight .nc {
color: #e36209;
font-weight: inherit;
}

.highlight .fm,
.highlight .nd,
.highlight .nf,
.highlight .nb {
color: #6f42c1;
}

.highlight .bp,
.highlight .n {
color: inherit;
}

.highlight .kc,
.highlight .s1,
.highlight .s2,
.highlight .mi,
.highlight .mf,
.highlight .bp,
.highlight .bn,
.highlight .ow {
color: #005cc5;
font-weight: inherit;
}

.highlight .c1 {
color: #6a737d;
}

.rst-content code.xref {
padding: .2em .4em;
background: rgba(27,31,35,.05);
border-radius: 6px;
border: none;
}
/* End code */

.rst-content dl:not(.docutils) dt,
.rst-content dl:not(.docutils) dl dt {
background: rgb(243,244,247);
}

.rst-content dl:not(.docutils) dt.field-odd {
text-transform: uppercase;
background: inherit;
border: none;
padding: 6px 0;
}

.rst-content dl:not(.docutils) .property:first-child .pre {
text-transform: uppercase;
font-style: normal;
}

em.sig-param span.n:first-child, em.sig-param span.n:nth-child(2) {
color: black;
font-style: normal;
}

em.sig-param span.n:nth-child(3),
em.sig-param span.n:nth-child(3) a {
color: inherit;
font-weight: normal;
font-style: normal;
}

em.sig-param span.default_value {
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;
font-style: normal;
font-size: 90%;
}

.sig-paren {
padding: 0 4px;
}

.wy-table-responsive table td,
.wy-table-responsive table th {
white-space: normal;
}

.wy-table-bordered-all,
.rst-content table.docutils {
border: none;
}

.wy-table-bordered-all td,
.rst-content table.docutils td {
border: none;
}

.wy-table-odd td,
.wy-table-striped tr:nth-child(2n-1) td,
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
background: rgb(243,244,247);
}

.wy-table td,
.rst-content table.docutils td,
.rst-content table.field-list td,
.wy-table th,
.rst-content table.docutils th,
.rst-content table.field-list th {
padding: 14px;
}

table.colwidths-given tr td p,
table.colwidths-given tr th p {
text-align: center;
}

table.colwidths-given tr td:first-child p,
table.colwidths-given tr th:first-child p {
text-align: left;
}
Binary file added docs/source/_static/img/chemicalx.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import datetime
import doctest
import os
import sys

import sphinx_rtd_theme

import chemicalx

sys.path.insert(0, os.path.abspath("../../"))

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"jupyter_sphinx",
]

source_suffix = ".rst"
master_doc = "index"

author = "Benedek Rozemberczki & Charles Tapley Hoyt & Benjamin Gyori"
project = "chemicalx"
copyright = "{}, {}".format(datetime.datetime.now().year, author)

# version = chemicalx.__version__
# release = chemicalx.__version__

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

doctest_default_flags = doctest.NORMALIZE_WHITESPACE
intersphinx_mapping = {"python": ("https://docs.python.org/", None)}

html_theme_options = {
"collapse_navigation": False,
"display_version": True,
"logo_only": True,
}

html_logo = "_static/img/chemicalx.jpg"
html_static_path = ["_static"]
html_context = {"css_files": ["_static/css/custom.css"]}
rst_context = {"chemicalx": chemicalx}

add_module_names = False


def setup(app):
def skip(app, what, name, obj, skip, options):
members = [
"__init__",
"__repr__",
"__weakref__",
"__dict__",
"__module__",
]
return True if name in members else skip

app.connect("autodoc-skip-member", skip)
24 changes: 24 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:github_url: https://github.com/AstraZeneca/chemicalx

ChemicalX Documentation
===============================



.. toctree::
:glob:
:maxdepth: 2
:caption: Package Reference

modules/root


.. toctree::
:glob:
:maxdepth: 2
:caption: Notes

notes/installation
notes/introduction
notes/resources

14 changes: 14 additions & 0 deletions docs/source/modules/root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Rexmex
==================

.. contents:: Contents
:local:


Score Cards
--------------------

.. automodule:: chemicalx.models
:members:
:undoc-members:

3 changes: 3 additions & 0 deletions docs/source/notes/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Installation
============

17 changes: 17 additions & 0 deletions docs/source/notes/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Introduction by example
=======================

Overview
=======================
--------------------------------------------------------------------------------

We shortly overview the fundamental concepts and features of **ChemicalX** through simple examples. These are the following:

.. contents::
:local:

Design philosophy
-----------------



21 changes: 21 additions & 0 deletions docs/source/notes/resources.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
External resources
==================

Models
--------------------

* Name Name, Name Name, Name Name: **Title* `Paper <>`_
* Name Name, Name Name, Name Name: **Title* `Paper <>`_
Datasets
--------------------

* Name Name, Name Name, Name Name: **Title* `Paper <>`_
* Name Name, Name Name, Name Name: **Title* `Paper <>`_

Related Software
--------------------

* Name Name, Name Name, Name Name: **Title* `Paper <>`_
* Name Name, Name Name, Name Name: **Title* `Paper <>`_

0 comments on commit 72d3036

Please sign in to comment.