Skip to content

Latest commit

 

History

History
129 lines (99 loc) · 3.75 KB

README.md

File metadata and controls

129 lines (99 loc) · 3.75 KB

t8s

PyPI - Stable Version PyPI - Python Version Downloads Build Status Documentation Status


Table of Contents

Installation

python3 -m pip install t8s
# Edit your code using t8s.ts.TimeSerie and others related classes

Check Linter rules using PyRight (https://microsoft.github.io/pyright)

pyright --level warning .

Testing

# To configure the test environment, set the T8S_WORKSPACE_DIR environment variable, for example:
export T8S_WORKSPACE_DIR=/Volumes/dev/t8s

BDD

See too BDD

# To inspect the test environment configuration:
hatch config show
hatch clean
hatch build
# Edit your main.py code
hatch run python3 main.py
./test-all.sh
# Using BDD with behave (https://behave.readthedocs.io/en/latest/)
rm logs/timeseries.log
python -m behave --logging-level INFO --no-capture --no-capture-stderr --no-skipped features
cat logs/timeseries.log

Publishing

hatch publish

Graphics

Execute the examples below:

alias st='streamlit run  --server.headless true --theme.base light '
# This start code below is referencing the file graph-01.py and graph-02.py
st graphics/graph-01.py
st graphics/graph-02.py
# You can use Raw URI from GitHub repository like this:
# st https://raw.githubusercontent.com//joao-parana/...whatever-file.py

And open the URI in browser

For information on caching see https://docs.streamlit.io/library/advanced-features/caching

Notebooks

python3 -m jupyter lab --no-browser --notebook-dir=notebooks
python3 -m pip install --upgrade jupyter-packaging ipywidgets
# clone bqplot repository and install it for development
python3 -m pip list | egrep 'ipywidgets|jupyterlab|bqplot|pandas|numpy|jupyter_packaging'

Virtual Environment

To generate requirements.txt from zero, with Python 3.10 and TensorFlow 2.10.1, in Windows 10 for GPU support, use this:

curl -O https://www.python.org/ftp/python/3.10.11/python-3.10.11-embed-amd64.zip
# Move files to /e/usr/local/python-3.10/
alias python3.10=''
/e/usr/local/python-3.10/python.exe -m venv .venv
source .venv/Scripts/activate
alias python3.10=".venv/Scripts/python"
# Install packages
python3.10 -m pip install --upgrade pip
python3.10 -m pip install --upgrade pyright
python3.10 -m pip install tensorflow==2.10.1 # tensorflow-metadata tensorflow-datasets
python3.10 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
python3.10 -m pip install -e .
# Freeze instalation
python3.10 -m pip freeze > requirements.txt
# Do your job
# . . .
#
deactivate
rm -rf .venv/*

To list modules and versions instaled use:

python3 -m pip list | egrep 'keyring|keyrings.google-artifactregistry-auth|pyyaml|tomli|pyarrow|pandas|matplotlib|seaborn|streamlit|hvplot|holoviews|bokeh|jupyterlab|scikit-learn|datafusion|altair|rich|behave|behave-pandas|ipywidgets|bqplot|numpy|jupyter_packaging'

License

t8s is distributed under the terms of the MIT license.