Skip to content

Commit e4ebcb7

Browse files
committed
Docs
1 parent 8f476db commit e4ebcb7

25 files changed

Lines changed: 2070 additions & 131 deletions

.github/workflows/docs.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy-book
1+
name: deploy-docs
22

33
on:
44
push:
@@ -16,7 +16,7 @@ concurrency:
1616
cancel-in-progress: false
1717

1818
jobs:
19-
deploy-book:
19+
build:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v4
@@ -36,9 +36,14 @@ jobs:
3636
- name: Install dependencies
3737
run: uv pip install --system ".[docs]"
3838

39-
- name: Build the book
39+
# Build narrative docs (guides, examples) with Jupyter Book / MyST
40+
- name: Build narrative docs
4041
run: jupyter-book build --html
4142

43+
# Build API reference with Sphinx
44+
- name: Build API docs
45+
run: sphinx-build -b html docs-api _build/html/api
46+
4247
- name: Upload artifact
4348
uses: actions/upload-pages-artifact@v3
4449
with:
@@ -49,7 +54,7 @@ jobs:
4954
name: github-pages
5055
url: ${{ steps.deployment.outputs.page_url }}
5156
runs-on: ubuntu-latest
52-
needs: deploy-book
57+
needs: build
5358
steps:
5459
- name: Deploy to GitHub Pages
5560
id: deployment

docs-api/apps.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Apps
2+
====
3+
4+
.. autofunction:: dapi.apps.find_apps
5+
6+
.. autofunction:: dapi.apps.get_app_details

docs-api/auth.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Auth
2+
====
3+
4+
.. autofunction:: dapi.auth.init

docs-api/client.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Client
2+
======
3+
4+
.. autoclass:: dapi.client.DSClient
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
.. autoclass:: dapi.client.AppMethods
10+
:members:
11+
12+
.. autoclass:: dapi.client.FileMethods
13+
:members:
14+
15+
.. autoclass:: dapi.client.JobMethods
16+
:members:
17+
18+
.. autoclass:: dapi.client.SystemMethods
19+
:members:
20+
21+
.. autoclass:: dapi.client.ParametricSweepMethods
22+
:members:

docs-api/conf.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""Sphinx configuration for dapi API reference docs."""
2+
3+
project = "dapi"
4+
copyright = "2024, Krishna Kumar, Pedro Arduino, Scott Brandenberg"
5+
author = "Krishna Kumar"
6+
7+
extensions = [
8+
"sphinx.ext.autodoc",
9+
"sphinx.ext.napoleon",
10+
"sphinx.ext.viewcode",
11+
]
12+
13+
# Napoleon settings (Google-style docstrings)
14+
napoleon_google_docstring = True
15+
napoleon_numpy_docstring = True
16+
napoleon_include_init_with_doc = True
17+
18+
# Autodoc settings
19+
autodoc_member_order = "bysource"
20+
autodoc_typehints = "description"
21+
autodoc_default_options = {
22+
"members": True,
23+
"undoc-members": True,
24+
"show-inheritance": True,
25+
}
26+
27+
# Theme
28+
html_theme = "furo"
29+
html_title = "dapi API Reference"
30+
html_theme_options = {
31+
"navigation_with_keys": True,
32+
}
33+
34+
# Suppress warnings for missing type stubs
35+
nitpicky = False

docs-api/database.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Database
2+
========
3+
4+
.. autoclass:: dapi.db.accessor.DatabaseAccessor
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
.. autoclass:: dapi.db.db.DSDatabase
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:

docs-api/exceptions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Exceptions
2+
==========
3+
4+
.. automodule:: dapi.exceptions
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs-api/files.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Files
2+
=====
3+
4+
.. autofunction:: dapi.files.get_ds_path_uri
5+
6+
.. autofunction:: dapi.files.tapis_uri_to_local_path
7+
8+
.. autofunction:: dapi.files.upload_file
9+
10+
.. autofunction:: dapi.files.download_file
11+
12+
.. autofunction:: dapi.files.list_files

docs-api/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
dapi API Reference
2+
==================
3+
4+
Auto-generated API documentation for the ``dapi`` package.
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Modules
9+
10+
client
11+
jobs
12+
launcher
13+
files
14+
apps
15+
systems
16+
auth
17+
database
18+
exceptions

docs-api/jobs.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Jobs
2+
====
3+
4+
Module Functions
5+
----------------
6+
7+
.. autofunction:: dapi.jobs.generate_job_request
8+
9+
.. autofunction:: dapi.jobs.submit_job_request
10+
11+
.. autofunction:: dapi.jobs.get_job_status
12+
13+
.. autofunction:: dapi.jobs.get_runtime_summary
14+
15+
.. autofunction:: dapi.jobs.interpret_job_status
16+
17+
.. autofunction:: dapi.jobs.list_jobs
18+
19+
SubmittedJob
20+
------------
21+
22+
.. autoclass:: dapi.jobs.SubmittedJob
23+
:members:
24+
:undoc-members:
25+
:show-inheritance:
26+
27+
Status Constants
28+
----------------
29+
30+
.. autodata:: dapi.jobs.STATUS_TIMEOUT
31+
.. autodata:: dapi.jobs.STATUS_INTERRUPTED
32+
.. autodata:: dapi.jobs.STATUS_MONITOR_ERROR
33+
.. autodata:: dapi.jobs.STATUS_UNKNOWN
34+
.. autodata:: dapi.jobs.TAPIS_TERMINAL_STATES

0 commit comments

Comments
 (0)