Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjermiah committed Feb 25, 2024
1 parent f0f8824 commit 4a7e891
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 75 deletions.
63 changes: 0 additions & 63 deletions docs/_html_notebooks/test_setup.ipynb

This file was deleted.

20 changes: 20 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.sphinx-tabs-panel {
background: none;
border: none;
color:aliceblue;
}

.sphinx-tabs-tab{
color: #1D5C87;
/* font color */
background: none;

}



.sphinx-tabs-tab[aria-selected="false"]{
color: white;
/* font color */
background: none;
}
18 changes: 18 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import html
import os
import sys

Expand All @@ -22,9 +23,11 @@
extensions = [
"myst_nb",
"autoapi.extension",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx_tabs.tabs",
"sphinx_exec_code",
]
autoapi_dirs = ["../src/nbiatoolkit"]

Expand All @@ -33,11 +36,26 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "_html_notebooks"]


exec_code_working_dir = ".."
exec_code_source_folders = ["../src"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = "piccolo_theme"
html_theme = "sphinx_rtd_theme"

# # user starts in dark mode
# default_dark_mode = True

html_static_path = ["_static"]

# html_css_files = [
# "css/custom.css",
# ]
# def setup(app):
# app.add_css_file("css/custom.css")
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
markdowns/NBIA.md
markdowns/Installation.md
InitializeClient.rst
Tutorial.ipynb
tutorial_files/1_InitializeClient.rst
tutorial_files/2_ExploreCollections.rst
markdowns/CHANGELOG.md
markdowns/CONTRIBUTING.md
markdowns/CONDUCT.md
autoapi/index
```

<!-- Tutorial.ipynb -->
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ myst-nb
sphinx-autoapi
sphinx-rtd-theme
sphinx-tabs
sphinx_exec_code==0.12
piccolo_theme
sphinx-rtd-dark-mode
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ By default, the `NBIAClient` uses the guest account to access all collections in
If you have a user account that has been granted specific access to a collection, you can use your credentials to
initialize the client when performing a query.



.. tabs::

.. tab:: Python
Expand All @@ -19,12 +21,14 @@ initialize the client when performing a query.

.. tab:: Guest Account

.. code-block:: python
.. exec_code::

from nbiatoolkit import NBIAClient

client = NBIAClient()
client.getCollections(prefix='TCGA')
collections = client.getCollections(prefix='TCGA')

print(collections[0:5])

.. tab:: Your Account

Expand All @@ -33,7 +37,8 @@ initialize the client when performing a query.
from nbiatoolkit import NBIAClient
client = NBIAClient(username = "<USERNAME>", password = "<PASSWORD>")
client.getCollections(prefix='TCGA')
collections = client.getCollections(prefix='TCGA')
.. tab:: Command Line

Expand Down Expand Up @@ -64,12 +69,14 @@ This is especially useful when using the client in a script with a predefined sc

.. tab:: Python

.. code-block:: python
.. exec_code::

from nbiatoolkit import NBIAClient

with NBIAClient() as client:
client.getCollections(prefix='TCGA')
collections = client.getCollections(prefix='TCGA')

print(collections[0:5])

.. tab:: Command Line

Expand All @@ -88,15 +95,21 @@ If you would like to return the data as a pandas DataFrame, you can pass the

.. tab:: Python

.. code-block:: python
.. exec_code::

from nbiatoolkit import NBIAClient
from nbiatoolkit.utils import ReturnType

client = NBIAClient()
client.getCollections(prefix='TCGA', return_type='dataframe')
collections_df = client.getCollections(
prefix='TCGA', return_type='dataframe'
)
# equivalent to
client.getCollections(prefix='TCGA', return_type=ReturnType.DATAFRAME)
collections_df = client.getCollections(
prefix='TCGA', return_type=ReturnType.DATAFRAME
)

print(collections_df.head())

.. tab:: Command Line

Expand All @@ -110,12 +123,14 @@ Alternatively, you can set the return type for all methods by passing the `retur

.. tab:: Python

.. code-block:: python
.. exec_code::

from nbiatoolkit import NBIAClient

client = NBIAClient(return_type='dataframe')
client.getCollections(prefix='TCGA')
collections_df = client.getCollections(prefix='TCGA')

print(collections_df.head())

.. tab:: Command Line

Expand Down
9 changes: 9 additions & 0 deletions docs/tutorial_files/2_ExploreCollections.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Metadata Query Methods
----------------------


Collection Methods
^^^^^^^^^^^^^^^^^^

.. autoclass:: nbiatoolkit.NBIAClient
:members:

0 comments on commit 4a7e891

Please sign in to comment.