Skip to content

Commit

Permalink
Add installation and usage content
Browse files Browse the repository at this point in the history
  • Loading branch information
wigging committed Nov 1, 2024
1 parent a3b445b commit d52cc45
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 27 deletions.
77 changes: 59 additions & 18 deletions docs/getstarted.rst
Original file line number Diff line number Diff line change
@@ -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 <https://pypi.org/project/flowcept/>`_ 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}))
10 changes: 1 addition & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -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 <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
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
Expand Down

0 comments on commit d52cc45

Please sign in to comment.