Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Richie-Halford committed Jul 28, 2020
1 parent cf84e31 commit 288e8aa
Show file tree
Hide file tree
Showing 16 changed files with 329 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# setuptools_scm generated version file
cloud_bids_layout/version.py

# example dataset
examples/ds000030

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
38 changes: 38 additions & 0 deletions docs/_static/collapsible.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.toggle {
border: 1px solid black;
border-radius: 3px;
}

.toggle .header {
display: block;
clear: both;
padding: 5px;
background: gainsboro;
}

.toggle .content {
padding: 5px;
}

.toggle .header.open {
border-bottom: 1px solid black;
background: silver;
}

.toggle .header:hover {
background: silver;
}

.toggle .header:after {
content: "show ▼";
font-size: 75%;
text-align: right;
float:right;
}

.toggle .header.open:after {
content: "hide ▲";
font-size: 75%;
text-align: right;
float:right;
}
Binary file added docs/_static/git.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ fullname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

.. raw:: html

<div style='clear:both'></div>
9 changes: 9 additions & 0 deletions docs/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ fullname | escape | underline }}

.. currentmodule:: {{ module }}

.. autofunction:: {{ objname }}

.. raw:: html

<div style='clear:both'></div>
6 changes: 6 additions & 0 deletions docs/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ fullname | escape | underline }}

.. automodule:: {{ fullname }}

Members
=======
17 changes: 17 additions & 0 deletions docs/_templates/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "!page.html" %}

{% set css_files = css_files + ["_static/collapsible.css"] %}

{% block footer %}
{{ super() }}
<script type="text/javascript">
$(document).ready(function() {
$(".toggle > *").hide();
$(".toggle .header").show();
$(".toggle .header").click(function() {
$(this).parent().children().not(".header").toggle(400);
$(this).parent().children(".header").toggleClass("open");
})
});
</script>
{% endblock %}
8 changes: 6 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
sys.path.append(os.path.abspath("sphinxext"))

extensions = [
"nbsphinx",
"sphinx.ext.mathjax",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
Expand All @@ -55,9 +57,11 @@
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"alabaster",
"github",
]

nbsphinx_allow_errors = False
nbsphinx_execute = "never"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand All @@ -77,7 +81,7 @@
# path where to save gallery generated examples
"gallery_dirs": "auto_examples",
# To auto-generate example sections in the API
"doc_module": ("cloudknot",),
"doc_module": ("cloud_bids_layout",),
# Auto-generated mini-galleries go here
"backreferences_dir": "gen_api",
}
Expand Down
16 changes: 16 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _faq-label:

Frequently Asked Questions
==========================

.. container:: toggle

.. container:: header

What is the airspeed velocity of an unladen swallow?

.. container:: content

Roughly 11 meters per second, or 24 miles per hour. See
`Style.org -- Estimating the Airspeed Velocity of an Unladen Swallow <http://style.org/unladenswallow/>`_.

47 changes: 13 additions & 34 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,12 @@ Welcome to Cloud-BIDS-Layout's documentation!
Cloud-BIDS-Layout is a lightweight wrapper for pybids' BIDS.Layout that
can grab BIDS studies from Amazon S3.

Usage
-----

.. code-block:: python
# Insert an amazing Cloud-BIDS-Layout example here
pass
Motivation
----------

The [Brain Imaging Data Structure (BIDS)](https://bids.neuroimaging.io/)
The `Brain Imaging Data Structure (BIDS) <https://bids.neuroimaging.io/>`_
is an intuitive, accessible, and community-driven data specification for
neuroimaging data. [Pybids](https://bids-standard.github.io/pybids/)
neuroimaging data. `Pybids <https://bids-standard.github.io/pybids/>`_
is an exceptionally written Python library that makes it easy for
researchers to query, summarize, and manipulate BIDS-compliant data.
However, it's workhorse `BIDSLayout` class doesn't index remote datasets
Expand All @@ -29,35 +21,20 @@ supported but support for Google Cloud Storage and others is coming
soon. Cloud-BIDS-Layout creates a lightweight semblance of the remote
dataset, just enough to pass to pybids' `BIDSLayout` for indexing.
The user can then use pybids' familiar `.get()` method to select a
subset of the study that they wish to download to the host. See the
[documentation](https://nrdg.github.io/cloud_bids_layout) for more
details.

`cottoncandy <https://doi.org/10.5281/zenodo.1034342>`_ for interacting with
numpy array data on `Amazon S3 <https://aws.amazon.com/s3/>`_. Or see `pywren
<http://pywren.io/>`_, which enables users to run their existing python code
on `AWS Lambda <https://aws.amazon.com/lambda/>`_, providing convenient
distributed execution for jobs that fall within the AWS Lambda limits (maximum
300 seconds of execution time, 1.5 GB of RAM, 512 MB of local storage, and no
root access). For jobs that require more, we introduce cloudknot to execute
existing python code on AWS Batch.

Cloudknot takes as input a python function, Dockerizes it for use in an Amazon
ECS instance, and creates all the necessary AWS Batch constituent resources to
submit jobs. You can then use cloudknot to submit and view jobs for a range
of inputs.

Installation and getting started
--------------------------------
subset of the study that they wish to download to the host. See
Usage_ for more details.

Installation and usage
----------------------

To install Cloud-BIDS-Layout and see usage details
visit :ref:`installation-label` and :ref:`usage-label`.
visit :ref:`installation-label` and Usage_.

Documentation and API
---------------------

Most users will only need to interact with the `CloudBIDSLayout` class. See
:ref:`usage-label` for more details.
Usage_ for more details.

Bugs and issues
---------------
Expand Down Expand Up @@ -98,10 +75,12 @@ support from the `Washington Research Foundation <http://www.wrfseattle.org/>`_
:hidden:

installation <installation>
usage <usage>
usage <usage.ipynb>
faq <faq>
examples <https://github.com/nrdg/cloud_bids_layout/tree/master/examples>
modules
contributing <https://github.com/nrdg/cloud_bids_layout/blob/master/CONTRIBUTING.md>
code <https://github.com/nrdg/cloud_bids_layout>
bugs <https://github.com/nrdg/cloud_bids_layout/issues>
history <history>

.. _Usage: usage.ipynb
1 change: 1 addition & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.. highlight:: shell
.. _installation-label:

============
Installation
Expand Down
1 change: 1 addition & 0 deletions docs/usage.ipynb
7 changes: 0 additions & 7 deletions docs/usage.rst

This file was deleted.

Loading

0 comments on commit 288e8aa

Please sign in to comment.