GITLAB iLM - Institut Lumière Matière

Skip to content
Snippets Groups Projects
Commit 603a345f authored by Olivier VINCENT's avatar Olivier VINCENT
Browse files

Change package name recto -> prevo

parent 6417ed86
Branches
Tags v0.4.0
No related merge requests found
About
=====
Record data from sensors periodically. This package provide base classes to rapidly create interactive data recording for various applications (e.g. recording of temperature, time-lapses with cameras etc.).
**P**eriodic **RE**cording and **V**isualization of sensor **O**bjects
This package provides base classes to rapidly create interactive data recording for various applications (e.g. recording of temperature, time-lapses with cameras etc.). Sensors are read in a asynchronous fashion and can have different time intervals for data reading (or be continuous, i.e. as fast as possible). Tools for graphical visualizations of data during recording are also provided.
Install
-------
```bash
git clone https://cameleon.univ-lyon1.fr/ovincent/recto
cd recto
pip install -e .
git clone https://cameleon.univ-lyon1.fr/ovincent/prevo
pip install -e prevo
```
Install must be done from a git repository, because version information is extracted automatically from git tags.
Install must be done from a git repository (or from PyPI), because version information is extracted automatically from git tags.
Contents
========
For using the package, three base classes must be subclassed:
- `MeasurementBase`
- `SensorRecordingBase`
- `SensorBase`
- `RecordingBase`
- `RecordBase`
See docstrings for help.
......@@ -36,9 +37,11 @@ Module requirements
(installed automatically by pip if necessary)
- tqdm
- tzlocal < 3.0
- oclock >= 1.2.2 (timing tools)
- clivo >= 0.2.0 (command line interface)
- pandas (optional, for csv loading methods)
Python requirements
......
......@@ -12,4 +12,4 @@ from .view import CameraViewCv, CameraViewMpl, max_possible_pixel_value
from importlib_metadata import version
__author__ = "Olivier Vincent"
__version__ = version("recto")
__version__ = version("prevo")
......@@ -4,7 +4,10 @@
from pathlib import Path
# Nonstandard
try:
import pandas as pd
except ModuleNotFoundError:
pass
class CsvFile:
......
......@@ -12,7 +12,10 @@ from pathlib import Path
# Non standard imports
from tzlocal import get_localzone
try:
import pandas as pd
except ModuleNotFoundError:
pass
# Local imports
from .fileio import CsvFile
......
File moved
......@@ -16,17 +16,17 @@ import matplotlib.dates as mdates
from matplotlib.animation import FuncAnimation
import oclock
from tzlocal import get_localzone
from .record import SensorError
# The two lines below have been added following a console FutureWarning:
# "Using an implicitly registered datetime converter for a matplotlib plotting
# method. The converter was registered by pandas on import. Future versions of
# pandas will require you to explicitly register matplotlib converters."
try:
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
except ModuleNotFoundError:
pass
class GraphBase(ABC):
......
File moved
......@@ -16,8 +16,11 @@ except ModuleNotFoundError:
# "Using an implicitly registered datetime converter for a matplotlib plotting
# method. The converter was registered by pandas on import. Future versions of
# pandas will require you to explicitly register matplotlib converters."
try:
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
except ModuleNotFoundError:
pass
def max_possible_pixel_value(img):
......
[metadata]
name = recto
name = prevo
author = Olivier Vincent
author_email = ovinc.py@gmail.com
url = https://cameleon.univ-lyon1.fr/ovincent/recto
url = https://cameleon.univ-lyon1.fr/ovincent/prevo
description = Base package to record data periodically
long_description = file: README.md
long_description_content_type = text/markdown
......@@ -19,7 +19,7 @@ classifiers =
include_package_data = True
packages = find:
install_requires =
pandas
tqdm
oclock > 1.2.2
tzlocal < 3.0
clivo >= 0.2.0
......
"""Tests for the recto package.
"""Tests for the prevo package.
(VERY partial)
"""
......@@ -10,10 +10,10 @@ from pathlib import Path
import pytest
# local imports
import recto
import prevo
datafolder = Path(recto.__file__).parent / '..' / 'data/manip'
datafolder = Path(prevo.__file__).parent / '..' / 'data/manip'
t_column, dt_column = 'time (unix)', 'dt (s)'
......@@ -34,9 +34,9 @@ lines = {'P': (1616490450.506, 0.167, 2727.25),
'T': (1616490515.961, 2.623, 26.8932, 25.4829),
'B1': (1616490514.585, 0.091, 24.2640)}
measP = recto.SavedMeasurementCsv('P', filenames['P'], datafolder)
measT = recto.SavedMeasurementCsv('T', filenames['T'], path=datafolder)
measB1 = recto.SavedMeasurementCsv(name='B1', filename=filenames['B1'],
measP = prevo.SavedMeasurementCsv('P', filenames['P'], datafolder)
measT = prevo.SavedMeasurementCsv('T', filenames['T'], path=datafolder)
measB1 = prevo.SavedMeasurementCsv(name='B1', filename=filenames['B1'],
path=datafolder, csv_separator='\t')
measurements = {'P': measP, 'T': measT, 'B1': measB1}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment