Skip to content

Commit

Permalink
docs: cli reference (#60)
Browse files Browse the repository at this point in the history
* docs: cli reference

added cli arguments to docs

* update workflow and api reference

* Removed 'Python objects' from API reference
  • Loading branch information
ljcolling authored Aug 8, 2023
1 parent 43c18fa commit ccbb8b9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 125 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install cats
run: python3 -m pip install .
- run: |
pip install -r docs/docs-requirements.txt
- name: Build sphinx docs
Expand Down
1 change: 1 addition & 0 deletions docs/docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sphinx
sphinx-argparse
ghp-import
renku-sphinx-theme
sphinx_copybutton
132 changes: 9 additions & 123 deletions docs/source/api-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Modules
.. automodule:: cats.__main__
:members:

``cats.api_interface``
^^^^^^^^^^^^^^^^^^^^^^
``cats.CI_api_interface``
^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: cats.api_interface
.. automodule:: cats.CI_api_interface
:members:

``cats.api_query``
^^^^^^^^^^^^^^^^^^
``cats.CI_api_query``
^^^^^^^^^^^^^^^^^^^^^

.. automodule:: cats.api_query
.. automodule:: cats.CI_api_query
:members:

``cats.carbonFootprint``
Expand All @@ -47,124 +47,10 @@ Modules
.. automodule:: cats.forecast
:members:

``cats.parsedata``
^^^^^^^^^^^^^^^^^^

.. automodule:: cats.parsedata
:members:

``cats.timeseries_conversion``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: cats.timeseries_conversion
:members:


Python objects
--------------




In ``cats.__init__``
^^^^^^^^^^^^^^^^^^^^

Functions
"""""""""

.. autosummary::

cats.__init__.findtime
cats.__init__.parse_arguments
cats.__init__.validate_jobinfo
cats.__init__.main


In ``cats.__main__``
^^^^^^^^^^^^^^^^^^^^

n/a


In ``cats.api_interface``
^^^^^^^^^^^^^^^^^^^^^^^^^

Functions
"""""""""

.. autosummary::

cats.api_interface.ciuk_request_url
cats.api_interface.ciuk_parse_response_data

Variables and constants
"""""""""""""""""""""""

.. autosummary::

cats.api_interface.APIInterface
cats.api_interface.API_interfaces

In ``cats.api_query``
^^^^^^^^^^^^^^^^^^^^^

Functions
"""""""""

.. autosummary::

cats.api_query.get_tuple


In ``cats.carbonFootprint``
``cats.optimise_starttime``
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Classes
"""""""

.. autosummary::

cats.carbonFootprint.greenAlgorithmsCalculator

Variables and constants
"""""""""""""""""""""""

.. autosummary::

cats.carbonFootprint.Estimates


In ``cats.forecast``
^^^^^^^^^^^^^^^^^^^^

Classes
"""""""

.. autosummary::

cats.forecast.CarbonIntensityPointEstimate
cats.forecast.CarbonIntensityAverageEstimate
cats.forecast.WindowedForecast


In ``cats.parsedata``
^^^^^^^^^^^^^^^^^^^^^

Functions
"""""""""

.. autosummary::

cats.parsedata.avg_carbon_intensity


In ``cats.timeseries_conversion``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Functions
"""""""""

.. autosummary::
.. automodule:: cats.optimise_starttime
:members:

cats.timeseries_conversion.check_duration
cats.timeseries_conversion.get_lowest_carbon_intensity
6 changes: 4 additions & 2 deletions docs/source/cli-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Command-line (CLI) reference
============================

.. TODODOCS

Coming soon...
.. argparse::
:module: cats
:func: parse_arguments
:prog: cats
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinxarg.ext",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx_copybutton",
Expand Down

0 comments on commit ccbb8b9

Please sign in to comment.