exmplpckg package¶
Submodules¶
exmplpckg.base module¶
Example Package in python to show how to use documentation with sphinx and readthedocs .
The purpose of this module is to demonstrate documentation as specified by the NumPy Documentation HOWTO. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal length.
Sphinx allows to include documentation from docstrings . To make the docstrings look nice within your html page, use any reStructuredText formatting.
This simple package calculates the slope m and the offset t of a linear function for two given points P1 = [x,y] and P2 = [x,y]
Example
Here you can provide an Example in doctest format
>>> import exmplpckg as ep
>>> P1 = [3,4]
>>> P2 = [6,8]
>>> linf = ep.LinearFunction(P1,P2)
>>> linf.calc_y(3)
4
Notes
- Here you can specify more stuff
- e.g. in a list
-
class
exmplpckg.base.LinearFunction(P1, P2)[source]¶ Bases:
objectLinear function object
Some more description of your class
-
m¶ float – slope of the linear function
-
t¶ float – offset of the linear function.
-
exmplpckg.plot module¶
In this file we define all (here one) methods for plotting. We do this in a seperate file because plotting functions usually need many lines of code. (And to have two different files in this example). Of courese we could simply add this in the base file (also as a method), which even might be the better solution…
exmplpckg.get_settings module¶
The function get_parameter() is supposed to return parameters saved in a csv file /settings/settings_file.csv within this package
Module contents¶
You can also have a docstring for your init file