Skip to content

Commit 35ee499

Browse files
committed
docs: Update docs for readthedocs
1 parent 94a2668 commit 35ee499

File tree

11 files changed

+99
-94
lines changed

11 files changed

+99
-94
lines changed

.github/workflows/ci-master.yaml

Lines changed: 0 additions & 42 deletions
This file was deleted.

doc/index.rst

Lines changed: 0 additions & 28 deletions
This file was deleted.
File renamed without changes.

doc/conf.py renamed to docs/conf.py

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.linkcode', 'sphinx.ext.napoleon']
33+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosectionlabel', 'sphinx.ext.graphviz',
34+
'sphinx.ext.inheritance_diagram', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary',
35+
'sphinx.ext.githubpages', 'sphinx.ext.napoleon']
3436

3537
# Add any paths that contain templates here, relative to this directory.
3638
templates_path = ['_templates']
@@ -102,7 +104,7 @@
102104
# Add any paths that contain custom static files (such as style sheets) here,
103105
# relative to this directory. They are copied after the builtin static files,
104106
# so a file named "default.css" will overwrite the builtin "default.css".
105-
html_static_path = ['static']
107+
html_static_path = []
106108

107109
# -- Options for HTMLHelp output ------------------------------------------
108110

@@ -157,31 +159,10 @@
157159
'Miscellaneous'),
158160
]
159161

160-
161-
def linkcode_resolve(domain, info):
162-
def find_line():
163-
obj = sys.modules[info['module']]
164-
for part in info['fullname'].split('.'):
165-
obj = getattr(obj, part)
166-
import inspect
167-
source, lineno = inspect.findsource(obj)
168-
return lineno + 1
169-
170-
if domain != 'py' or not info['module']:
171-
return None
172-
173-
# tag = 'master' if 'dev' in release else ('v' + release)
174-
url = "https://github.com/sysdiglabs/sysdig-sdk-python/blob/master/sdcclient/_client.py"
175-
try:
176-
return url + '#L%d' % find_line()
177-
except Exception:
178-
return url
179-
180-
181162
# Napoleon settings
182163
napoleon_google_docstring = True
183164
napoleon_include_init_with_doc = False
184-
napoleon_include_private_with_doc = False
165+
napoleon_include_private_with_doc = True
185166
napoleon_include_special_with_doc = True
186167
napoleon_use_admonition_for_examples = False
187168
napoleon_use_admonition_for_notes = False

docs/index.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. python-sdc-client documentation master file, created by
2+
sphinx-quickstart on Thu Dec 22 11:59:02 2016.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Sysdig SDK for Python
7+
=====================
8+
9+
This module is a wrapper around the Sysdig Monitor/Sysdig Secure APIs.
10+
It exposes most of the sysdig REST API functionality as an easy to use and easy to
11+
install Python interface.
12+
13+
.. toctree::
14+
:maxdepth: 2
15+
16+
install
17+
usage
18+
monitor
19+
secure
20+
21+
22+
.. autosummary::
23+
24+

docs/install.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Installation
2+
============
3+
4+
Automatic with PyPI
5+
-------------------
6+
7+
::
8+
9+
$ pip install sdcclient
10+
11+
Manual (development only)
12+
-------------------------
13+
14+
This method requires `Poetry`_ installed.
15+
16+
.. _Poetry: https://python-poetry.org/
17+
18+
::
19+
20+
$ git clone https://github.com/sysdiglabs/sysdig-sdk-python.git
21+
$ cd python-sdc-client
22+
$ poetry install
File renamed without changes.

docs/monitor.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. automodule:: sdcclient
2+
3+
Sysdig Monitor
4+
=====================
5+
.. inheritance-diagram:: SdMonitorClient
6+
.. autoclass:: SdMonitorClient
7+
:members:
8+
:inherited-members:
9+
:undoc-members:

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx==3.3.1
2+
sphinx-material==0.0.32

docs/secure.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. automodule:: sdcclient
2+
Sysdig Secure
3+
====================
4+
5+
.. autoclass:: SdSecureClient
6+
:members:
7+
:inherited-members:
8+
:undoc-members:

0 commit comments

Comments
 (0)