diff --git a/README.md b/README.md index d41c9e5..508e880 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# cyclops-query +cyclops-query -------------------------------------------------------------------------------- [![PyPI](https://img.shields.io/pypi/v/cycquery)](https://pypi.org/project/cycquery) diff --git a/docs/source/_static/cyclical_diagram.jpg b/docs/source/_static/cyclical_diagram.jpg deleted file mode 100644 index 8aa0d5f..0000000 Binary files a/docs/source/_static/cyclical_diagram.jpg and /dev/null differ diff --git a/docs/source/_static/cyclops_arch.png b/docs/source/_static/cyclops_arch.png deleted file mode 100644 index 2e5bd1a..0000000 Binary files a/docs/source/_static/cyclops_arch.png and /dev/null differ diff --git a/docs/source/intro.rst b/docs/source/intro.rst index a71062b..c0cb38f 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -1,5 +1,5 @@ -# cyclops-query -=============== +cyclops-query +============= |PyPI| |code checks| |integration tests| |docs| |codecov| |license| diff --git a/docs/source/theme/breadcrumbs.html b/docs/source/theme/breadcrumbs.html new file mode 100644 index 0000000..ebc48da --- /dev/null +++ b/docs/source/theme/breadcrumbs.html @@ -0,0 +1,41 @@ +{% extends "sphinx_rtd_theme/breadcrumbs.html" %} + +{% block breadcrumbs %} + {# Separators between
  • s are added by CSS. #} + + {# + Breadcrumbs always start with home icon pointing to the main Nextstrain doc + project. + + If the current project is the main project, then we don't hardcode the URL + so the currently viewed version/language is preserved (although we don't + use these features currently). + #} + {% if theme_subproject %} +
  • Home
  • +
  • {{ project }}
  • + {% else %} +
  • Home
  • + {% endif %} + + {# + The parents of the current page, according to the project toctree, without + the root doc (master_doc). + #} + {% for doc in parents %} +
  • {{ doc.title }}
  • + {% endfor %} + + {# + Don't include the current page's title (like the template we're extending + does) because the page title is immediately below these breadcrumbs anyway. + + This also follows common UX recommendations for breadcrumbs, e.g. the UK's + Government Digital Service (gov.uk) breadcrumbs component guidelines¹ says: + + The breadcrumb should start with your ‘home’ page and end with the + parent section of the current page. + + ¹ https://design-system.service.gov.uk/components/breadcrumbs/ + #} +{% endblock %} diff --git a/docs/source/theme/footer.html b/docs/source/theme/footer.html new file mode 100644 index 0000000..45769db --- /dev/null +++ b/docs/source/theme/footer.html @@ -0,0 +1,63 @@ +{% extends "sphinx_rtd_theme/footer.html" %} + +{# + The design of the rtd-theme footer template includes content which is + not inside a block (and thus not trivial to overwrite). By setting + the following variabels we essentially hide footer content which we want + to include ourselves. P.S. These variables are only used in the footer. +#} +{% set show_sphinx = false %} +{% set show_copyright = false %} + +{# + Footer design largely replicates https://github.com/nextstrain/nextstrain.org/raw/0c3222d/static-site/src/components/Footer/index.jsx +#} + +{# + The following could probably be written in a much nicer, less verbose style. + This is/was my first time using Jinja, so i'm falling back onto basic HTML. + If you can improve this, please do & show me the way! james oct 2020 +#} +{% block extrafooter %} + + + + + +
    + + + + + + + +{% endblock %} diff --git a/docs/source/theme/layout.html b/docs/source/theme/layout.html new file mode 100644 index 0000000..7c5f773 --- /dev/null +++ b/docs/source/theme/layout.html @@ -0,0 +1,117 @@ +{# + Use our theme's favicon by default. We do it here layout.html since the + "html_favicon" configuration option unfortunately can't be set by the theme + directly. The "favicon" variable is used by Sphinx versions < 4; + "favicon_url" by newer versions. +#} +{% if not favicon %} +{% set favicon = 'favicon.ico' %} +{% set favicon_url = pathto('_static/' + favicon, 1) %} +{% endif %} + +{% extends "sphinx_rtd_theme/layout.html" %} +{# + Most of this block is copied from sphinx_rtd_theme version 0.5.0-1-gaa71fd6. + + Tweaks were necessary for our theme to provide a default logo, since Sphinx's + html_logo configuration option (template variable "logo" below) can't be set + by the theme *and also* can't refer to a theme-provided file when set by the + doc project's conf.py. + + We also adjust the rendering of the project name to remove the home icon. +#} +{% block sidebartitle %} + +{% set logo = logo if logo else 'cyclops_logo-dark.png' if theme_logo else '' %} + +{% if logo %} + + + +{% endif %} + +{% if theme_subproject %} +
    + + {{ project }} + + + {# + NOTE the version only works on RTD (not locally) as the variables `nav_version` and + `current_version` don't seem to be set on a local build. + #} + {%- set nav_version = version %} + {% if READTHEDOCS and current_version %} + {%- set nav_version = current_version %} + {% endif %} + {% if nav_version %} +
    + {% if nav_version == "stable" %} + stable version + {% if version and version != "stable" %} + ({{ version }}) + {% endif %} + {% elif nav_version == "latest" %} + development version + {% if commit %} + ({{ commit }}) + {% endif %} + {% else %} + version {{ nav_version }} + {% endif %} +
    + {% endif %} + +
    + +{% endif %} + +{% include "searchbox.html" %} + +{% endblock %} + + +{% block extrabody %} + + +{% endblock %} diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index 9eb574e..aa91cba 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -1,6 +1,16 @@ Tutorials ========= +The cyclops-query tool allows you to query EHR databases. It is a Python API that +that communicates with postgresql databases. It is a wrapper around the +SQLAlchemy ORM and uses SQLAlchemy query objects and functions to build +queries. + + .. toctree:: - tutorials_query + tutorials/mimiciii.ipynb + tutorials/mimiciv.ipynb + tutorials/eicu.ipynb + tutorials/omop.ipynb + tutorials/gemini.ipynb diff --git a/docs/source/tutorials_query.rst b/docs/source/tutorials_query.rst deleted file mode 100644 index 6f37e08..0000000 --- a/docs/source/tutorials_query.rst +++ /dev/null @@ -1,16 +0,0 @@ -query API -========= - -The query API allows you to query EHR databases. It is a Python API that -that communicates with postgresql databases. It is a wrapper around the -SQLAlchemy ORM and uses SQLAlchemy query objects and functions to build -queries. - - -.. toctree:: - - tutorials/mimiciii.ipynb - tutorials/mimiciv.ipynb - tutorials/eicu.ipynb - tutorials/omop.ipynb - tutorials/gemini.ipynb