Commit 7c5b12c2 authored by julian.gethmann's avatar julian.gethmann

Update PyScaffold to 3.0.2

parent be81c1c0
......@@ -60,14 +60,15 @@ The docu is generated using `Sphinx <https://sphinx-doc.org>`_, is written in `R
You can compile the docu either by using the setup.py::
$ python setup.py docs
$ python setup.py build_sphinx
or by hand by running::
In detail this dose something similar to the following steps.
Run the sphinx-apidoc::
$ cd docs && sphinx-apidoc -f -o ./_source ../src/cassandra
including filenames (ls `*.rst >> index.rst`) into `index.rst` at a appropriate place and add three spaces before them (e.\,g. care about the indention!)
and finally by running::
Include the filenames (ls `*.rst >> index.rst`) into `index.rst` at a appropriate place and add three spaces before them (e.\,g. care about the indention!)
and finally by run::
$ make latexpdf
$ okular _build/latex/cassandra.pdf
......@@ -83,13 +84,13 @@ install Sphinx and napoleon::
$ pip install Sphinx
$ pip install sphinxcontrib-napoleon
create the docs directory and initialize the project::
Create the docs directory and initialize the project::
$ mkdir docs
$ cd docs
$ sphinx-quickstart (project path: ../src/cassandra, source-build seperated)
configure it by editing `source/conf.py` and adding `shpinx.ext.napoleon` to the list of extensions and
Configure its configuration by editing `source/conf.py` and adding `shpinx.ext.napoleon` to the list of extensions and
uncommenting `import sys` and `import os` and modifying `abspath('../..')`.
Create some required directories `mkdir _source _static`.
......@@ -63,6 +63,7 @@ universal = 1
[build_sphinx]
source_dir = docs
build_dir = docs/_build
fresh-env = true
[devpi:upload]
# Options for the devpi: PyPI server and packaging tool
......
......@@ -9,6 +9,7 @@
"""
import sys
from setuptools import setup
# Add here console scripts and other entry points in ini-style format
......@@ -23,9 +24,10 @@ entry_points = """
def setup_package():
needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv)
sphinx = ['sphinx'] if needs_sphinx else []
setup(setup_requires=['pyscaffold>=3.0.2a0,<3.1a0'] + sphinx,
entry_points=entry_points,
use_pyscaffold=True)
setup(
setup_requires=['pyscaffold>=3.0a0,<3.1a0'] + sphinx,
entry_points=entry_points,
use_pyscaffold=True)
if __name__ == "__main__":
......
# -*- coding: utf-8 -*-
""" A module to handle typical tasks concerning ANKA's ``Cassandra``.
Read data from ANKA's ``Cassandra`` and exported data exported by ``Control System Studio``'s ``Data Browser``
Read data from KARA's ``Cassandra`` database and exported data exported by ``Control System Studio``'s ``Data Browser``
.. moduleauthor:: Julian Gethmann <atb@gethmann.org>
To read data from CSS exports you need the :func:`css_read.load_css_data`.
To read data from the cassandra-db you either need to use the class
:class:`cassandra.Cassandra` probably with its context manager.
Or you can use the :func:`pd.pvs2pd` function to export the data directly
to a pandas :obj:`pandas.DataFrame`.
If you don't know a specific, but common, process variable name changces are
high you might find it in the :obj:`cassandra.Pvs.pv` dictionary.
Finally there are some helper functions, like time conversions, in the :class:`cassandra.CassandraHelper`
class.
"""
from pkg_resources import get_distribution, DistributionNotFound
......
......@@ -25,11 +25,11 @@ def pvs2pd(
save_local=False, # type: bool
):
# type (...) -> pd.DataFrame
"""Return a `pd.DataFrame` with data for all `pv_names` and `time` as index
"""Return a :obj:`pandas.DataFrame` with data for all `pv_names` and `time` as index
Missing data points are filled with the last value (like in CSS).
The sampling rate is not corrected to be constant (like in CSS).
The `pd.DataFrame` starts with the start date and takes the last saved data
The `pandas.DataFrame` starts with the start date and takes the last saved data
for it and ends with the end date and also takes the filled data.
.. note::
......@@ -53,7 +53,7 @@ def pvs2pd(
are saved locally in the same directory.
Returns:
pd.DataFrame: "time" as index and `pv_names` as columns.
pandas.DataFrame: "time" as index and `pv_names` as columns.
Examples:
>>> from datetime import datetime
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment