Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api-reference docs compile #374

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes.
40 changes: 22 additions & 18 deletions docs/future-roadmap.rst → docs/about/future-roadmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,39 @@ of development might change.
:class: important

- *Next generation API version 0.2*
1. Meta-data cleanup

2. Simpler constructors

3. New core TSDF transformation functions
1. Meta-data cleanup
2. Simpler constructors
3. New core TSDF transformation functions

- *Clear separation of resampling & interpolation functions*
--------------------------------------------------------------------------

- *Intervals API*
1. Extract intervals from TSDFs
2. Get distinct (non-overlapping intervals)
3. Interval-TSDF joins

1. Extract intervals from TSDFs
2. Get distinct (non-overlapping intervals)
3. Interval-TSDF joins

- *Streaming Support* 🚀
1. Streaming as-of joins
2. Streaming resampling

1. Streaming as-of joins
2. Streaming resampling

- *Integration with timeseries forecasting & ML libraries:* 📈
1. statsmodels
2. FB Prophet
3. Tensorflow
4. Pytorch
5. tsfresh
6. sktime

And many more...
1. statsmodels
2. FB Prophet
3. Tensorflow
4. Pytorch
5. tsfresh
6. sktime

And many more...

- *Simpler Windowing API*
1. Use natural-language expressions (ie "5 mins", "16 days", etc.)

1. Use natural-language expressions (ie "5 mins", "16 days", etc.)



Don't see what you are looking for, reach out to the team directly
Expand Down
2 changes: 0 additions & 2 deletions docs/tempo-team.rst → docs/about/tempo-team.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ Contact

Reach out to the team at `[email protected] <mailto:[email protected]>`_ for feature requests, ideas for improvement
etc.


8 changes: 4 additions & 4 deletions docs/user-guide.rst → docs/about/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ to create new features from. Below are the public methods available for TSDF tra
Sample Reference Architecture for Capital Markets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: _static/ts_in_fs.png
.. image:: ../_static/ts_in_fs.png
:alt: Architecture diagram

Quickstart - Python
-------------------

Data source is UCI public accelerometer data available at this `URL <https://archive.ics.uci.edu/ml/datasets/Heterogeneity+Activity+Recognition>`_

.. image:: _static/Phone_Accelerometer.png
.. image:: ../_static/Phone_Accelerometer.png
:alt: Data Info

Read in Data
Expand Down Expand Up @@ -130,7 +130,7 @@ For the accepted functions to aggregate data, options are 'floor', 'ceil', 'min'

fig.show()

.. image:: _static/resample.png
.. image:: ../_static/resample.png
:alt: Raw time series

AS OF Join
Expand All @@ -139,7 +139,7 @@ AS OF Join
This join uses windowing in order to select the latest record from a source table and merges this onto the base fact
table.

.. image:: _static/AS_OF_JOIN.png
.. image:: ../_static/AS_OF_JOIN.png
:alt: As of join

.. code-block:: python
Expand Down
25 changes: 8 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

from datetime import date
import os
import sys
Expand All @@ -22,14 +22,13 @@

# -- Project information -----------------------------------------------------

project = "Tempo"
copyright = f"{date.today().year}, Databricks Labs"
author = "Databricks Labs"
project = 'Tempo'
copyright = '2024, Databricks Labs'
author = 'Databricks Labs'

# The full version, including alpha/beta/rc tags
release = get_latest_git_tag()


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
Expand All @@ -46,20 +45,20 @@
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "furo"
html_theme = 'furo'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -68,14 +67,6 @@
html_theme_options = {
"light_logo": "tempo - light background.svg",
"dark_logo": "tempo - dark background.svg",
"light_css_variables": {
"color-brand-primary": "#7C4DFF",
"color-brand-content": "#7C4DFF",
},
"dark_css_variables": {
"color-brand-primary": "#7C4DFF",
"color-brand-content": "#7C4DFF",
},
"footer_icons": [
{
"name": "GitHub",
Expand All @@ -95,4 +86,4 @@
},
],
}
html_favicon = "favicon.svg"
html_favicon = "_static/favicon.svg"
19 changes: 9 additions & 10 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ tempo - Time Series Utilities for Data Teams Using Databricks
:maxdepth: 3

Databricks Labs <https://databricks.com/learn/labs>
user-guide
reference/index
contributing
tempo-team
future-roadmap

about/user-guide
references/api-reference
about/contributing
about/tempo-team
about/future-roadmap


.. image:: https://github.com/databrickslabs/tempo/workflows/build/badge.svg
Expand Down Expand Up @@ -70,9 +69,9 @@ Alternatively, you can grab the latest source code from `GitHub <https://github.
Usage
-----

The :doc:`user-guide` is the place to go to learn how to use the library and accomplish common tasks.
The :doc:`about/user-guide` is the place to go to learn how to use the library and accomplish common tasks.

The :doc:`reference/index` documentation provides API-level documentation.
The :doc:`references/api-reference` documentation provides API-level documentation.

.. _who-uses:

Expand Down Expand Up @@ -101,10 +100,10 @@ The documentation is updated and kept in line with the latest version that has b
functionality that you get from :ref:`installing tempo directly from the github repo <direct-git-install>` will be
documented here.

For support on those functionalities please feel free to reach out to the :doc:`tempo-team`.
For support on those functionalities please feel free to reach out to the :doc:`about/tempo-team`.


Contributing
------------

We happily welcome contributions, please see :doc:`contributing` for details.
We happily welcome contributions, please see :doc:`about/contributing` for details.
70 changes: 35 additions & 35 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
12 changes: 0 additions & 12 deletions docs/reference/index.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/tempo.intervals.rst

This file was deleted.

12 changes: 0 additions & 12 deletions docs/reference/tempo.tsdf.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/references/api-reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API Reference
=============

.. toctree::

tsdf
intervals
7 changes: 7 additions & 0 deletions docs/references/intervals.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Intervals Module
================

.. automodule:: tempo.intervals
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/references/tsdf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TSDF Module
===========

.. automodule:: tempo.tsdf
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions python/tempo/tsdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,7 @@ def extractStateIntervals(

:param: metric_cols: the set of metric columns to evaluate for state changes
:param: state_definition: the comparison function used to evaluate individual metrics for state changes.

Either a string, giving a standard PySpark column comparison operation, or a binary function with the
signature: `(x1: Column, x2: Column) -> Column` where the returned column expression evaluates to a
:class:`~pyspark.sql.types.BooleanType`
Expand Down
Loading