Skip to content

Commit

Permalink
Merge pull request #58 from voetberg/doc_quickstart
Browse files Browse the repository at this point in the history
Building documentation complete
  • Loading branch information
bnord authored May 17, 2024
2 parents 7345dcc + d09afbe commit e7e150b
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/API/client.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Client
========

.. autoclass:: DeepDiagnostics.Client
.. automodule:: client
:members:
8 changes: 7 additions & 1 deletion docs/source/API/data.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Data
======

.. autoclass:: DeepDiagnostics.data.data.Data
.. autoclass:: data.data.Data
:members:

.. autoclass:: data.H5Data
:members:

.. autoclass:: data.PickleData
:members:
2 changes: 1 addition & 1 deletion docs/source/API/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Metrics
===========

.. autoclass:: DeepDiagnostics.metrics.metrics.Metrics
.. autoclass:: metrics.metric.Metric
:members:
8 changes: 7 additions & 1 deletion docs/source/API/models.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
Models
========
========

.. autoclass:: models.model.Model
:members:

.. autoclass:: models.SBIModel
:members:
2 changes: 1 addition & 1 deletion docs/source/API/plots.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Plots
========

.. autoclass:: DeepDiagnostics.plots.plots.Plots
.. autoclass:: plots.Plots
:members:

5 changes: 3 additions & 2 deletions docs/source/API/utils.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Utils
=======

.. autoclass:: DeepDiagnostics.utils.config.Config
:members:
.. autoclass:: utils.config.Config
:members:

3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

import sys
sys.path.append("../src")

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
Expand Down
7 changes: 6 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ Welcome to DeepDiagnostics's documentation!
configuration
plots
metrics
API
API/client
API/utils
API/data
API/models
API/plots
API/metrics

Indices and tables
==================
Expand Down
2 changes: 2 additions & 0 deletions docs/source/metrics.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.. _metrics:

Metrics
=========
2 changes: 2 additions & 0 deletions docs/source/plots.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.. _plots:

Plots
=======
60 changes: 59 additions & 1 deletion docs/source/quickstart.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
Quickstart
============
============

Installation
--------------

* From PyPi
.. code-block:: console
pip install DeepDiagnostics
* From Source
.. code-block:: console
git clone https://github.com/deepskies/DeepDiagnostics/
pip install poetry
poetry shell
poetry install
Pipeline
---------

`DeepDiagnostics` includes a CLI tool for analysis.
* To run the tool using a configuration file:

.. code-block:: console
diagnose --config {path to yaml}
* To use defaults with specific models and data:

.. code-block:: console
diagnose --model_path {model pkl} --data_path {data pkl} [--simulator {sim name}]
Additional arguments can be found using ``diagnose -h``

Standalone
----

`DeepDiagnostics` comes with the option to run different plots and metrics independently.
This requires setting a configuration file ahead of time, and then running the plots.

All plots and metrics can be found in :ref:`plots<plots>` and :ref:`metrics<metrics>`.



.. code-block:: python
from DeepDiagnostics.utils.configuration import Config
from DeepDiagnostics.model import SBIModel
from DeepDiagnostics.data import H5Data
from DeepDiagnostics.plots import ...
Config({configuration_path})
model = SBIModel({model_path})
data = H5Data({data_path})
{Plot of choice}

0 comments on commit e7e150b

Please sign in to comment.