Skip to content

Commit

Permalink
doc: improve TOCs
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Oct 19, 2024
1 parent 0520257 commit 20839f5
Show file tree
Hide file tree
Showing 8 changed files with 591 additions and 39 deletions.
10 changes: 10 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
body {
--themecolor: #4f4f4f;
}

.wy-side-nav-search {
background-color: var(--themecolor);
}
.wy-nav-top {
background-color: var(--themecolor);
}
487 changes: 478 additions & 9 deletions docs/source/_static/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions docs/source/cli/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,84 @@
CLI Reference
=============

.. toctree::
:maxdepth: 1

Contents
--------

.. program:: momics
.. code-block:: shell
momics [OPTIONS] COMMAND [ARGS]...
.. list-table::
:widths: 25 100
:align: left
:header-rows: 1

* - Data management
-
* - `momics create <#momics-create>`_
- Create a repository
* - `momics delete <#momics-delete>`_
- Delete a repository
* - `momics ingest <#momics-ingest>`_
- Ingest datasets
* - `momics cp <#momics-cp>`_
- Copy datasets
* - `momics remove <#momics-remove>`_
- Remove datasets
* - `momics ls <#momics-ls>`_
- List tables


.. list-table::
:widths: 25 100
:align: left
:header-rows: 1

* - Data query engine
-
* - `momics query <#momics-query>`_
- Query a repository


.. list-table::
:widths: 25 100
:align: left
:header-rows: 1

* - Cloud configuration
-
* - `momics config <#momics-config>`_
- Create a repository

.. list-table::
:widths: 25 100
:align: left
:header-rows: 1

* - Momics utils
-
* - `momics tree <#momics-tree>`_
- List repository content
* - `momics binnify <#momics-binnify>`_
- Binnify a genome

.. rubric:: Options

.. option:: -v, --version

Show the version and exit.

.. option:: -h, --help

Show help menu and exit.


----

.. click:: momics.cli:cli
:prog: momics
:nested: full
10 changes: 6 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx_click.ext",
"myst_parser",
Expand All @@ -45,7 +44,6 @@
myst_heading_anchors = 2
source_suffix = [".rst", ".md"]

autosummary_generate = True
numpydoc_show_class_members = True
napoleon_use_rtype = True
autodoc_typehints = "description"
Expand All @@ -60,6 +58,7 @@
html_static_path = ["_static"]
html_logo = "_static/logo.svg"
html_favicon = "_static/logo.svg"
html_css_files = ["css/custom.css"]
html_sourcelink_suffix = ""
html_last_updated_fmt = ""
htmlhelp_basename = "momicsdoc"
Expand All @@ -72,6 +71,7 @@
html_theme_options = {
"use_edit_page_button": True,
"external_links": "",
"logo_only": False,
"github_url": "https://github.com/js2264/momics/",
"show_prev_next": False,
"search_bar_text": "Search the docs ...",
Expand All @@ -83,6 +83,8 @@
"footer_start": ["copyright"],
"footer_center": ["sphinx-version"],
"content_footer_items": ["last-updated"],
"rightsidebar": "false",
"relbarbgcolor": "black",
}
html_context = {
"github_url": "https://github.com/js2264/momics/",
Expand All @@ -93,11 +95,11 @@
}
html_static_path = ["_static"]

autosummary_generate = True

# -- Options for autoapi -------------------------------------------------------
autoapi_type = "python"
autoapi_dirs = ["../../src/momics"]
autoapi_ignore = ["*/cli*"]
autoapi_exclude = ["*/cli*"]
autoapi_options = [
"members",
"undoc-members",
Expand Down
8 changes: 5 additions & 3 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ The `momics` package aims to facilitate:
Follow `momics` development on [GitHub](https://github.com/js2264/momics).

```{toctree}
:caption: Table of content
:maxdepth: 3
:caption: Contents
:maxdepth: 1
user_guide/index
user_guide/get-started
user_guide/api
user_guide/cli
api/index
cli/index
```
12 changes: 8 additions & 4 deletions docs/source/user_guide/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Introduction to `momics` API

## Introduction
```{danger}
This package is still under active development, and we make no promises
about the stability of any specific class, function, etc.
Pin versions if you're worried about breaking changes!
```

The `momics` package provides a Python API for creating and interacting with the `momics` data
model. This API is designed to be simple and intuitive, and is built on top of
Expand Down Expand Up @@ -91,13 +95,13 @@ print(mom.tracks())

## Querying `momics` repositories

The `momics` package provides a dedicated `MultiRangeQuery` class,
The `momics` package provides a dedicated `MomicsQuery` class,
to register query ranges, run queries and export results.

### Registering a query

```python
q = momics.MultiRangeQuery(mom, "I:10-1000")
q = momics.MomicsQuery(mom, "I:10-1000")
```

### Running a query
Expand Down Expand Up @@ -126,7 +130,7 @@ q.query_tracks(threads = 4)
### Exporting query results

The query results can be coerced into generic bioinformatic data objects and
exported to output files using dedicated methods of the `MultiRangeQuery` class.
exported to output files using dedicated methods of the `MomicsQuery` class.

```python
# Coerce queried sequences as a SeqRecord object
Expand Down
6 changes: 6 additions & 0 deletions docs/source/user_guide/get-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Get started with `momics`

```{danger}
This package is still under active development, and we make no promises
about the stability of any specific class, function, etc.
Pin versions if you're worried about breaking changes!
```

## Installation

With python `3.8` and higher, you can install `momics` from [PyPI](https://pypi.org/project/momics) using `pip`.
Expand Down
19 changes: 0 additions & 19 deletions docs/source/user_guide/index.md

This file was deleted.

0 comments on commit 20839f5

Please sign in to comment.