From d52cc4513a899c97d9a136e87fc991b7627696a0 Mon Sep 17 00:00:00 2001 From: Gavin Wiggins <6828967+wigging@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:19:20 -0400 Subject: [PATCH] Add installation and usage content --- docs/getstarted.rst | 77 ++++++++++++++++++++++++++++++++++----------- docs/index.rst | 10 +----- 2 files changed, 60 insertions(+), 27 deletions(-) diff --git a/docs/getstarted.rst b/docs/getstarted.rst index fd4d3e09..a371b626 100644 --- a/docs/getstarted.rst +++ b/docs/getstarted.rst @@ -1,29 +1,70 @@ Getting Started =============== -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Installation and usage instructions are detailed in the following sections. Installation ------------ -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Installing flowcept can be accomplished by cloning the GitHub repository and installing with pip using the following terminal commands: + +.. code-block:: text + + git clone https://github.com/ORNL/flowcept.git + cd flowcept + pip install . + +Or it can be installed directly from `PyPI `_ with: + +.. code-block:: text + + pip install flowcept + +Use ``pip install flowcept[all]`` to install all dependencies for all the adapters. Alternatively, dependencies for a particular adapter can be installed; for example, ``pip install flowcept[dask]`` will install only the dependencies for the Dask adapter. The optional dependencies currently available are: + +.. code-block:: text + + pip install flowcept[mlflow] # To install mlflow's adapter + pip install flowcept[dask] # To install dask's adapter + pip install flowcept[tensorboard] # To install tensorboaard's adapter + pip install flowcept[kafka] # To utilize Kafka as the MQ, instead of Redis + pip install flowcept[nvidia] # To capture NVIDIA GPU runtime information + pip install flowcept[analytics] # For extra analytics features + pip install flowcept[dev] # To install dev dependencies + +You do not need to install any optional dependencies to run FlowCept without an adapter; for example, if you want to use simple instrumentation. In this case, you need to remove the adapter part from the settings.yaml file. Usage ----- -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +To use FlowCept, one needs to start a database and a MQ system. FlowCept currently supports MongoDB as its database and it supports both Redis and Kafka as the MQ system. For convenience, the default needed services can be started using the Docker compose deployment file from the GitHub repository: + +.. code-block:: text + + git clone https://github.com/ORNL/flowcept.git + cd flowcept + docker compose -f deployment/compose.yml up -d + +A simple example of using FlowCept without any adapters is given here: + +.. code-block:: python + + from flowcept import Flowcept, flowcept_task + + @flowcept_task + def sum_one(n): + return n + 1 + + + @flowcept_task + def mult_two(n): + return n * 2 + + + with Flowcept(workflow_name='test_workflow'): + n = 3 + o1 = sum_one(n) + o2 = mult_two(o1) + print(o2) + + print(Flowcept.db.query(filter={"workflow_id": Flowcept.current_workflow_id})) diff --git a/docs/index.rst b/docs/index.rst index 9abed32b..895e79b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,15 +1,7 @@ -.. FlowCept documentation master file, created by - sphinx-quickstart on Thu Oct 24 13:41:54 2024. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - FlowCept ======== -Add your content using ``reStructuredText`` syntax. See the -`reStructuredText `_ -documentation for details. - +FlowCept is a runtime data integration system that empowers any data processing system to capture and query workflow provenance data using data observability, requiring minimal or no changes in the target system code. It seamlessly integrates data from multiple workflows, enabling users to comprehend complex, heterogeneous, and large-scale data from various sources in federated environments. .. toctree:: :maxdepth: 2