Skip to content

Commit d55b14d

Browse files
committed
Improve documentation
1 parent da1b788 commit d55b14d

24 files changed

+243
-203
lines changed

doc-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recommonmark

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CONTRIBUTING.md

docs/api.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Library API
2+
===========
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
bus
8+
external
9+
instrument
10+
internal
11+
12+
ScienceLab
13+
----------
14+
15+
.. automodule:: pslab.sciencelab
16+
:members:
17+
:undoc-members:
18+
:show-inheritance:

docs/pslab.bus.rst renamed to docs/bus.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1-
pslab.bus package
2-
=================
3-
4-
Module contents
5-
---------------
1+
Bus
2+
===
63

74
.. automodule:: pslab.bus
85
:members:
96
:undoc-members:
107
:show-inheritance:
118

12-
Submodules
13-
----------
149

15-
pslab.bus.i2c module
16-
--------------------
10+
I2C
11+
---
1712

1813
.. automodule:: pslab.bus.i2c
1914
:members:

docs/cli.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Command Line Interface
2+
======================
3+
4+
.. automodule:: pslab.cli
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'sphinx.ext.viewcode',
3737
'sphinx.ext.mathjax',
3838
'sphinx.ext.napoleon',
39+
'recommonmark',
3940
]
4041

4142
mathjax_path = 'file:///usr/share/javascript/mathjax/MathJax.js'
@@ -46,7 +47,7 @@
4647
# The suffix(es) of source filenames.
4748
# You can specify multiple suffix as a list of string:
4849
# source_suffix = ['.rst', '.md']
49-
source_suffix = '.rst'
50+
source_suffix = ['.rst', '-md']
5051

5152
# The encoding of source files.
5253
# source_encoding = 'utf-8-sig'
@@ -55,7 +56,7 @@
5556
master_doc = 'index'
5657

5758
# General information about the project.
58-
project = u'FOSSASIA PSLab'
59+
project = u'pslab-python'
5960
copyright = u'2021, FOSSASIA'
6061
author = u'FOSSASIA Developers'
6162

@@ -232,7 +233,7 @@
232233
# (source start file, target name, title,
233234
# author, documentclass [howto, manual, or own class]).
234235
latex_documents = [
235-
(master_doc, 'pslab-python.tex', u'pslab-python Documentation',
236+
(master_doc, 'pslab-python.tex', u'pslab-python documentation',
236237
u'FOSSASIA Developers', 'manual'),
237238
]
238239

@@ -262,7 +263,7 @@
262263
# One entry per manual page. List of tuples
263264
# (source start file, name, description, authors, manual section).
264265
man_pages = [
265-
(master_doc, 'pslab-python', u'pslab-python Documentation',
266+
(master_doc, 'pslab-python', u'pslab-python documentation',
266267
[author], 1)
267268
]
268269

@@ -276,7 +277,7 @@
276277
# (source start file, target name, title, author,
277278
# dir menu entry, description, category)
278279
texinfo_documents = [
279-
(master_doc, 'pslab-python', u'pslab-python Documentation',
280+
(master_doc, 'pslab-python', u'pslab-python documentation',
280281
author, 'pslab-python', 'One line description of project.',
281282
'Miscellaneous'),
282283
]

docs/pslab.external.rst renamed to docs/external.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
pslab.external package
2-
======================
3-
4-
Module contents
5-
---------------
1+
External devices
2+
================
63

74
.. automodule:: pslab.external
85
:members:
96
:undoc-members:
107
:show-inheritance:
118

12-
Submodules
13-
----------
14-
15-
pslab.external.motor module
16-
---------------------------
9+
motor
10+
-----
1711

1812
.. automodule:: pslab.external.motor
1913
:members:

docs/index.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22
You can adapt this file completely to your liking, but it should at least
33
contain the root `toctree` directive.
44
5-
Welcome to PSLab's documentation!
6-
=================================
5+
pslab-python
6+
============
7+
8+
The pslab-python library provides a high-level interface for controlling a
9+
PSLab device over a serial connection using Python.
710

811
Contents:
912

1013
.. toctree::
1114
:maxdepth: 4
1215

13-
pslab
16+
installation
17+
api
18+
cli
19+
protocol
20+
Contributing <CONTRIBUTING>
1421

1522

1623
Indices and tables

docs/installation.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Installation
2+
============
3+
4+
``pslab-python`` can be installed from PyPI:
5+
::
6+
7+
$ pip install pslab
8+
9+
**Note:** Linux users must additionally install a udev rules file for
10+
pslab-python to be able to communicate with the PSLab device. The file
11+
[99-pslab.rules](https://github.com/fossasia/pslab-python/blob/development/99-pslab.rules)
12+
should be copied to /etc/udev/rules.d/.
13+
14+
**Note**: pslab-python does not provide a graphical user interface. If you want
15+
a GUI, install the [pslab-desktop app](https://github.com/fossasia/pslab-desktop).
16+
17+
Dependencies
18+
------------
19+
20+
``pslab-python`` requires `Python <http://python.org/download/>`__ version
21+
3.6 or later.

docs/instrument.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Instrument
2+
==========
3+
4+
.. automodule:: pslab.instrument
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
LogicAnalyzer
10+
-------------
11+
12+
.. autoclass:: pslab.instrument.logic_analyzer.LogicAnalyzer
13+
:members:
14+
:undoc-members:
15+
:show-inheritance:
16+
17+
Multimeter
18+
----------
19+
20+
.. autoclass:: pslab.instrument.multimeter.Multimeter
21+
:members:
22+
:undoc-members:
23+
:show-inheritance:
24+
25+
Oscilloscope
26+
------------
27+
28+
.. autoclass:: pslab.instrument.oscilloscope.Oscilloscope
29+
:members:
30+
:undoc-members:
31+
:show-inheritance:
32+
33+
PowerSupply
34+
-----------
35+
36+
.. autoclass:: pslab.instrument.power_supply.PowerSupply
37+
:members:
38+
:undoc-members:
39+
:show-inheritance:
40+
41+
PWMGenerator
42+
------------
43+
44+
.. autoclass:: pslab.instrument.waveform_generator.PWMGenerator
45+
:members:
46+
:undoc-members:
47+
:show-inheritance:
48+
49+
WaveformGenerator
50+
-----------------
51+
52+
.. autoclass:: pslab.instrument.waveform_generator.WaveformGenerator
53+
:members:
54+
:undoc-members:
55+
:show-inheritance:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy